From 6adaaa462c356b2db6bd77a235ee9a42d34c6f94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 04:09:13 +0000 Subject: [PATCH 1/4] build(deps-dev): bump ruff from 0.5.0 to 0.5.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.0 to 0.5.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.5.0...0.5.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 42 +++++++++++++++++++++--------------------- pyproject.toml | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/poetry.lock b/poetry.lock index 6d3742f8..bf3cf59d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiosqlite" @@ -1468,29 +1468,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.5.0" +version = "0.5.1" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.5.0-py3-none-linux_armv6l.whl", hash = "sha256:ee770ea8ab38918f34e7560a597cc0a8c9a193aaa01bfbd879ef43cb06bd9c4c"}, - {file = "ruff-0.5.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:38f3b8327b3cb43474559d435f5fa65dacf723351c159ed0dc567f7ab735d1b6"}, - {file = "ruff-0.5.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7594f8df5404a5c5c8f64b8311169879f6cf42142da644c7e0ba3c3f14130370"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:adc7012d6ec85032bc4e9065110df205752d64010bed5f958d25dbee9ce35de3"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d505fb93b0fabef974b168d9b27c3960714d2ecda24b6ffa6a87ac432905ea38"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dc5cfd3558f14513ed0d5b70ce531e28ea81a8a3b1b07f0f48421a3d9e7d80a"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:db3ca35265de239a1176d56a464b51557fce41095c37d6c406e658cf80bbb362"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b1a321c4f68809fddd9b282fab6a8d8db796b270fff44722589a8b946925a2a8"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2c4dfcd8d34b143916994b3876b63d53f56724c03f8c1a33a253b7b1e6bf2a7d"}, - {file = "ruff-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81e5facfc9f4a674c6a78c64d38becfbd5e4f739c31fcd9ce44c849f1fad9e4c"}, - {file = "ruff-0.5.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e589e27971c2a3efff3fadafb16e5aef7ff93250f0134ec4b52052b673cf988d"}, - {file = "ruff-0.5.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d2ffbc3715a52b037bcb0f6ff524a9367f642cdc5817944f6af5479bbb2eb50e"}, - {file = "ruff-0.5.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:cd096e23c6a4f9c819525a437fa0a99d1c67a1b6bb30948d46f33afbc53596cf"}, - {file = "ruff-0.5.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:46e193b36f2255729ad34a49c9a997d506e58f08555366b2108783b3064a0e1e"}, - {file = "ruff-0.5.0-py3-none-win32.whl", hash = "sha256:49141d267100f5ceff541b4e06552e98527870eafa1acc9dec9139c9ec5af64c"}, - {file = "ruff-0.5.0-py3-none-win_amd64.whl", hash = "sha256:e9118f60091047444c1b90952736ee7b1792910cab56e9b9a9ac20af94cd0440"}, - {file = "ruff-0.5.0-py3-none-win_arm64.whl", hash = "sha256:ed5c4df5c1fb4518abcb57725b576659542bdbe93366f4f329e8f398c4b71178"}, - {file = "ruff-0.5.0.tar.gz", hash = "sha256:eb641b5873492cf9bd45bc9c5ae5320648218e04386a5f0c264ad6ccce8226a1"}, + {file = "ruff-0.5.1-py3-none-linux_armv6l.whl", hash = "sha256:6ecf968fcf94d942d42b700af18ede94b07521bd188aaf2cd7bc898dd8cb63b6"}, + {file = "ruff-0.5.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:204fb0a472f00f2e6280a7c8c7c066e11e20e23a37557d63045bf27a616ba61c"}, + {file = "ruff-0.5.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d235968460e8758d1e1297e1de59a38d94102f60cafb4d5382033c324404ee9d"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38beace10b8d5f9b6bdc91619310af6d63dd2019f3fb2d17a2da26360d7962fa"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e478d2f09cf06add143cf8c4540ef77b6599191e0c50ed976582f06e588c994"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0368d765eec8247b8550251c49ebb20554cc4e812f383ff9f5bf0d5d94190b0"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:3a9a9a1b582e37669b0138b7c1d9d60b9edac880b80eb2baba6d0e566bdeca4d"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bdd9f723e16003623423affabcc0a807a66552ee6a29f90eddad87a40c750b78"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:be9fd62c1e99539da05fcdc1e90d20f74aec1b7a1613463ed77870057cd6bd96"}, + {file = "ruff-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e216fc75a80ea1fbd96af94a6233d90190d5b65cc3d5dfacf2bd48c3e067d3e1"}, + {file = "ruff-0.5.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c4c2112e9883a40967827d5c24803525145e7dab315497fae149764979ac7929"}, + {file = "ruff-0.5.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:dfaf11c8a116394da3b65cd4b36de30d8552fa45b8119b9ef5ca6638ab964fa3"}, + {file = "ruff-0.5.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d7ceb9b2fe700ee09a0c6b192c5ef03c56eb82a0514218d8ff700f6ade004108"}, + {file = "ruff-0.5.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:bac6288e82f6296f82ed5285f597713acb2a6ae26618ffc6b429c597b392535c"}, + {file = "ruff-0.5.1-py3-none-win32.whl", hash = "sha256:5c441d9c24ec09e1cb190a04535c5379b36b73c4bc20aa180c54812c27d1cca4"}, + {file = "ruff-0.5.1-py3-none-win_amd64.whl", hash = "sha256:b1789bf2cd3d1b5a7d38397cac1398ddf3ad7f73f4de01b1e913e2abc7dfc51d"}, + {file = "ruff-0.5.1-py3-none-win_arm64.whl", hash = "sha256:2875b7596a740cbbd492f32d24be73e545a4ce0a3daf51e4f4e609962bfd3cd2"}, + {file = "ruff-0.5.1.tar.gz", hash = "sha256:3164488aebd89b1745b47fd00604fb4358d774465f20d1fcd907f9c0fc1b0655"}, ] [[package]] @@ -1856,4 +1856,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f9ea4765bb8b061670dc18744a748ec756333865e079ca810370caf74cfdd2a1" +content-hash = "49c34d819e05754d3d60bcbf490a878f8442225351ac967ac9d7f7cc9c121e78" diff --git a/pyproject.toml b/pyproject.toml index 1ec3e374..f6d5d48d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ boto3 = "^1.26.0" optional = true [tool.poetry.group.quality.dependencies] -ruff = "==0.5.0" +ruff = "==0.5.1" mypy = "==1.10.0" types-requests = ">=2.0.0" types-python-dateutil = "^2.8.0" From 38d75f25b6d1c9eef71df7e664d330f0f3a37f46 Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:15:07 +0200 Subject: [PATCH 2/4] style(pre-commit): bump ruff to 0.5.1 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c791ac04..26b6388b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: debug-statements language_version: python3 - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.5.0' + rev: 'v0.5.1' hooks: - id: ruff args: From ea183aa20b80ef8e6a72989568b46d9fc82a2036 Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:15:26 +0200 Subject: [PATCH 3/4] style(test): fix lint --- src/tests/endpoints/test_cameras.py | 12 ++++++------ src/tests/endpoints/test_detections.py | 12 ++++++------ src/tests/endpoints/test_login.py | 2 +- src/tests/endpoints/test_users.py | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/tests/endpoints/test_cameras.py b/src/tests/endpoints/test_cameras.py index 86430730..a71c7af2 100644 --- a/src/tests/endpoints/test_cameras.py +++ b/src/tests/endpoints/test_cameras.py @@ -35,7 +35,7 @@ ), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_create_camera( async_client: AsyncClient, camera_session: AsyncSession, @@ -69,7 +69,7 @@ async def test_create_camera( (2, 1, 200, None, 0), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_get_camera( async_client: AsyncClient, camera_session: AsyncSession, @@ -100,7 +100,7 @@ async def test_get_camera( (2, 200, None, pytest.camera_table), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_fetch_cameras( async_client: AsyncClient, camera_session: AsyncSession, @@ -135,7 +135,7 @@ async def test_fetch_cameras( (2, 2, 403, "Incompatible token scope."), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_delete_camera( async_client: AsyncClient, camera_session: AsyncSession, @@ -167,7 +167,7 @@ async def test_delete_camera( (2, 1, 403, "Incompatible token scope."), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_create_camera_token( async_client: AsyncClient, camera_session: AsyncSession, @@ -199,7 +199,7 @@ async def test_create_camera_token( (1, 200, None), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_heartbeat( async_client: AsyncClient, camera_session: AsyncSession, diff --git a/src/tests/endpoints/test_detections.py b/src/tests/endpoints/test_detections.py index 25efd9a4..d43fc179 100644 --- a/src/tests/endpoints/test_detections.py +++ b/src/tests/endpoints/test_detections.py @@ -19,7 +19,7 @@ (None, 1, {"azimuth": 45.6}, 201, None), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_create_detection( async_client: AsyncClient, detection_session: AsyncSession, @@ -65,7 +65,7 @@ async def test_create_detection( (1, 2, 200, None, 1), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_get_detection( async_client: AsyncClient, detection_session: AsyncSession, @@ -95,7 +95,7 @@ async def test_get_detection( (1, 200, None, pytest.detection_table), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_fetch_detections( async_client: AsyncClient, detection_session: AsyncSession, @@ -131,7 +131,7 @@ async def test_fetch_detections( (2, 1, {"is_wildfire": True}, 403, None, 0), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_label_detection( async_client: AsyncClient, detection_session: AsyncSession, @@ -167,7 +167,7 @@ async def test_label_detection( (2, None, 200, None), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_get_detection_url( async_client: AsyncClient, detection_session: AsyncSession, @@ -210,7 +210,7 @@ async def test_get_detection_url( (1, 2, 403, None), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_delete_detection( async_client: AsyncClient, detection_session: AsyncSession, diff --git a/src/tests/endpoints/test_login.py b/src/tests/endpoints/test_login.py index 01e5e418..efa4a825 100644 --- a/src/tests/endpoints/test_login.py +++ b/src/tests/endpoints/test_login.py @@ -14,7 +14,7 @@ ({"username": "first_login", "password": "first_pwd"}, 200, None), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_login_with_creds( async_client: AsyncClient, user_session: AsyncSession, diff --git a/src/tests/endpoints/test_users.py b/src/tests/endpoints/test_users.py index 3ecda02f..13bbe4f8 100644 --- a/src/tests/endpoints/test_users.py +++ b/src/tests/endpoints/test_users.py @@ -40,7 +40,7 @@ ), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_create_user( async_client: AsyncClient, user_session: AsyncSession, @@ -77,7 +77,7 @@ async def test_create_user( (0, 2, 200, None, 1), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_get_user( async_client: AsyncClient, user_session: AsyncSession, @@ -107,7 +107,7 @@ async def test_get_user( (1, 403, "Incompatible token scope."), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_fetch_users( async_client: AsyncClient, user_session: AsyncSession, @@ -137,7 +137,7 @@ async def test_fetch_users( (1, 2, 403, "Incompatible token scope."), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_delete_user( async_client: AsyncClient, user_session: AsyncSession, @@ -169,7 +169,7 @@ async def test_delete_user( (1, 2, {"password": "HeyPyro!"}, 403, "Incompatible token scope.", None), ], ) -@pytest.mark.asyncio() +@pytest.mark.asyncio async def test_update_user_password( async_client: AsyncClient, user_session: AsyncSession, From c2de81e57e87821d6af9c64239e58bbb847798d0 Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:16:51 +0200 Subject: [PATCH 4/4] style(test): ignore asyncsession warning --- src/tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/conftest.py b/src/tests/conftest.py index 760cd717..0036fa7b 100644 --- a/src/tests/conftest.py +++ b/src/tests/conftest.py @@ -109,7 +109,7 @@ def event_loop(request) -> Generator: @pytest_asyncio.fixture(scope="function") async def async_client() -> AsyncGenerator[AsyncClient, None]: - async with AsyncClient( + async with AsyncClient( # noqa: S113 app=app, base_url=f"http://api.localhost:8050{settings.API_V1_STR}", follow_redirects=True ) as client: yield client