From 91e757787d4d65247cec73164755924f8be6a5f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:21:40 +0000 Subject: [PATCH 01/10] Bump piped from `90e9b19` to `470915f` Bumps [piped](https://github.com/FasterSpeeding/Piped) from `90e9b19` to `470915f`. - [Release notes](https://github.com/FasterSpeeding/Piped/releases) - [Commits](https://github.com/FasterSpeeding/Piped/compare/90e9b193bd1cce531eff2d98acf313967ba2cd0c...470915fd5650218b67d8e7b22b3873efd4227660) --- updated-dependencies: - dependency-name: piped dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- piped | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piped b/piped index 90e9b193b..470915fd5 160000 --- a/piped +++ b/piped @@ -1 +1 @@ -Subproject commit 90e9b193bd1cce531eff2d98acf313967ba2cd0c +Subproject commit 470915fd5650218b67d8e7b22b3873efd4227660 From 7b58c8462339ea85124fcdba357d054dc8f35567 Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Wed, 27 Nov 2024 23:39:54 +0000 Subject: [PATCH 02/10] Update pyproject and generate noxfile --- .github/actions/setup-py/action.yml | 2 +- .github/workflows/verify-locks.yml | 29 - dev-requirements/constraints.in | 3 - dev-requirements/constraints.txt | 478 ------- dev-requirements/flake8.txt | 1 - dev-requirements/tests.in | 9 - dev-requirements/tests.txt | 583 --------- dev-requirements/type-checking.in | 4 - dev-requirements/type-checking.txt | 643 ---------- noxfile.py | 1 + pyproject.toml | 145 ++- uv.lock | 1777 +++++++++++++++++++++++++++ 12 files changed, 1871 insertions(+), 1804 deletions(-) delete mode 100644 .github/workflows/verify-locks.yml delete mode 100644 dev-requirements/constraints.in delete mode 100644 dev-requirements/constraints.txt delete mode 100644 dev-requirements/flake8.txt delete mode 100644 dev-requirements/tests.in delete mode 100644 dev-requirements/tests.txt delete mode 100644 dev-requirements/type-checking.in delete mode 100644 dev-requirements/type-checking.txt create mode 100644 uv.lock diff --git a/.github/actions/setup-py/action.yml b/.github/actions/setup-py/action.yml index 9790e49d5..fe868368d 100644 --- a/.github/actions/setup-py/action.yml +++ b/.github/actions/setup-py/action.yml @@ -15,5 +15,5 @@ runs: python-version: ${{ inputs.python-version }} - name: Install Nox - run: pipx install nox --python "${{ steps.install-py.outputs.python-path }}" + run: pipx install uv nox[uv] --python "${{ steps.install-py.outputs.python-path }}" shell: bash diff --git a/.github/workflows/verify-locks.yml b/.github/workflows/verify-locks.yml deleted file mode 100644 index 20c945a36..000000000 --- a/.github/workflows/verify-locks.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This is run to avoid an edge case where the latest version of a (probably sub) -# dependency being yanked leads to pip failing to backtrack the dep. -# This happened with `cachecontrol==0.12.12 ; python_version >= "3.7" and python_version < "4.0"`. -name: Verify dependency locks - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - pull_request: - branches: - - master - paths: ["dev-requirements/*.txt"] - -jobs: - verify-pr-dep-changes: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - submodules: "true" - - - name: Install Python - uses: ./.github/actions/setup-py - - - name: Verify dependency locks - run: nox -s verify-deps diff --git a/dev-requirements/constraints.in b/dev-requirements/constraints.in deleted file mode 100644 index 18fd03175..000000000 --- a/dev-requirements/constraints.in +++ /dev/null @@ -1,3 +0,0 @@ -alluka>=0.2.0, <1 -hikari>=2.0.0.dev115, <3 -typing-extensions>=4.5, <5 diff --git a/dev-requirements/constraints.txt b/dev-requirements/constraints.txt deleted file mode 100644 index 35eb02f48..000000000 --- a/dev-requirements/constraints.txt +++ /dev/null @@ -1,478 +0,0 @@ -# -# This file is autogenerated by pip-compile-cross-platform -# To update, run: -# -# pip-compile-cross-platform dev-requirements/constraints.in --output-file dev-requirements/constraints.txt --min-python-version 3.11.0,<3.14 --generate-hashes -# -aiohappyeyeballs==2.4.3 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586 \ - --hash=sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572 -aiohttp==3.11.7 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:018f1b04883a12e77e7fc161934c0f298865d3a484aea536a6a2ca8d909f0ba0 \ - --hash=sha256:01a8aca4af3da85cea5c90141d23f4b0eee3cbecfd33b029a45a80f28c66c668 \ - --hash=sha256:04b0cc74d5a882c9dacaeeccc1444f0233212b6f5be8bc90833feef1e1ce14b9 \ - --hash=sha256:0de6466b9d742b4ee56fe1b2440706e225eb48c77c63152b1584864a236e7a50 \ - --hash=sha256:12724f3a211fa243570e601f65a8831372caf1a149d2f1859f68479f07efec3d \ - --hash=sha256:12e4d45847a174f77b2b9919719203769f220058f642b08504cf8b1cf185dacf \ - --hash=sha256:17829f37c0d31d89aa6b8b010475a10233774771f9b6dc2cc352ea4f8ce95d9a \ - --hash=sha256:1a17f6a230f81eb53282503823f59d61dff14fb2a93847bf0399dc8e87817307 \ - --hash=sha256:1cf03d27885f8c5ebf3993a220cc84fc66375e1e6e812731f51aab2b2748f4a6 \ - --hash=sha256:1fbf41a6bbc319a7816ae0f0177c265b62f2a59ad301a0e49b395746eb2a9884 \ - --hash=sha256:2257bdd5cf54a4039a4337162cd8048f05a724380a2283df34620f55d4e29341 \ - --hash=sha256:24054fce8c6d6f33a3e35d1c603ef1b91bbcba73e3f04a22b4f2f27dac59b347 \ - --hash=sha256:241a6ca732d2766836d62c58c49ca7a93d08251daef0c1e3c850df1d1ca0cbc4 \ - --hash=sha256:28c7af3e50e5903d21d7b935aceed901cc2475463bc16ddd5587653548661fdb \ - --hash=sha256:351849aca2c6f814575c1a485c01c17a4240413f960df1bf9f5deb0003c61a53 \ - --hash=sha256:3ce18f703b7298e7f7633efd6a90138d99a3f9a656cb52c1201e76cb5d79cf08 \ - --hash=sha256:3d1c9c15d3999107cbb9b2d76ca6172e6710a12fda22434ee8bd3f432b7b17e8 \ - --hash=sha256:3dd3e7e7c9ef3e7214f014f1ae260892286647b3cf7c7f1b644a568fd410f8ca \ - --hash=sha256:43bfd25113c1e98aec6c70e26d5f4331efbf4aa9037ba9ad88f090853bf64d7f \ - --hash=sha256:43dd89a6194f6ab02a3fe36b09e42e2df19c211fc2050ce37374d96f39604997 \ - --hash=sha256:481f10a1a45c5f4c4a578bbd74cff22eb64460a6549819242a87a80788461fba \ - --hash=sha256:4ba8d043fed7ffa117024d7ba66fdea011c0e7602327c6d73cacaea38abe4491 \ - --hash=sha256:4bb7493c3e3a36d3012b8564bd0e2783259ddd7ef3a81a74f0dbfa000fce48b7 \ - --hash=sha256:4c1a6309005acc4b2bcc577ba3b9169fea52638709ffacbd071f3503264620da \ - --hash=sha256:4dda726f89bfa5c465ba45b76515135a3ece0088dfa2da49b8bb278f3bdeea12 \ - --hash=sha256:53c921b58fdc6485d6b2603e0132bb01cd59b8f0620ffc0907f525e0ba071687 \ - --hash=sha256:5578cf40440eafcb054cf859964bc120ab52ebe0e0562d2b898126d868749629 \ - --hash=sha256:59ee1925b5a5efdf6c4e7be51deee93984d0ac14a6897bd521b498b9916f1544 \ - --hash=sha256:670847ee6aeb3a569cd7cdfbe0c3bec1d44828bbfbe78c5d305f7f804870ef9e \ - --hash=sha256:78c657ece7a73b976905ab9ec8be9ef2df12ed8984c24598a1791c58ce3b4ce4 \ - --hash=sha256:7a9318da4b4ada9a67c1dd84d1c0834123081e746bee311a16bb449f363d965e \ - --hash=sha256:7b2f8107a3c329789f3c00b2daad0e35f548d0a55cda6291579136622099a46e \ - --hash=sha256:7ea4490360b605804bea8173d2d086b6c379d6bb22ac434de605a9cbce006e7d \ - --hash=sha256:8360c7cc620abb320e1b8d603c39095101391a82b1d0be05fb2225471c9c5c52 \ - --hash=sha256:875f7100ce0e74af51d4139495eec4025affa1a605280f23990b6434b81df1bd \ - --hash=sha256:8bedb1f6cb919af3b6353921c71281b1491f948ca64408871465d889b4ee1b66 \ - --hash=sha256:8d20cfe63a1c135d26bde8c1d0ea46fd1200884afbc523466d2f1cf517d1fe33 \ - --hash=sha256:9202f184cc0582b1db15056f2225ab4c1e3dac4d9ade50dd0613ac3c46352ac2 \ - --hash=sha256:9acfc7f652b31853eed3b92095b0acf06fd5597eeea42e939bd23a17137679d5 \ - --hash=sha256:9d18a8b44ec8502a7fde91446cd9c9b95ce7c49f1eacc1fb2358b8907d4369fd \ - --hash=sha256:9e67531370a3b07e49b280c1f8c2df67985c790ad2834d1b288a2f13cd341c5f \ - --hash=sha256:9ee6a4cdcbf54b8083dc9723cdf5f41f722c00db40ccf9ec2616e27869151129 \ - --hash=sha256:a7d9a606355655617fee25dd7e54d3af50804d002f1fd3118dd6312d26692d70 \ - --hash=sha256:aa3705a8d14de39898da0fbad920b2a37b7547c3afd2a18b9b81f0223b7d0f68 \ - --hash=sha256:b7215bf2b53bc6cb35808149980c2ae80a4ae4e273890ac85459c014d5aa60ac \ - --hash=sha256:badda65ac99555791eed75e234afb94686ed2317670c68bff8a4498acdaee935 \ - --hash=sha256:bf0e6cce113596377cadda4e3ac5fb89f095bd492226e46d91b4baef1dd16f60 \ - --hash=sha256:c171fc35d3174bbf4787381716564042a4cbc008824d8195eede3d9b938e29a8 \ - --hash=sha256:c1f6490dd1862af5aae6cfcf2a274bffa9a5b32a8f5acb519a7ecf5a99a88866 \ - --hash=sha256:c25b74a811dba37c7ea6a14d99eb9402d89c8d739d50748a75f3cf994cf19c43 \ - --hash=sha256:c6095aaf852c34f42e1bd0cf0dc32d1e4b48a90bfb5054abdbb9d64b36acadcb \ - --hash=sha256:c63f898f683d1379b9be5afc3dd139e20b30b0b1e0bf69a3fc3681f364cf1629 \ - --hash=sha256:cd8d62cab363dfe713067027a5adb4907515861f1e4ce63e7be810b83668b847 \ - --hash=sha256:ce91a24aac80de6be8512fb1c4838a9881aa713f44f4e91dd7bb3b34061b497d \ - --hash=sha256:cea52d11e02123f125f9055dfe0ccf1c3857225fb879e4a944fae12989e2aef2 \ - --hash=sha256:cf4efa2d01f697a7dbd0509891a286a4af0d86902fc594e20e3b1712c28c0106 \ - --hash=sha256:d2fa6fc7cc865d26ff42480ac9b52b8c9b7da30a10a6442a9cdf429de840e949 \ - --hash=sha256:d329300fb23e14ed1f8c6d688dfd867d1dcc3b1d7cd49b7f8c5b44e797ce0932 \ - --hash=sha256:d6177077a31b1aecfc3c9070bd2f11419dbb4a70f30f4c65b124714f525c2e48 \ - --hash=sha256:db37248535d1ae40735d15bdf26ad43be19e3d93ab3f3dad8507eb0f85bb8124 \ - --hash=sha256:db70a47987e34494b451a334605bee57a126fe8d290511349e86810b4be53b01 \ - --hash=sha256:dcefcf2915a2dbdbce37e2fc1622129a1918abfe3d06721ce9f6cdac9b6d2eaa \ - --hash=sha256:dda3ed0a7869d2fa16aa41f9961ade73aa2c2e3b2fcb0a352524e7b744881889 \ - --hash=sha256:e0bf378db07df0a713a1e32381a1b277e62ad106d0dbe17b5479e76ec706d720 \ - --hash=sha256:e13a05db87d3b241c186d0936808d0e4e12decc267c617d54e9c643807e968b6 \ - --hash=sha256:e143b0ef9cb1a2b4f74f56d4fbe50caa7c2bb93390aff52f9398d21d89bc73ea \ - --hash=sha256:e22d1721c978a6494adc824e0916f9d187fa57baeda34b55140315fa2f740184 \ - --hash=sha256:e5522ee72f95661e79db691310290c4618b86dff2d9b90baedf343fd7a08bf79 \ - --hash=sha256:e993676c71288618eb07e20622572b1250d8713e7e00ab3aabae28cb70f3640d \ - --hash=sha256:ee9afa1b0d2293c46954f47f33e150798ad68b78925e3710044e0d67a9487791 \ - --hash=sha256:f1ac5462582d6561c1c1708853a9faf612ff4e5ea5e679e99be36143d6eabd8e \ - --hash=sha256:f5022504adab881e2d801a88b748ea63f2a9d130e0b2c430824682a96f6534be \ - --hash=sha256:f5b973cce96793725ef63eb449adfb74f99c043c718acb76e0d2a447ae369962 \ - --hash=sha256:f7c58a240260822dc07f6ae32a0293dd5bccd618bb2d0f36d51c5dbd526f89c0 \ - --hash=sha256:fc6da202068e0a268e298d7cd09b6e9f3997736cd9b060e2750963754552a0a9 \ - --hash=sha256:fdadc3f6a32d6eca45f9a900a254757fd7855dfb2d8f8dcf0e88f0fae3ff8eb1 -aiosignal==1.3.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc \ - --hash=sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17 -alluka==0.4.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:25ca19ffe47eab876ea1a6cc118af9b30dd075ac1bf706a248750ab38e0c5c9b \ - --hash=sha256:758f4d0623dc8e895949fedac8e9fb124cfdd412b9608ab5eba7f8db316692e0 -attrs==24.2.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 -colorama==0.4.6 ; python_full_version >= "3.11.0" and python_version < "3.14" and sys_platform == "win32" \ - --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ - --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 -colorlog==6.9.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff \ - --hash=sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2 -frozenlist==1.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e \ - --hash=sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf \ - --hash=sha256:04a5c6babd5e8fb7d3c871dc8b321166b80e41b637c31a995ed844a6139942b6 \ - --hash=sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a \ - --hash=sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d \ - --hash=sha256:0f253985bb515ecd89629db13cb58d702035ecd8cfbca7d7a7e29a0e6d39af5f \ - --hash=sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28 \ - --hash=sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b \ - --hash=sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9 \ - --hash=sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2 \ - --hash=sha256:15538c0cbf0e4fa11d1e3a71f823524b0c46299aed6e10ebb4c2089abd8c3bec \ - --hash=sha256:15b731db116ab3aedec558573c1a5eec78822b32292fe4f2f0345b7f697745c2 \ - --hash=sha256:17dcc32fc7bda7ce5875435003220a457bcfa34ab7924a49a1c19f55b6ee185c \ - --hash=sha256:1893f948bf6681733aaccf36c5232c231e3b5166d607c5fa77773611df6dc336 \ - --hash=sha256:189f03b53e64144f90990d29a27ec4f7997d91ed3d01b51fa39d2dbe77540fd4 \ - --hash=sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d \ - --hash=sha256:1b96af8c582b94d381a1c1f51ffaedeb77c821c690ea5f01da3d70a487dd0a9b \ - --hash=sha256:1e76bfbc72353269c44e0bc2cfe171900fbf7f722ad74c9a7b638052afe6a00c \ - --hash=sha256:2150cc6305a2c2ab33299453e2968611dacb970d2283a14955923062c8d00b10 \ - --hash=sha256:226d72559fa19babe2ccd920273e767c96a49b9d3d38badd7c91a0fdeda8ea08 \ - --hash=sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942 \ - --hash=sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8 \ - --hash=sha256:2b5e23253bb709ef57a8e95e6ae48daa9ac5f265637529e4ce6b003a37b2621f \ - --hash=sha256:2d0da8bbec082bf6bf18345b180958775363588678f64998c2b7609e34719b10 \ - --hash=sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5 \ - --hash=sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6 \ - --hash=sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21 \ - --hash=sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c \ - --hash=sha256:366d8f93e3edfe5a918c874702f78faac300209a4d5bf38352b2c1bdc07a766d \ - --hash=sha256:374ca2dabdccad8e2a76d40b1d037f5bd16824933bf7bcea3e59c891fd4a0923 \ - --hash=sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608 \ - --hash=sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de \ - --hash=sha256:498524025a5b8ba81695761d78c8dd7382ac0b052f34e66939c42df860b8ff17 \ - --hash=sha256:50cf5e7ee9b98f22bdecbabf3800ae78ddcc26e4a435515fc72d97903e8488e0 \ - --hash=sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f \ - --hash=sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641 \ - --hash=sha256:5a3ba5f9a0dfed20337d3e966dc359784c9f96503674c2faf015f7fe8e96798c \ - --hash=sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a \ - --hash=sha256:5c28f4b5dbef8a0d8aad0d4de24d1e9e981728628afaf4ea0792f5d0939372f0 \ - --hash=sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9 \ - --hash=sha256:6321899477db90bdeb9299ac3627a6a53c7399c8cd58d25da094007402b039ab \ - --hash=sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f \ - --hash=sha256:666534d15ba8f0fda3f53969117383d5dc021266b3c1a42c9ec4855e4b58b9d3 \ - --hash=sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a \ - --hash=sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784 \ - --hash=sha256:73f2e31ea8dd7df61a359b731716018c2be196e5bb3b74ddba107f694fbd7604 \ - --hash=sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d \ - --hash=sha256:76e4753701248476e6286f2ef492af900ea67d9706a0155335a40ea21bf3b2f5 \ - --hash=sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03 \ - --hash=sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e \ - --hash=sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953 \ - --hash=sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee \ - --hash=sha256:7f3c8c1dacd037df16e85227bac13cca58c30da836c6f936ba1df0c05d046d8d \ - --hash=sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817 \ - --hash=sha256:828afae9f17e6de596825cf4228ff28fbdf6065974e5ac1410cecc22f699d2b3 \ - --hash=sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039 \ - --hash=sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f \ - --hash=sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9 \ - --hash=sha256:91d6c171862df0a6c61479d9724f22efb6109111017c87567cfeb7b5d1449fdf \ - --hash=sha256:9272fa73ca71266702c4c3e2d4a28553ea03418e591e377a03b8e3659d94fa76 \ - --hash=sha256:92b5278ed9d50fe610185ecd23c55d8b307d75ca18e94c0e7de328089ac5dcba \ - --hash=sha256:97160e245ea33d8609cd2b8fd997c850b56db147a304a262abc2b3be021a9171 \ - --hash=sha256:977701c081c0241d0955c9586ffdd9ce44f7a7795df39b9151cd9a6fd0ce4cfb \ - --hash=sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439 \ - --hash=sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631 \ - --hash=sha256:9bbcdfaf4af7ce002694a4e10a0159d5a8d20056a12b05b45cea944a4953f972 \ - --hash=sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d \ - --hash=sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869 \ - --hash=sha256:a72b7a6e3cd2725eff67cd64c8f13335ee18fc3c7befc05aed043d24c7b9ccb9 \ - --hash=sha256:a9fe0f1c29ba24ba6ff6abf688cb0b7cf1efab6b6aa6adc55441773c252f7411 \ - --hash=sha256:b97f7b575ab4a8af9b7bc1d2ef7f29d3afee2226bd03ca3875c16451ad5a7723 \ - --hash=sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2 \ - --hash=sha256:c03eff4a41bd4e38415cbed054bbaff4a075b093e2394b6915dca34a40d1e38b \ - --hash=sha256:c16d2fa63e0800723139137d667e1056bee1a1cf7965153d2d104b62855e9b99 \ - --hash=sha256:c1fac3e2ace2eb1052e9f7c7db480818371134410e1f5c55d65e8f3ac6d1407e \ - --hash=sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840 \ - --hash=sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3 \ - --hash=sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb \ - --hash=sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3 \ - --hash=sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0 \ - --hash=sha256:dd94994fc91a6177bfaafd7d9fd951bc8689b0a98168aa26b5f543868548d3ca \ - --hash=sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45 \ - --hash=sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e \ - --hash=sha256:e66cc454f97053b79c2ab09c17fbe3c825ea6b4de20baf1be28919460dd7877f \ - --hash=sha256:e79225373c317ff1e35f210dd5f1344ff31066ba8067c307ab60254cd3a78ad5 \ - --hash=sha256:f1577515d35ed5649d52ab4319db757bb881ce3b2b796d7283e6634d99ace307 \ - --hash=sha256:f1e6540b7fa044eee0bb5111ada694cf3dc15f2b0347ca125ee9ca984d5e9e6e \ - --hash=sha256:f2ac49a9bedb996086057b75bf93538240538c6d9b38e57c82d51f75a73409d2 \ - --hash=sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778 \ - --hash=sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a \ - --hash=sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30 \ - --hash=sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a -hikari==2.1.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:36d2629f5f1df39d3edc7bb8f64996e82f6926f297e18ababcf753120f7f404b \ - --hash=sha256:498bc39d2777eb5ceeec63e3b08362dda39d966a0f2197867f94e8293bb4a277 -idna==3.10 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 -multidict==6.1.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f \ - --hash=sha256:06809f4f0f7ab7ea2cabf9caca7d79c22c0758b58a71f9d32943ae13c7ace056 \ - --hash=sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761 \ - --hash=sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3 \ - --hash=sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b \ - --hash=sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6 \ - --hash=sha256:10524ebd769727ac77ef2278390fb0068d83f3acb7773792a5080f2b0abf7748 \ - --hash=sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966 \ - --hash=sha256:16e5f4bf4e603eb1fdd5d8180f1a25f30056f22e55ce51fb3d6ad4ab29f7d96f \ - --hash=sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1 \ - --hash=sha256:189f652a87e876098bbc67b4da1049afb5f5dfbaa310dd67c594b01c10388db6 \ - --hash=sha256:1ca0083e80e791cffc6efce7660ad24af66c8d4079d2a750b29001b53ff59ada \ - --hash=sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305 \ - --hash=sha256:2090f6a85cafc5b2db085124d752757c9d251548cedabe9bd31afe6363e0aff2 \ - --hash=sha256:20b9b5fbe0b88d0bdef2012ef7dee867f874b72528cf1d08f1d59b0e3850129d \ - --hash=sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a \ - --hash=sha256:22f3105d4fb15c8f57ff3959a58fcab6ce36814486500cd7485651230ad4d4ef \ - --hash=sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c \ - --hash=sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb \ - --hash=sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60 \ - --hash=sha256:3702ea6872c5a2a4eeefa6ffd36b042e9773f05b1f37ae3ef7264b1163c2dcf6 \ - --hash=sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4 \ - --hash=sha256:3914f5aaa0f36d5d60e8ece6a308ee1c9784cd75ec8151062614657a114c4478 \ - --hash=sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81 \ - --hash=sha256:3c8b88a2ccf5493b6c8da9076fb151ba106960a2df90c2633f342f120751a9e7 \ - --hash=sha256:3e97b5e938051226dc025ec80980c285b053ffb1e25a3db2a3aa3bc046bf7f56 \ - --hash=sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3 \ - --hash=sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6 \ - --hash=sha256:483a6aea59cb89904e1ceabd2b47368b5600fb7de78a6e4a2c2987b2d256cf30 \ - --hash=sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb \ - --hash=sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506 \ - --hash=sha256:4a9cb68166a34117d6646c0023c7b759bf197bee5ad4272f420a0141d7eb03a0 \ - --hash=sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925 \ - --hash=sha256:4e18b656c5e844539d506a0a06432274d7bd52a7487e6828c63a63d69185626c \ - --hash=sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6 \ - --hash=sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e \ - --hash=sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95 \ - --hash=sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2 \ - --hash=sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133 \ - --hash=sha256:5845c1fd4866bb5dd3125d89b90e57ed3138241540897de748cdf19de8a2fca2 \ - --hash=sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa \ - --hash=sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3 \ - --hash=sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3 \ - --hash=sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436 \ - --hash=sha256:682b987361e5fd7a139ed565e30d81fd81e9629acc7d925a205366877d8c8657 \ - --hash=sha256:6b5d83030255983181005e6cfbac1617ce9746b219bc2aad52201ad121226581 \ - --hash=sha256:6bb5992037f7a9eff7991ebe4273ea7f51f1c1c511e6a2ce511d0e7bdb754492 \ - --hash=sha256:73eae06aa53af2ea5270cc066dcaf02cc60d2994bbb2c4ef5764949257d10f43 \ - --hash=sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2 \ - --hash=sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2 \ - --hash=sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926 \ - --hash=sha256:87701f25a2352e5bf7454caa64757642734da9f6b11384c1f9d1a8e699758057 \ - --hash=sha256:9079dfc6a70abe341f521f78405b8949f96db48da98aeb43f9907f342f627cdc \ - --hash=sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80 \ - --hash=sha256:957cf8e4b6e123a9eea554fa7ebc85674674b713551de587eb318a2df3e00255 \ - --hash=sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1 \ - --hash=sha256:9f636b730f7e8cb19feb87094949ba54ee5357440b9658b2a32a5ce4bce53972 \ - --hash=sha256:a114d03b938376557927ab23f1e950827c3b893ccb94b62fd95d430fd0e5cf53 \ - --hash=sha256:a185f876e69897a6f3325c3f19f26a297fa058c5e456bfcff8015e9a27e83ae1 \ - --hash=sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423 \ - --hash=sha256:aa466da5b15ccea564bdab9c89175c762bc12825f4659c11227f515cee76fa4a \ - --hash=sha256:aaed8b0562be4a0876ee3b6946f6869b7bcdb571a5d1496683505944e268b160 \ - --hash=sha256:ab7c4ceb38d91570a650dba194e1ca87c2b543488fe9309b4212694174fd539c \ - --hash=sha256:ac10f4c2b9e770c4e393876e35a7046879d195cd123b4f116d299d442b335bcd \ - --hash=sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa \ - --hash=sha256:b1c416351ee6271b2f49b56ad7f308072f6f44b37118d69c2cad94f3fa8a40d5 \ - --hash=sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b \ - --hash=sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa \ - --hash=sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef \ - --hash=sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44 \ - --hash=sha256:c08be4f460903e5a9d0f76818db3250f12e9c344e79314d1d570fc69d7f4eae4 \ - --hash=sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156 \ - --hash=sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753 \ - --hash=sha256:ce2186a7df133a9c895dea3331ddc5ddad42cdd0d1ea2f0a51e5d161e4762f28 \ - --hash=sha256:d093be959277cb7dee84b801eb1af388b6ad3ca6a6b6bf1ed7585895789d027d \ - --hash=sha256:d094ddec350a2fb899fec68d8353c78233debde9b7d8b4beeafa70825f1c281a \ - --hash=sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304 \ - --hash=sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008 \ - --hash=sha256:d618649d4e70ac6efcbba75be98b26ef5078faad23592f9b51ca492953012429 \ - --hash=sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72 \ - --hash=sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399 \ - --hash=sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3 \ - --hash=sha256:db7457bac39421addd0c8449933ac32d8042aae84a14911a757ae6ca3eef1392 \ - --hash=sha256:e27bbb6d14416713a8bd7aaa1313c0fc8d44ee48d74497a0ff4c3a1b6ccb5167 \ - --hash=sha256:e617fb6b0b6953fffd762669610c1c4ffd05632c138d61ac7e14ad187870669c \ - --hash=sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774 \ - --hash=sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351 \ - --hash=sha256:f179dee3b863ab1c59580ff60f9d99f632f34ccb38bf67a33ec6b3ecadd0fd76 \ - --hash=sha256:f4c035da3f544b1882bac24115f3e2e8760f10a0107614fc9839fd232200b875 \ - --hash=sha256:f67f217af4b1ff66c68a87318012de788dd95fcfeb24cc889011f4e1c7454dfd \ - --hash=sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28 \ - --hash=sha256:ff3827aef427c89a25cc96ded1759271a93603aba9fb977a6d264648ebf989db -propcache==0.2.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9 \ - --hash=sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763 \ - --hash=sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325 \ - --hash=sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb \ - --hash=sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b \ - --hash=sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09 \ - --hash=sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957 \ - --hash=sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68 \ - --hash=sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f \ - --hash=sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798 \ - --hash=sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418 \ - --hash=sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6 \ - --hash=sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162 \ - --hash=sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f \ - --hash=sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036 \ - --hash=sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8 \ - --hash=sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2 \ - --hash=sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110 \ - --hash=sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23 \ - --hash=sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8 \ - --hash=sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638 \ - --hash=sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a \ - --hash=sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44 \ - --hash=sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2 \ - --hash=sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2 \ - --hash=sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850 \ - --hash=sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136 \ - --hash=sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b \ - --hash=sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887 \ - --hash=sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89 \ - --hash=sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87 \ - --hash=sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348 \ - --hash=sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4 \ - --hash=sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861 \ - --hash=sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e \ - --hash=sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c \ - --hash=sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b \ - --hash=sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb \ - --hash=sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1 \ - --hash=sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de \ - --hash=sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354 \ - --hash=sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563 \ - --hash=sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5 \ - --hash=sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf \ - --hash=sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9 \ - --hash=sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12 \ - --hash=sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4 \ - --hash=sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5 \ - --hash=sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71 \ - --hash=sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9 \ - --hash=sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed \ - --hash=sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336 \ - --hash=sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90 \ - --hash=sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063 \ - --hash=sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad \ - --hash=sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6 \ - --hash=sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8 \ - --hash=sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e \ - --hash=sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2 \ - --hash=sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7 \ - --hash=sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d \ - --hash=sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d \ - --hash=sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df \ - --hash=sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b \ - --hash=sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178 \ - --hash=sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2 \ - --hash=sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630 \ - --hash=sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48 \ - --hash=sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61 \ - --hash=sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89 \ - --hash=sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb \ - --hash=sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3 \ - --hash=sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6 \ - --hash=sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562 \ - --hash=sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b \ - --hash=sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58 \ - --hash=sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db \ - --hash=sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99 \ - --hash=sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37 \ - --hash=sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83 \ - --hash=sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a \ - --hash=sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d \ - --hash=sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04 \ - --hash=sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70 \ - --hash=sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544 \ - --hash=sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394 \ - --hash=sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea \ - --hash=sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7 \ - --hash=sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1 \ - --hash=sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793 \ - --hash=sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577 \ - --hash=sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7 \ - --hash=sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57 \ - --hash=sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d \ - --hash=sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032 \ - --hash=sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d \ - --hash=sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016 \ - --hash=sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504 -typing-extensions==4.12.2 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 -yarl==1.18.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075 \ - --hash=sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a \ - --hash=sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7 \ - --hash=sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8 \ - --hash=sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88 \ - --hash=sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc \ - --hash=sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced \ - --hash=sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b \ - --hash=sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df \ - --hash=sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715 \ - --hash=sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41 \ - --hash=sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5 \ - --hash=sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34 \ - --hash=sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf \ - --hash=sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e \ - --hash=sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0 \ - --hash=sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c \ - --hash=sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a \ - --hash=sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6 \ - --hash=sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1 \ - --hash=sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb \ - --hash=sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6 \ - --hash=sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17 \ - --hash=sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d \ - --hash=sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d \ - --hash=sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689 \ - --hash=sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46 \ - --hash=sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28 \ - --hash=sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581 \ - --hash=sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01 \ - --hash=sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d \ - --hash=sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00 \ - --hash=sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72 \ - --hash=sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed \ - --hash=sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc \ - --hash=sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc \ - --hash=sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc \ - --hash=sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08 \ - --hash=sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e \ - --hash=sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa \ - --hash=sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3 \ - --hash=sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6 \ - --hash=sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93 \ - --hash=sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1 \ - --hash=sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee \ - --hash=sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902 \ - --hash=sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e \ - --hash=sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda \ - --hash=sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056 \ - --hash=sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9 \ - --hash=sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd \ - --hash=sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0 \ - --hash=sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89 \ - --hash=sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736 \ - --hash=sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a \ - --hash=sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038 \ - --hash=sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7 \ - --hash=sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b \ - --hash=sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f \ - --hash=sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f \ - --hash=sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c \ - --hash=sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8 \ - --hash=sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85 \ - --hash=sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4 \ - --hash=sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716 \ - --hash=sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393 \ - --hash=sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350 \ - --hash=sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74 \ - --hash=sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75 \ - --hash=sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422 \ - --hash=sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf \ - --hash=sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5 \ - --hash=sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0 \ - --hash=sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929 \ - --hash=sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af \ - --hash=sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a \ - --hash=sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c \ - --hash=sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993 \ - --hash=sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd \ - --hash=sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b \ - --hash=sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d \ - --hash=sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42 diff --git a/dev-requirements/flake8.txt b/dev-requirements/flake8.txt deleted file mode 100644 index 4bbd7e7c2..000000000 --- a/dev-requirements/flake8.txt +++ /dev/null @@ -1 +0,0 @@ --r ../piped/python/base-requirements/library-flake8.txt diff --git a/dev-requirements/tests.in b/dev-requirements/tests.in deleted file mode 100644 index 781c199b4..000000000 --- a/dev-requirements/tests.in +++ /dev/null @@ -1,9 +0,0 @@ --r ../piped/python/base-requirements/tests.in --r ./constraints.in - -freezegun>=1.2.2 -pytest-asyncio>=0.20.1 -pytest-timeout>=2.1 -pytest-xdist>=3.1 -# The pytest extensions aren't compatible with v8 yet. -pytest==7.4.0 diff --git a/dev-requirements/tests.txt b/dev-requirements/tests.txt deleted file mode 100644 index 4018795ab..000000000 --- a/dev-requirements/tests.txt +++ /dev/null @@ -1,583 +0,0 @@ -# -# This file is autogenerated by pip-compile-cross-platform -# To update, run: -# -# pip-compile-cross-platform dev-requirements/tests.in --output-file dev-requirements/tests.txt --min-python-version 3.11.0,<3.14 --generate-hashes -# -aiohappyeyeballs==2.4.3 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586 \ - --hash=sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572 -aiohttp==3.11.7 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:018f1b04883a12e77e7fc161934c0f298865d3a484aea536a6a2ca8d909f0ba0 \ - --hash=sha256:01a8aca4af3da85cea5c90141d23f4b0eee3cbecfd33b029a45a80f28c66c668 \ - --hash=sha256:04b0cc74d5a882c9dacaeeccc1444f0233212b6f5be8bc90833feef1e1ce14b9 \ - --hash=sha256:0de6466b9d742b4ee56fe1b2440706e225eb48c77c63152b1584864a236e7a50 \ - --hash=sha256:12724f3a211fa243570e601f65a8831372caf1a149d2f1859f68479f07efec3d \ - --hash=sha256:12e4d45847a174f77b2b9919719203769f220058f642b08504cf8b1cf185dacf \ - --hash=sha256:17829f37c0d31d89aa6b8b010475a10233774771f9b6dc2cc352ea4f8ce95d9a \ - --hash=sha256:1a17f6a230f81eb53282503823f59d61dff14fb2a93847bf0399dc8e87817307 \ - --hash=sha256:1cf03d27885f8c5ebf3993a220cc84fc66375e1e6e812731f51aab2b2748f4a6 \ - --hash=sha256:1fbf41a6bbc319a7816ae0f0177c265b62f2a59ad301a0e49b395746eb2a9884 \ - --hash=sha256:2257bdd5cf54a4039a4337162cd8048f05a724380a2283df34620f55d4e29341 \ - --hash=sha256:24054fce8c6d6f33a3e35d1c603ef1b91bbcba73e3f04a22b4f2f27dac59b347 \ - --hash=sha256:241a6ca732d2766836d62c58c49ca7a93d08251daef0c1e3c850df1d1ca0cbc4 \ - --hash=sha256:28c7af3e50e5903d21d7b935aceed901cc2475463bc16ddd5587653548661fdb \ - --hash=sha256:351849aca2c6f814575c1a485c01c17a4240413f960df1bf9f5deb0003c61a53 \ - --hash=sha256:3ce18f703b7298e7f7633efd6a90138d99a3f9a656cb52c1201e76cb5d79cf08 \ - --hash=sha256:3d1c9c15d3999107cbb9b2d76ca6172e6710a12fda22434ee8bd3f432b7b17e8 \ - --hash=sha256:3dd3e7e7c9ef3e7214f014f1ae260892286647b3cf7c7f1b644a568fd410f8ca \ - --hash=sha256:43bfd25113c1e98aec6c70e26d5f4331efbf4aa9037ba9ad88f090853bf64d7f \ - --hash=sha256:43dd89a6194f6ab02a3fe36b09e42e2df19c211fc2050ce37374d96f39604997 \ - --hash=sha256:481f10a1a45c5f4c4a578bbd74cff22eb64460a6549819242a87a80788461fba \ - --hash=sha256:4ba8d043fed7ffa117024d7ba66fdea011c0e7602327c6d73cacaea38abe4491 \ - --hash=sha256:4bb7493c3e3a36d3012b8564bd0e2783259ddd7ef3a81a74f0dbfa000fce48b7 \ - --hash=sha256:4c1a6309005acc4b2bcc577ba3b9169fea52638709ffacbd071f3503264620da \ - --hash=sha256:4dda726f89bfa5c465ba45b76515135a3ece0088dfa2da49b8bb278f3bdeea12 \ - --hash=sha256:53c921b58fdc6485d6b2603e0132bb01cd59b8f0620ffc0907f525e0ba071687 \ - --hash=sha256:5578cf40440eafcb054cf859964bc120ab52ebe0e0562d2b898126d868749629 \ - --hash=sha256:59ee1925b5a5efdf6c4e7be51deee93984d0ac14a6897bd521b498b9916f1544 \ - --hash=sha256:670847ee6aeb3a569cd7cdfbe0c3bec1d44828bbfbe78c5d305f7f804870ef9e \ - --hash=sha256:78c657ece7a73b976905ab9ec8be9ef2df12ed8984c24598a1791c58ce3b4ce4 \ - --hash=sha256:7a9318da4b4ada9a67c1dd84d1c0834123081e746bee311a16bb449f363d965e \ - --hash=sha256:7b2f8107a3c329789f3c00b2daad0e35f548d0a55cda6291579136622099a46e \ - --hash=sha256:7ea4490360b605804bea8173d2d086b6c379d6bb22ac434de605a9cbce006e7d \ - --hash=sha256:8360c7cc620abb320e1b8d603c39095101391a82b1d0be05fb2225471c9c5c52 \ - --hash=sha256:875f7100ce0e74af51d4139495eec4025affa1a605280f23990b6434b81df1bd \ - --hash=sha256:8bedb1f6cb919af3b6353921c71281b1491f948ca64408871465d889b4ee1b66 \ - --hash=sha256:8d20cfe63a1c135d26bde8c1d0ea46fd1200884afbc523466d2f1cf517d1fe33 \ - --hash=sha256:9202f184cc0582b1db15056f2225ab4c1e3dac4d9ade50dd0613ac3c46352ac2 \ - --hash=sha256:9acfc7f652b31853eed3b92095b0acf06fd5597eeea42e939bd23a17137679d5 \ - --hash=sha256:9d18a8b44ec8502a7fde91446cd9c9b95ce7c49f1eacc1fb2358b8907d4369fd \ - --hash=sha256:9e67531370a3b07e49b280c1f8c2df67985c790ad2834d1b288a2f13cd341c5f \ - --hash=sha256:9ee6a4cdcbf54b8083dc9723cdf5f41f722c00db40ccf9ec2616e27869151129 \ - --hash=sha256:a7d9a606355655617fee25dd7e54d3af50804d002f1fd3118dd6312d26692d70 \ - --hash=sha256:aa3705a8d14de39898da0fbad920b2a37b7547c3afd2a18b9b81f0223b7d0f68 \ - --hash=sha256:b7215bf2b53bc6cb35808149980c2ae80a4ae4e273890ac85459c014d5aa60ac \ - --hash=sha256:badda65ac99555791eed75e234afb94686ed2317670c68bff8a4498acdaee935 \ - --hash=sha256:bf0e6cce113596377cadda4e3ac5fb89f095bd492226e46d91b4baef1dd16f60 \ - --hash=sha256:c171fc35d3174bbf4787381716564042a4cbc008824d8195eede3d9b938e29a8 \ - --hash=sha256:c1f6490dd1862af5aae6cfcf2a274bffa9a5b32a8f5acb519a7ecf5a99a88866 \ - --hash=sha256:c25b74a811dba37c7ea6a14d99eb9402d89c8d739d50748a75f3cf994cf19c43 \ - --hash=sha256:c6095aaf852c34f42e1bd0cf0dc32d1e4b48a90bfb5054abdbb9d64b36acadcb \ - --hash=sha256:c63f898f683d1379b9be5afc3dd139e20b30b0b1e0bf69a3fc3681f364cf1629 \ - --hash=sha256:cd8d62cab363dfe713067027a5adb4907515861f1e4ce63e7be810b83668b847 \ - --hash=sha256:ce91a24aac80de6be8512fb1c4838a9881aa713f44f4e91dd7bb3b34061b497d \ - --hash=sha256:cea52d11e02123f125f9055dfe0ccf1c3857225fb879e4a944fae12989e2aef2 \ - --hash=sha256:cf4efa2d01f697a7dbd0509891a286a4af0d86902fc594e20e3b1712c28c0106 \ - --hash=sha256:d2fa6fc7cc865d26ff42480ac9b52b8c9b7da30a10a6442a9cdf429de840e949 \ - --hash=sha256:d329300fb23e14ed1f8c6d688dfd867d1dcc3b1d7cd49b7f8c5b44e797ce0932 \ - --hash=sha256:d6177077a31b1aecfc3c9070bd2f11419dbb4a70f30f4c65b124714f525c2e48 \ - --hash=sha256:db37248535d1ae40735d15bdf26ad43be19e3d93ab3f3dad8507eb0f85bb8124 \ - --hash=sha256:db70a47987e34494b451a334605bee57a126fe8d290511349e86810b4be53b01 \ - --hash=sha256:dcefcf2915a2dbdbce37e2fc1622129a1918abfe3d06721ce9f6cdac9b6d2eaa \ - --hash=sha256:dda3ed0a7869d2fa16aa41f9961ade73aa2c2e3b2fcb0a352524e7b744881889 \ - --hash=sha256:e0bf378db07df0a713a1e32381a1b277e62ad106d0dbe17b5479e76ec706d720 \ - --hash=sha256:e13a05db87d3b241c186d0936808d0e4e12decc267c617d54e9c643807e968b6 \ - --hash=sha256:e143b0ef9cb1a2b4f74f56d4fbe50caa7c2bb93390aff52f9398d21d89bc73ea \ - --hash=sha256:e22d1721c978a6494adc824e0916f9d187fa57baeda34b55140315fa2f740184 \ - --hash=sha256:e5522ee72f95661e79db691310290c4618b86dff2d9b90baedf343fd7a08bf79 \ - --hash=sha256:e993676c71288618eb07e20622572b1250d8713e7e00ab3aabae28cb70f3640d \ - --hash=sha256:ee9afa1b0d2293c46954f47f33e150798ad68b78925e3710044e0d67a9487791 \ - --hash=sha256:f1ac5462582d6561c1c1708853a9faf612ff4e5ea5e679e99be36143d6eabd8e \ - --hash=sha256:f5022504adab881e2d801a88b748ea63f2a9d130e0b2c430824682a96f6534be \ - --hash=sha256:f5b973cce96793725ef63eb449adfb74f99c043c718acb76e0d2a447ae369962 \ - --hash=sha256:f7c58a240260822dc07f6ae32a0293dd5bccd618bb2d0f36d51c5dbd526f89c0 \ - --hash=sha256:fc6da202068e0a268e298d7cd09b6e9f3997736cd9b060e2750963754552a0a9 \ - --hash=sha256:fdadc3f6a32d6eca45f9a900a254757fd7855dfb2d8f8dcf0e88f0fae3ff8eb1 -aiosignal==1.3.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc \ - --hash=sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17 -alluka==0.4.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:25ca19ffe47eab876ea1a6cc118af9b30dd075ac1bf706a248750ab38e0c5c9b \ - --hash=sha256:758f4d0623dc8e895949fedac8e9fb124cfdd412b9608ab5eba7f8db316692e0 -attrs==24.2.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 -colorama==0.4.6 ; python_full_version >= "3.11.0" and python_version < "3.14" and sys_platform == "win32" \ - --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ - --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 -colorlog==6.9.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff \ - --hash=sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2 -coverage[toml]==7.6.8 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5 \ - --hash=sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf \ - --hash=sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb \ - --hash=sha256:13618bed0c38acc418896005732e565b317aa9e98d855a0e9f211a7ffc2d6638 \ - --hash=sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4 \ - --hash=sha256:177f01eeaa3aee4a5ffb0d1439c5952b53d5010f86e9d2667963e632e30082cc \ - --hash=sha256:193e3bffca48ad74b8c764fb4492dd875038a2f9925530cb094db92bb5e47bed \ - --hash=sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a \ - --hash=sha256:1f188a2402f8359cf0c4b1fe89eea40dc13b52e7b4fd4812450da9fcd210181d \ - --hash=sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649 \ - --hash=sha256:24eda3a24a38157eee639ca9afe45eefa8d2420d49468819ac5f88b10de84f4c \ - --hash=sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b \ - --hash=sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4 \ - --hash=sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443 \ - --hash=sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83 \ - --hash=sha256:3985b9be361d8fb6b2d1adc9924d01dec575a1d7453a14cccd73225cb79243ee \ - --hash=sha256:3988665ee376abce49613701336544041f2117de7b7fbfe91b93d8ff8b151c8e \ - --hash=sha256:3ac47fa29d8d41059ea3df65bd3ade92f97ee4910ed638e87075b8e8ce69599e \ - --hash=sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3 \ - --hash=sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0 \ - --hash=sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb \ - --hash=sha256:428ac484592f780e8cd7b6b14eb568f7c85460c92e2a37cb0c0e5186e1a0d076 \ - --hash=sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb \ - --hash=sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787 \ - --hash=sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1 \ - --hash=sha256:4db3ed6a907b555e57cc2e6f14dc3a4c2458cdad8919e40b5357ab9b6db6c43e \ - --hash=sha256:5c52a036535d12590c32c49209e79cabaad9f9ad8aa4cbd875b68c4d67a9cbce \ - --hash=sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801 \ - --hash=sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764 \ - --hash=sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365 \ - --hash=sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf \ - --hash=sha256:644ec81edec0f4ad17d51c838a7d01e42811054543b76d4ba2c5d6af741ce2a6 \ - --hash=sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71 \ - --hash=sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002 \ - --hash=sha256:716a78a342679cd1177bc8c2fe957e0ab91405bd43a17094324845200b2fddf4 \ - --hash=sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c \ - --hash=sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8 \ - --hash=sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4 \ - --hash=sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146 \ - --hash=sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc \ - --hash=sha256:912e95017ff51dc3d7b6e2be158dedc889d9a5cc3382445589ce554f1a34c0ea \ - --hash=sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4 \ - --hash=sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad \ - --hash=sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28 \ - --hash=sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451 \ - --hash=sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50 \ - --hash=sha256:bd55f8fc8fa494958772a2a7302b0354ab16e0b9272b3c3d83cdb5bec5bd1779 \ - --hash=sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63 \ - --hash=sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e \ - --hash=sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc \ - --hash=sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022 \ - --hash=sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d \ - --hash=sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94 \ - --hash=sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b \ - --hash=sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d \ - --hash=sha256:e19122296822deafce89a0c5e8685704c067ae65d45e79718c92df7b3ec3d331 \ - --hash=sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a \ - --hash=sha256:e4c81ed2820b9023a9a90717020315e63b17b18c274a332e3b6437d7ff70abe0 \ - --hash=sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee \ - --hash=sha256:f39e2f3530ed1626c66e7493be7a8423b023ca852aacdc91fb30162c350d2a92 \ - --hash=sha256:f56f49b2553d7dd85fd86e029515a221e5c1f8cb3d9c38b470bc38bde7b8445a \ - --hash=sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9 -execnet==2.1.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc \ - --hash=sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3 -freezegun==1.5.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9 \ - --hash=sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1 -frozenlist==1.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e \ - --hash=sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf \ - --hash=sha256:04a5c6babd5e8fb7d3c871dc8b321166b80e41b637c31a995ed844a6139942b6 \ - --hash=sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a \ - --hash=sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d \ - --hash=sha256:0f253985bb515ecd89629db13cb58d702035ecd8cfbca7d7a7e29a0e6d39af5f \ - --hash=sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28 \ - --hash=sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b \ - --hash=sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9 \ - --hash=sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2 \ - --hash=sha256:15538c0cbf0e4fa11d1e3a71f823524b0c46299aed6e10ebb4c2089abd8c3bec \ - --hash=sha256:15b731db116ab3aedec558573c1a5eec78822b32292fe4f2f0345b7f697745c2 \ - --hash=sha256:17dcc32fc7bda7ce5875435003220a457bcfa34ab7924a49a1c19f55b6ee185c \ - --hash=sha256:1893f948bf6681733aaccf36c5232c231e3b5166d607c5fa77773611df6dc336 \ - --hash=sha256:189f03b53e64144f90990d29a27ec4f7997d91ed3d01b51fa39d2dbe77540fd4 \ - --hash=sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d \ - --hash=sha256:1b96af8c582b94d381a1c1f51ffaedeb77c821c690ea5f01da3d70a487dd0a9b \ - --hash=sha256:1e76bfbc72353269c44e0bc2cfe171900fbf7f722ad74c9a7b638052afe6a00c \ - --hash=sha256:2150cc6305a2c2ab33299453e2968611dacb970d2283a14955923062c8d00b10 \ - --hash=sha256:226d72559fa19babe2ccd920273e767c96a49b9d3d38badd7c91a0fdeda8ea08 \ - --hash=sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942 \ - --hash=sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8 \ - --hash=sha256:2b5e23253bb709ef57a8e95e6ae48daa9ac5f265637529e4ce6b003a37b2621f \ - --hash=sha256:2d0da8bbec082bf6bf18345b180958775363588678f64998c2b7609e34719b10 \ - --hash=sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5 \ - --hash=sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6 \ - --hash=sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21 \ - --hash=sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c \ - --hash=sha256:366d8f93e3edfe5a918c874702f78faac300209a4d5bf38352b2c1bdc07a766d \ - --hash=sha256:374ca2dabdccad8e2a76d40b1d037f5bd16824933bf7bcea3e59c891fd4a0923 \ - --hash=sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608 \ - --hash=sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de \ - --hash=sha256:498524025a5b8ba81695761d78c8dd7382ac0b052f34e66939c42df860b8ff17 \ - --hash=sha256:50cf5e7ee9b98f22bdecbabf3800ae78ddcc26e4a435515fc72d97903e8488e0 \ - --hash=sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f \ - --hash=sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641 \ - --hash=sha256:5a3ba5f9a0dfed20337d3e966dc359784c9f96503674c2faf015f7fe8e96798c \ - --hash=sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a \ - --hash=sha256:5c28f4b5dbef8a0d8aad0d4de24d1e9e981728628afaf4ea0792f5d0939372f0 \ - --hash=sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9 \ - --hash=sha256:6321899477db90bdeb9299ac3627a6a53c7399c8cd58d25da094007402b039ab \ - --hash=sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f \ - --hash=sha256:666534d15ba8f0fda3f53969117383d5dc021266b3c1a42c9ec4855e4b58b9d3 \ - --hash=sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a \ - --hash=sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784 \ - --hash=sha256:73f2e31ea8dd7df61a359b731716018c2be196e5bb3b74ddba107f694fbd7604 \ - --hash=sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d \ - --hash=sha256:76e4753701248476e6286f2ef492af900ea67d9706a0155335a40ea21bf3b2f5 \ - --hash=sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03 \ - --hash=sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e \ - --hash=sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953 \ - --hash=sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee \ - --hash=sha256:7f3c8c1dacd037df16e85227bac13cca58c30da836c6f936ba1df0c05d046d8d \ - --hash=sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817 \ - --hash=sha256:828afae9f17e6de596825cf4228ff28fbdf6065974e5ac1410cecc22f699d2b3 \ - --hash=sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039 \ - --hash=sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f \ - --hash=sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9 \ - --hash=sha256:91d6c171862df0a6c61479d9724f22efb6109111017c87567cfeb7b5d1449fdf \ - --hash=sha256:9272fa73ca71266702c4c3e2d4a28553ea03418e591e377a03b8e3659d94fa76 \ - --hash=sha256:92b5278ed9d50fe610185ecd23c55d8b307d75ca18e94c0e7de328089ac5dcba \ - --hash=sha256:97160e245ea33d8609cd2b8fd997c850b56db147a304a262abc2b3be021a9171 \ - --hash=sha256:977701c081c0241d0955c9586ffdd9ce44f7a7795df39b9151cd9a6fd0ce4cfb \ - --hash=sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439 \ - --hash=sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631 \ - --hash=sha256:9bbcdfaf4af7ce002694a4e10a0159d5a8d20056a12b05b45cea944a4953f972 \ - --hash=sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d \ - --hash=sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869 \ - --hash=sha256:a72b7a6e3cd2725eff67cd64c8f13335ee18fc3c7befc05aed043d24c7b9ccb9 \ - --hash=sha256:a9fe0f1c29ba24ba6ff6abf688cb0b7cf1efab6b6aa6adc55441773c252f7411 \ - --hash=sha256:b97f7b575ab4a8af9b7bc1d2ef7f29d3afee2226bd03ca3875c16451ad5a7723 \ - --hash=sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2 \ - --hash=sha256:c03eff4a41bd4e38415cbed054bbaff4a075b093e2394b6915dca34a40d1e38b \ - --hash=sha256:c16d2fa63e0800723139137d667e1056bee1a1cf7965153d2d104b62855e9b99 \ - --hash=sha256:c1fac3e2ace2eb1052e9f7c7db480818371134410e1f5c55d65e8f3ac6d1407e \ - --hash=sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840 \ - --hash=sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3 \ - --hash=sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb \ - --hash=sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3 \ - --hash=sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0 \ - --hash=sha256:dd94994fc91a6177bfaafd7d9fd951bc8689b0a98168aa26b5f543868548d3ca \ - --hash=sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45 \ - --hash=sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e \ - --hash=sha256:e66cc454f97053b79c2ab09c17fbe3c825ea6b4de20baf1be28919460dd7877f \ - --hash=sha256:e79225373c317ff1e35f210dd5f1344ff31066ba8067c307ab60254cd3a78ad5 \ - --hash=sha256:f1577515d35ed5649d52ab4319db757bb881ce3b2b796d7283e6634d99ace307 \ - --hash=sha256:f1e6540b7fa044eee0bb5111ada694cf3dc15f2b0347ca125ee9ca984d5e9e6e \ - --hash=sha256:f2ac49a9bedb996086057b75bf93538240538c6d9b38e57c82d51f75a73409d2 \ - --hash=sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778 \ - --hash=sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a \ - --hash=sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30 \ - --hash=sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a -hikari==2.1.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:36d2629f5f1df39d3edc7bb8f64996e82f6926f297e18ababcf753120f7f404b \ - --hash=sha256:498bc39d2777eb5ceeec63e3b08362dda39d966a0f2197867f94e8293bb4a277 -idna==3.10 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 -iniconfig==2.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \ - --hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 -multidict==6.1.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f \ - --hash=sha256:06809f4f0f7ab7ea2cabf9caca7d79c22c0758b58a71f9d32943ae13c7ace056 \ - --hash=sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761 \ - --hash=sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3 \ - --hash=sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b \ - --hash=sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6 \ - --hash=sha256:10524ebd769727ac77ef2278390fb0068d83f3acb7773792a5080f2b0abf7748 \ - --hash=sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966 \ - --hash=sha256:16e5f4bf4e603eb1fdd5d8180f1a25f30056f22e55ce51fb3d6ad4ab29f7d96f \ - --hash=sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1 \ - --hash=sha256:189f652a87e876098bbc67b4da1049afb5f5dfbaa310dd67c594b01c10388db6 \ - --hash=sha256:1ca0083e80e791cffc6efce7660ad24af66c8d4079d2a750b29001b53ff59ada \ - --hash=sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305 \ - --hash=sha256:2090f6a85cafc5b2db085124d752757c9d251548cedabe9bd31afe6363e0aff2 \ - --hash=sha256:20b9b5fbe0b88d0bdef2012ef7dee867f874b72528cf1d08f1d59b0e3850129d \ - --hash=sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a \ - --hash=sha256:22f3105d4fb15c8f57ff3959a58fcab6ce36814486500cd7485651230ad4d4ef \ - --hash=sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c \ - --hash=sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb \ - --hash=sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60 \ - --hash=sha256:3702ea6872c5a2a4eeefa6ffd36b042e9773f05b1f37ae3ef7264b1163c2dcf6 \ - --hash=sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4 \ - --hash=sha256:3914f5aaa0f36d5d60e8ece6a308ee1c9784cd75ec8151062614657a114c4478 \ - --hash=sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81 \ - --hash=sha256:3c8b88a2ccf5493b6c8da9076fb151ba106960a2df90c2633f342f120751a9e7 \ - --hash=sha256:3e97b5e938051226dc025ec80980c285b053ffb1e25a3db2a3aa3bc046bf7f56 \ - --hash=sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3 \ - --hash=sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6 \ - --hash=sha256:483a6aea59cb89904e1ceabd2b47368b5600fb7de78a6e4a2c2987b2d256cf30 \ - --hash=sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb \ - --hash=sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506 \ - --hash=sha256:4a9cb68166a34117d6646c0023c7b759bf197bee5ad4272f420a0141d7eb03a0 \ - --hash=sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925 \ - --hash=sha256:4e18b656c5e844539d506a0a06432274d7bd52a7487e6828c63a63d69185626c \ - --hash=sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6 \ - --hash=sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e \ - --hash=sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95 \ - --hash=sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2 \ - --hash=sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133 \ - --hash=sha256:5845c1fd4866bb5dd3125d89b90e57ed3138241540897de748cdf19de8a2fca2 \ - --hash=sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa \ - --hash=sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3 \ - --hash=sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3 \ - --hash=sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436 \ - --hash=sha256:682b987361e5fd7a139ed565e30d81fd81e9629acc7d925a205366877d8c8657 \ - --hash=sha256:6b5d83030255983181005e6cfbac1617ce9746b219bc2aad52201ad121226581 \ - --hash=sha256:6bb5992037f7a9eff7991ebe4273ea7f51f1c1c511e6a2ce511d0e7bdb754492 \ - --hash=sha256:73eae06aa53af2ea5270cc066dcaf02cc60d2994bbb2c4ef5764949257d10f43 \ - --hash=sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2 \ - --hash=sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2 \ - --hash=sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926 \ - --hash=sha256:87701f25a2352e5bf7454caa64757642734da9f6b11384c1f9d1a8e699758057 \ - --hash=sha256:9079dfc6a70abe341f521f78405b8949f96db48da98aeb43f9907f342f627cdc \ - --hash=sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80 \ - --hash=sha256:957cf8e4b6e123a9eea554fa7ebc85674674b713551de587eb318a2df3e00255 \ - --hash=sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1 \ - --hash=sha256:9f636b730f7e8cb19feb87094949ba54ee5357440b9658b2a32a5ce4bce53972 \ - --hash=sha256:a114d03b938376557927ab23f1e950827c3b893ccb94b62fd95d430fd0e5cf53 \ - --hash=sha256:a185f876e69897a6f3325c3f19f26a297fa058c5e456bfcff8015e9a27e83ae1 \ - --hash=sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423 \ - --hash=sha256:aa466da5b15ccea564bdab9c89175c762bc12825f4659c11227f515cee76fa4a \ - --hash=sha256:aaed8b0562be4a0876ee3b6946f6869b7bcdb571a5d1496683505944e268b160 \ - --hash=sha256:ab7c4ceb38d91570a650dba194e1ca87c2b543488fe9309b4212694174fd539c \ - --hash=sha256:ac10f4c2b9e770c4e393876e35a7046879d195cd123b4f116d299d442b335bcd \ - --hash=sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa \ - --hash=sha256:b1c416351ee6271b2f49b56ad7f308072f6f44b37118d69c2cad94f3fa8a40d5 \ - --hash=sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b \ - --hash=sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa \ - --hash=sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef \ - --hash=sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44 \ - --hash=sha256:c08be4f460903e5a9d0f76818db3250f12e9c344e79314d1d570fc69d7f4eae4 \ - --hash=sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156 \ - --hash=sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753 \ - --hash=sha256:ce2186a7df133a9c895dea3331ddc5ddad42cdd0d1ea2f0a51e5d161e4762f28 \ - --hash=sha256:d093be959277cb7dee84b801eb1af388b6ad3ca6a6b6bf1ed7585895789d027d \ - --hash=sha256:d094ddec350a2fb899fec68d8353c78233debde9b7d8b4beeafa70825f1c281a \ - --hash=sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304 \ - --hash=sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008 \ - --hash=sha256:d618649d4e70ac6efcbba75be98b26ef5078faad23592f9b51ca492953012429 \ - --hash=sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72 \ - --hash=sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399 \ - --hash=sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3 \ - --hash=sha256:db7457bac39421addd0c8449933ac32d8042aae84a14911a757ae6ca3eef1392 \ - --hash=sha256:e27bbb6d14416713a8bd7aaa1313c0fc8d44ee48d74497a0ff4c3a1b6ccb5167 \ - --hash=sha256:e617fb6b0b6953fffd762669610c1c4ffd05632c138d61ac7e14ad187870669c \ - --hash=sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774 \ - --hash=sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351 \ - --hash=sha256:f179dee3b863ab1c59580ff60f9d99f632f34ccb38bf67a33ec6b3ecadd0fd76 \ - --hash=sha256:f4c035da3f544b1882bac24115f3e2e8760f10a0107614fc9839fd232200b875 \ - --hash=sha256:f67f217af4b1ff66c68a87318012de788dd95fcfeb24cc889011f4e1c7454dfd \ - --hash=sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28 \ - --hash=sha256:ff3827aef427c89a25cc96ded1759271a93603aba9fb977a6d264648ebf989db -packaging==24.2 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \ - --hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f -pluggy==1.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1 \ - --hash=sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669 -propcache==0.2.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9 \ - --hash=sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763 \ - --hash=sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325 \ - --hash=sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb \ - --hash=sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b \ - --hash=sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09 \ - --hash=sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957 \ - --hash=sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68 \ - --hash=sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f \ - --hash=sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798 \ - --hash=sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418 \ - --hash=sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6 \ - --hash=sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162 \ - --hash=sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f \ - --hash=sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036 \ - --hash=sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8 \ - --hash=sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2 \ - --hash=sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110 \ - --hash=sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23 \ - --hash=sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8 \ - --hash=sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638 \ - --hash=sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a \ - --hash=sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44 \ - --hash=sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2 \ - --hash=sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2 \ - --hash=sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850 \ - --hash=sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136 \ - --hash=sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b \ - --hash=sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887 \ - --hash=sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89 \ - --hash=sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87 \ - --hash=sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348 \ - --hash=sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4 \ - --hash=sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861 \ - --hash=sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e \ - --hash=sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c \ - --hash=sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b \ - --hash=sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb \ - --hash=sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1 \ - --hash=sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de \ - --hash=sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354 \ - --hash=sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563 \ - --hash=sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5 \ - --hash=sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf \ - --hash=sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9 \ - --hash=sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12 \ - --hash=sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4 \ - --hash=sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5 \ - --hash=sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71 \ - --hash=sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9 \ - --hash=sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed \ - --hash=sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336 \ - --hash=sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90 \ - --hash=sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063 \ - --hash=sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad \ - --hash=sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6 \ - --hash=sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8 \ - --hash=sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e \ - --hash=sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2 \ - --hash=sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7 \ - --hash=sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d \ - --hash=sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d \ - --hash=sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df \ - --hash=sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b \ - --hash=sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178 \ - --hash=sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2 \ - --hash=sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630 \ - --hash=sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48 \ - --hash=sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61 \ - --hash=sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89 \ - --hash=sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb \ - --hash=sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3 \ - --hash=sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6 \ - --hash=sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562 \ - --hash=sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b \ - --hash=sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58 \ - --hash=sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db \ - --hash=sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99 \ - --hash=sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37 \ - --hash=sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83 \ - --hash=sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a \ - --hash=sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d \ - --hash=sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04 \ - --hash=sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70 \ - --hash=sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544 \ - --hash=sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394 \ - --hash=sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea \ - --hash=sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7 \ - --hash=sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1 \ - --hash=sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793 \ - --hash=sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577 \ - --hash=sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7 \ - --hash=sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57 \ - --hash=sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d \ - --hash=sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032 \ - --hash=sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d \ - --hash=sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016 \ - --hash=sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504 -pytest-asyncio==0.23.8 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2 \ - --hash=sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3 -pytest-cov==6.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35 \ - --hash=sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0 -pytest-sugar==1.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:6422e83258f5b0c04ce7c632176c7732cab5fdb909cb39cca5c9139f81276c0a \ - --hash=sha256:70ebcd8fc5795dc457ff8b69d266a4e2e8a74ae0c3edc749381c64b5246c8dfd -pytest-timeout==2.3.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:12397729125c6ecbdaca01035b9e5239d4db97352320af155b3f5de1ba5165d9 \ - --hash=sha256:68188cb703edfc6a18fad98dc25a3c61e9f24d644b0b70f33af545219fc7813e -pytest-xdist==3.6.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7 \ - --hash=sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d -pytest==7.4.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32 \ - --hash=sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a -python-dateutil==2.9.0.post0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ - --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 -six==1.16.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 -termcolor==2.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:37b17b5fc1e604945c2642c872a3764b5d547a48009871aea3edd3afa180afb8 \ - --hash=sha256:998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f -typing-extensions==4.12.2 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 -yarl==1.18.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075 \ - --hash=sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a \ - --hash=sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7 \ - --hash=sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8 \ - --hash=sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88 \ - --hash=sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc \ - --hash=sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced \ - --hash=sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b \ - --hash=sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df \ - --hash=sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715 \ - --hash=sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41 \ - --hash=sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5 \ - --hash=sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34 \ - --hash=sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf \ - --hash=sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e \ - --hash=sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0 \ - --hash=sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c \ - --hash=sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a \ - --hash=sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6 \ - --hash=sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1 \ - --hash=sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb \ - --hash=sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6 \ - --hash=sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17 \ - --hash=sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d \ - --hash=sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d \ - --hash=sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689 \ - --hash=sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46 \ - --hash=sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28 \ - --hash=sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581 \ - --hash=sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01 \ - --hash=sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d \ - --hash=sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00 \ - --hash=sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72 \ - --hash=sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed \ - --hash=sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc \ - --hash=sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc \ - --hash=sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc \ - --hash=sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08 \ - --hash=sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e \ - --hash=sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa \ - --hash=sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3 \ - --hash=sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6 \ - --hash=sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93 \ - --hash=sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1 \ - --hash=sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee \ - --hash=sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902 \ - --hash=sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e \ - --hash=sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda \ - --hash=sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056 \ - --hash=sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9 \ - --hash=sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd \ - --hash=sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0 \ - --hash=sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89 \ - --hash=sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736 \ - --hash=sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a \ - --hash=sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038 \ - --hash=sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7 \ - --hash=sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b \ - --hash=sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f \ - --hash=sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f \ - --hash=sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c \ - --hash=sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8 \ - --hash=sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85 \ - --hash=sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4 \ - --hash=sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716 \ - --hash=sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393 \ - --hash=sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350 \ - --hash=sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74 \ - --hash=sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75 \ - --hash=sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422 \ - --hash=sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf \ - --hash=sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5 \ - --hash=sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0 \ - --hash=sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929 \ - --hash=sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af \ - --hash=sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a \ - --hash=sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c \ - --hash=sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993 \ - --hash=sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd \ - --hash=sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b \ - --hash=sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d \ - --hash=sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42 diff --git a/dev-requirements/type-checking.in b/dev-requirements/type-checking.in deleted file mode 100644 index 8a5151ac3..000000000 --- a/dev-requirements/type-checking.in +++ /dev/null @@ -1,4 +0,0 @@ --r ./tests.in --r ../piped/python/base-requirements/nox.in --r ../piped/python/base-requirements/type-checking.in --r ./constraints.in diff --git a/dev-requirements/type-checking.txt b/dev-requirements/type-checking.txt deleted file mode 100644 index 59b17073d..000000000 --- a/dev-requirements/type-checking.txt +++ /dev/null @@ -1,643 +0,0 @@ -# -# This file is autogenerated by pip-compile-cross-platform -# To update, run: -# -# pip-compile-cross-platform dev-requirements/type-checking.in --output-file dev-requirements/type-checking.txt --min-python-version 3.11.0,<3.14 --generate-hashes -# -aiohappyeyeballs==2.4.3 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586 \ - --hash=sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572 -aiohttp==3.11.7 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:018f1b04883a12e77e7fc161934c0f298865d3a484aea536a6a2ca8d909f0ba0 \ - --hash=sha256:01a8aca4af3da85cea5c90141d23f4b0eee3cbecfd33b029a45a80f28c66c668 \ - --hash=sha256:04b0cc74d5a882c9dacaeeccc1444f0233212b6f5be8bc90833feef1e1ce14b9 \ - --hash=sha256:0de6466b9d742b4ee56fe1b2440706e225eb48c77c63152b1584864a236e7a50 \ - --hash=sha256:12724f3a211fa243570e601f65a8831372caf1a149d2f1859f68479f07efec3d \ - --hash=sha256:12e4d45847a174f77b2b9919719203769f220058f642b08504cf8b1cf185dacf \ - --hash=sha256:17829f37c0d31d89aa6b8b010475a10233774771f9b6dc2cc352ea4f8ce95d9a \ - --hash=sha256:1a17f6a230f81eb53282503823f59d61dff14fb2a93847bf0399dc8e87817307 \ - --hash=sha256:1cf03d27885f8c5ebf3993a220cc84fc66375e1e6e812731f51aab2b2748f4a6 \ - --hash=sha256:1fbf41a6bbc319a7816ae0f0177c265b62f2a59ad301a0e49b395746eb2a9884 \ - --hash=sha256:2257bdd5cf54a4039a4337162cd8048f05a724380a2283df34620f55d4e29341 \ - --hash=sha256:24054fce8c6d6f33a3e35d1c603ef1b91bbcba73e3f04a22b4f2f27dac59b347 \ - --hash=sha256:241a6ca732d2766836d62c58c49ca7a93d08251daef0c1e3c850df1d1ca0cbc4 \ - --hash=sha256:28c7af3e50e5903d21d7b935aceed901cc2475463bc16ddd5587653548661fdb \ - --hash=sha256:351849aca2c6f814575c1a485c01c17a4240413f960df1bf9f5deb0003c61a53 \ - --hash=sha256:3ce18f703b7298e7f7633efd6a90138d99a3f9a656cb52c1201e76cb5d79cf08 \ - --hash=sha256:3d1c9c15d3999107cbb9b2d76ca6172e6710a12fda22434ee8bd3f432b7b17e8 \ - --hash=sha256:3dd3e7e7c9ef3e7214f014f1ae260892286647b3cf7c7f1b644a568fd410f8ca \ - --hash=sha256:43bfd25113c1e98aec6c70e26d5f4331efbf4aa9037ba9ad88f090853bf64d7f \ - --hash=sha256:43dd89a6194f6ab02a3fe36b09e42e2df19c211fc2050ce37374d96f39604997 \ - --hash=sha256:481f10a1a45c5f4c4a578bbd74cff22eb64460a6549819242a87a80788461fba \ - --hash=sha256:4ba8d043fed7ffa117024d7ba66fdea011c0e7602327c6d73cacaea38abe4491 \ - --hash=sha256:4bb7493c3e3a36d3012b8564bd0e2783259ddd7ef3a81a74f0dbfa000fce48b7 \ - --hash=sha256:4c1a6309005acc4b2bcc577ba3b9169fea52638709ffacbd071f3503264620da \ - --hash=sha256:4dda726f89bfa5c465ba45b76515135a3ece0088dfa2da49b8bb278f3bdeea12 \ - --hash=sha256:53c921b58fdc6485d6b2603e0132bb01cd59b8f0620ffc0907f525e0ba071687 \ - --hash=sha256:5578cf40440eafcb054cf859964bc120ab52ebe0e0562d2b898126d868749629 \ - --hash=sha256:59ee1925b5a5efdf6c4e7be51deee93984d0ac14a6897bd521b498b9916f1544 \ - --hash=sha256:670847ee6aeb3a569cd7cdfbe0c3bec1d44828bbfbe78c5d305f7f804870ef9e \ - --hash=sha256:78c657ece7a73b976905ab9ec8be9ef2df12ed8984c24598a1791c58ce3b4ce4 \ - --hash=sha256:7a9318da4b4ada9a67c1dd84d1c0834123081e746bee311a16bb449f363d965e \ - --hash=sha256:7b2f8107a3c329789f3c00b2daad0e35f548d0a55cda6291579136622099a46e \ - --hash=sha256:7ea4490360b605804bea8173d2d086b6c379d6bb22ac434de605a9cbce006e7d \ - --hash=sha256:8360c7cc620abb320e1b8d603c39095101391a82b1d0be05fb2225471c9c5c52 \ - --hash=sha256:875f7100ce0e74af51d4139495eec4025affa1a605280f23990b6434b81df1bd \ - --hash=sha256:8bedb1f6cb919af3b6353921c71281b1491f948ca64408871465d889b4ee1b66 \ - --hash=sha256:8d20cfe63a1c135d26bde8c1d0ea46fd1200884afbc523466d2f1cf517d1fe33 \ - --hash=sha256:9202f184cc0582b1db15056f2225ab4c1e3dac4d9ade50dd0613ac3c46352ac2 \ - --hash=sha256:9acfc7f652b31853eed3b92095b0acf06fd5597eeea42e939bd23a17137679d5 \ - --hash=sha256:9d18a8b44ec8502a7fde91446cd9c9b95ce7c49f1eacc1fb2358b8907d4369fd \ - --hash=sha256:9e67531370a3b07e49b280c1f8c2df67985c790ad2834d1b288a2f13cd341c5f \ - --hash=sha256:9ee6a4cdcbf54b8083dc9723cdf5f41f722c00db40ccf9ec2616e27869151129 \ - --hash=sha256:a7d9a606355655617fee25dd7e54d3af50804d002f1fd3118dd6312d26692d70 \ - --hash=sha256:aa3705a8d14de39898da0fbad920b2a37b7547c3afd2a18b9b81f0223b7d0f68 \ - --hash=sha256:b7215bf2b53bc6cb35808149980c2ae80a4ae4e273890ac85459c014d5aa60ac \ - --hash=sha256:badda65ac99555791eed75e234afb94686ed2317670c68bff8a4498acdaee935 \ - --hash=sha256:bf0e6cce113596377cadda4e3ac5fb89f095bd492226e46d91b4baef1dd16f60 \ - --hash=sha256:c171fc35d3174bbf4787381716564042a4cbc008824d8195eede3d9b938e29a8 \ - --hash=sha256:c1f6490dd1862af5aae6cfcf2a274bffa9a5b32a8f5acb519a7ecf5a99a88866 \ - --hash=sha256:c25b74a811dba37c7ea6a14d99eb9402d89c8d739d50748a75f3cf994cf19c43 \ - --hash=sha256:c6095aaf852c34f42e1bd0cf0dc32d1e4b48a90bfb5054abdbb9d64b36acadcb \ - --hash=sha256:c63f898f683d1379b9be5afc3dd139e20b30b0b1e0bf69a3fc3681f364cf1629 \ - --hash=sha256:cd8d62cab363dfe713067027a5adb4907515861f1e4ce63e7be810b83668b847 \ - --hash=sha256:ce91a24aac80de6be8512fb1c4838a9881aa713f44f4e91dd7bb3b34061b497d \ - --hash=sha256:cea52d11e02123f125f9055dfe0ccf1c3857225fb879e4a944fae12989e2aef2 \ - --hash=sha256:cf4efa2d01f697a7dbd0509891a286a4af0d86902fc594e20e3b1712c28c0106 \ - --hash=sha256:d2fa6fc7cc865d26ff42480ac9b52b8c9b7da30a10a6442a9cdf429de840e949 \ - --hash=sha256:d329300fb23e14ed1f8c6d688dfd867d1dcc3b1d7cd49b7f8c5b44e797ce0932 \ - --hash=sha256:d6177077a31b1aecfc3c9070bd2f11419dbb4a70f30f4c65b124714f525c2e48 \ - --hash=sha256:db37248535d1ae40735d15bdf26ad43be19e3d93ab3f3dad8507eb0f85bb8124 \ - --hash=sha256:db70a47987e34494b451a334605bee57a126fe8d290511349e86810b4be53b01 \ - --hash=sha256:dcefcf2915a2dbdbce37e2fc1622129a1918abfe3d06721ce9f6cdac9b6d2eaa \ - --hash=sha256:dda3ed0a7869d2fa16aa41f9961ade73aa2c2e3b2fcb0a352524e7b744881889 \ - --hash=sha256:e0bf378db07df0a713a1e32381a1b277e62ad106d0dbe17b5479e76ec706d720 \ - --hash=sha256:e13a05db87d3b241c186d0936808d0e4e12decc267c617d54e9c643807e968b6 \ - --hash=sha256:e143b0ef9cb1a2b4f74f56d4fbe50caa7c2bb93390aff52f9398d21d89bc73ea \ - --hash=sha256:e22d1721c978a6494adc824e0916f9d187fa57baeda34b55140315fa2f740184 \ - --hash=sha256:e5522ee72f95661e79db691310290c4618b86dff2d9b90baedf343fd7a08bf79 \ - --hash=sha256:e993676c71288618eb07e20622572b1250d8713e7e00ab3aabae28cb70f3640d \ - --hash=sha256:ee9afa1b0d2293c46954f47f33e150798ad68b78925e3710044e0d67a9487791 \ - --hash=sha256:f1ac5462582d6561c1c1708853a9faf612ff4e5ea5e679e99be36143d6eabd8e \ - --hash=sha256:f5022504adab881e2d801a88b748ea63f2a9d130e0b2c430824682a96f6534be \ - --hash=sha256:f5b973cce96793725ef63eb449adfb74f99c043c718acb76e0d2a447ae369962 \ - --hash=sha256:f7c58a240260822dc07f6ae32a0293dd5bccd618bb2d0f36d51c5dbd526f89c0 \ - --hash=sha256:fc6da202068e0a268e298d7cd09b6e9f3997736cd9b060e2750963754552a0a9 \ - --hash=sha256:fdadc3f6a32d6eca45f9a900a254757fd7855dfb2d8f8dcf0e88f0fae3ff8eb1 -aiosignal==1.3.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc \ - --hash=sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17 -alluka==0.4.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:25ca19ffe47eab876ea1a6cc118af9b30dd075ac1bf706a248750ab38e0c5c9b \ - --hash=sha256:758f4d0623dc8e895949fedac8e9fb124cfdd412b9608ab5eba7f8db316692e0 -argcomplete==3.5.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:1a1d148bdaa3e3b93454900163403df41448a248af01b6e849edc5ac08e6c363 \ - --hash=sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4 -attrs==24.2.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346 \ - --hash=sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2 -colorama==0.4.6 ; python_full_version >= "3.11.0" and python_version < "3.14" and sys_platform == "win32" \ - --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ - --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6 -colorlog==6.9.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff \ - --hash=sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2 -coverage[toml]==7.6.8 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5 \ - --hash=sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf \ - --hash=sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb \ - --hash=sha256:13618bed0c38acc418896005732e565b317aa9e98d855a0e9f211a7ffc2d6638 \ - --hash=sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4 \ - --hash=sha256:177f01eeaa3aee4a5ffb0d1439c5952b53d5010f86e9d2667963e632e30082cc \ - --hash=sha256:193e3bffca48ad74b8c764fb4492dd875038a2f9925530cb094db92bb5e47bed \ - --hash=sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a \ - --hash=sha256:1f188a2402f8359cf0c4b1fe89eea40dc13b52e7b4fd4812450da9fcd210181d \ - --hash=sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649 \ - --hash=sha256:24eda3a24a38157eee639ca9afe45eefa8d2420d49468819ac5f88b10de84f4c \ - --hash=sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b \ - --hash=sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4 \ - --hash=sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443 \ - --hash=sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83 \ - --hash=sha256:3985b9be361d8fb6b2d1adc9924d01dec575a1d7453a14cccd73225cb79243ee \ - --hash=sha256:3988665ee376abce49613701336544041f2117de7b7fbfe91b93d8ff8b151c8e \ - --hash=sha256:3ac47fa29d8d41059ea3df65bd3ade92f97ee4910ed638e87075b8e8ce69599e \ - --hash=sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3 \ - --hash=sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0 \ - --hash=sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb \ - --hash=sha256:428ac484592f780e8cd7b6b14eb568f7c85460c92e2a37cb0c0e5186e1a0d076 \ - --hash=sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb \ - --hash=sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787 \ - --hash=sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1 \ - --hash=sha256:4db3ed6a907b555e57cc2e6f14dc3a4c2458cdad8919e40b5357ab9b6db6c43e \ - --hash=sha256:5c52a036535d12590c32c49209e79cabaad9f9ad8aa4cbd875b68c4d67a9cbce \ - --hash=sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801 \ - --hash=sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764 \ - --hash=sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365 \ - --hash=sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf \ - --hash=sha256:644ec81edec0f4ad17d51c838a7d01e42811054543b76d4ba2c5d6af741ce2a6 \ - --hash=sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71 \ - --hash=sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002 \ - --hash=sha256:716a78a342679cd1177bc8c2fe957e0ab91405bd43a17094324845200b2fddf4 \ - --hash=sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c \ - --hash=sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8 \ - --hash=sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4 \ - --hash=sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146 \ - --hash=sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc \ - --hash=sha256:912e95017ff51dc3d7b6e2be158dedc889d9a5cc3382445589ce554f1a34c0ea \ - --hash=sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4 \ - --hash=sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad \ - --hash=sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28 \ - --hash=sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451 \ - --hash=sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50 \ - --hash=sha256:bd55f8fc8fa494958772a2a7302b0354ab16e0b9272b3c3d83cdb5bec5bd1779 \ - --hash=sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63 \ - --hash=sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e \ - --hash=sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc \ - --hash=sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022 \ - --hash=sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d \ - --hash=sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94 \ - --hash=sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b \ - --hash=sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d \ - --hash=sha256:e19122296822deafce89a0c5e8685704c067ae65d45e79718c92df7b3ec3d331 \ - --hash=sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a \ - --hash=sha256:e4c81ed2820b9023a9a90717020315e63b17b18c274a332e3b6437d7ff70abe0 \ - --hash=sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee \ - --hash=sha256:f39e2f3530ed1626c66e7493be7a8423b023ca852aacdc91fb30162c350d2a92 \ - --hash=sha256:f56f49b2553d7dd85fd86e029515a221e5c1f8cb3d9c38b470bc38bde7b8445a \ - --hash=sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9 -distlib==0.3.9 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \ - --hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403 -execnet==2.1.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc \ - --hash=sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3 -filelock==3.16.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0 \ - --hash=sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435 -freezegun==1.5.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9 \ - --hash=sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1 -frozenlist==1.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e \ - --hash=sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf \ - --hash=sha256:04a5c6babd5e8fb7d3c871dc8b321166b80e41b637c31a995ed844a6139942b6 \ - --hash=sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a \ - --hash=sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d \ - --hash=sha256:0f253985bb515ecd89629db13cb58d702035ecd8cfbca7d7a7e29a0e6d39af5f \ - --hash=sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28 \ - --hash=sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b \ - --hash=sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9 \ - --hash=sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2 \ - --hash=sha256:15538c0cbf0e4fa11d1e3a71f823524b0c46299aed6e10ebb4c2089abd8c3bec \ - --hash=sha256:15b731db116ab3aedec558573c1a5eec78822b32292fe4f2f0345b7f697745c2 \ - --hash=sha256:17dcc32fc7bda7ce5875435003220a457bcfa34ab7924a49a1c19f55b6ee185c \ - --hash=sha256:1893f948bf6681733aaccf36c5232c231e3b5166d607c5fa77773611df6dc336 \ - --hash=sha256:189f03b53e64144f90990d29a27ec4f7997d91ed3d01b51fa39d2dbe77540fd4 \ - --hash=sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d \ - --hash=sha256:1b96af8c582b94d381a1c1f51ffaedeb77c821c690ea5f01da3d70a487dd0a9b \ - --hash=sha256:1e76bfbc72353269c44e0bc2cfe171900fbf7f722ad74c9a7b638052afe6a00c \ - --hash=sha256:2150cc6305a2c2ab33299453e2968611dacb970d2283a14955923062c8d00b10 \ - --hash=sha256:226d72559fa19babe2ccd920273e767c96a49b9d3d38badd7c91a0fdeda8ea08 \ - --hash=sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942 \ - --hash=sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8 \ - --hash=sha256:2b5e23253bb709ef57a8e95e6ae48daa9ac5f265637529e4ce6b003a37b2621f \ - --hash=sha256:2d0da8bbec082bf6bf18345b180958775363588678f64998c2b7609e34719b10 \ - --hash=sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5 \ - --hash=sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6 \ - --hash=sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21 \ - --hash=sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c \ - --hash=sha256:366d8f93e3edfe5a918c874702f78faac300209a4d5bf38352b2c1bdc07a766d \ - --hash=sha256:374ca2dabdccad8e2a76d40b1d037f5bd16824933bf7bcea3e59c891fd4a0923 \ - --hash=sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608 \ - --hash=sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de \ - --hash=sha256:498524025a5b8ba81695761d78c8dd7382ac0b052f34e66939c42df860b8ff17 \ - --hash=sha256:50cf5e7ee9b98f22bdecbabf3800ae78ddcc26e4a435515fc72d97903e8488e0 \ - --hash=sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f \ - --hash=sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641 \ - --hash=sha256:5a3ba5f9a0dfed20337d3e966dc359784c9f96503674c2faf015f7fe8e96798c \ - --hash=sha256:5b6a66c18b5b9dd261ca98dffcb826a525334b2f29e7caa54e182255c5f6a65a \ - --hash=sha256:5c28f4b5dbef8a0d8aad0d4de24d1e9e981728628afaf4ea0792f5d0939372f0 \ - --hash=sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9 \ - --hash=sha256:6321899477db90bdeb9299ac3627a6a53c7399c8cd58d25da094007402b039ab \ - --hash=sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f \ - --hash=sha256:666534d15ba8f0fda3f53969117383d5dc021266b3c1a42c9ec4855e4b58b9d3 \ - --hash=sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a \ - --hash=sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784 \ - --hash=sha256:73f2e31ea8dd7df61a359b731716018c2be196e5bb3b74ddba107f694fbd7604 \ - --hash=sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d \ - --hash=sha256:76e4753701248476e6286f2ef492af900ea67d9706a0155335a40ea21bf3b2f5 \ - --hash=sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03 \ - --hash=sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e \ - --hash=sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953 \ - --hash=sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee \ - --hash=sha256:7f3c8c1dacd037df16e85227bac13cca58c30da836c6f936ba1df0c05d046d8d \ - --hash=sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817 \ - --hash=sha256:828afae9f17e6de596825cf4228ff28fbdf6065974e5ac1410cecc22f699d2b3 \ - --hash=sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039 \ - --hash=sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f \ - --hash=sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9 \ - --hash=sha256:91d6c171862df0a6c61479d9724f22efb6109111017c87567cfeb7b5d1449fdf \ - --hash=sha256:9272fa73ca71266702c4c3e2d4a28553ea03418e591e377a03b8e3659d94fa76 \ - --hash=sha256:92b5278ed9d50fe610185ecd23c55d8b307d75ca18e94c0e7de328089ac5dcba \ - --hash=sha256:97160e245ea33d8609cd2b8fd997c850b56db147a304a262abc2b3be021a9171 \ - --hash=sha256:977701c081c0241d0955c9586ffdd9ce44f7a7795df39b9151cd9a6fd0ce4cfb \ - --hash=sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439 \ - --hash=sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631 \ - --hash=sha256:9bbcdfaf4af7ce002694a4e10a0159d5a8d20056a12b05b45cea944a4953f972 \ - --hash=sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d \ - --hash=sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869 \ - --hash=sha256:a72b7a6e3cd2725eff67cd64c8f13335ee18fc3c7befc05aed043d24c7b9ccb9 \ - --hash=sha256:a9fe0f1c29ba24ba6ff6abf688cb0b7cf1efab6b6aa6adc55441773c252f7411 \ - --hash=sha256:b97f7b575ab4a8af9b7bc1d2ef7f29d3afee2226bd03ca3875c16451ad5a7723 \ - --hash=sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2 \ - --hash=sha256:c03eff4a41bd4e38415cbed054bbaff4a075b093e2394b6915dca34a40d1e38b \ - --hash=sha256:c16d2fa63e0800723139137d667e1056bee1a1cf7965153d2d104b62855e9b99 \ - --hash=sha256:c1fac3e2ace2eb1052e9f7c7db480818371134410e1f5c55d65e8f3ac6d1407e \ - --hash=sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840 \ - --hash=sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3 \ - --hash=sha256:d1b3eb7b05ea246510b43a7e53ed1653e55c2121019a97e60cad7efb881a97bb \ - --hash=sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3 \ - --hash=sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0 \ - --hash=sha256:dd94994fc91a6177bfaafd7d9fd951bc8689b0a98168aa26b5f543868548d3ca \ - --hash=sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45 \ - --hash=sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e \ - --hash=sha256:e66cc454f97053b79c2ab09c17fbe3c825ea6b4de20baf1be28919460dd7877f \ - --hash=sha256:e79225373c317ff1e35f210dd5f1344ff31066ba8067c307ab60254cd3a78ad5 \ - --hash=sha256:f1577515d35ed5649d52ab4319db757bb881ce3b2b796d7283e6634d99ace307 \ - --hash=sha256:f1e6540b7fa044eee0bb5111ada694cf3dc15f2b0347ca125ee9ca984d5e9e6e \ - --hash=sha256:f2ac49a9bedb996086057b75bf93538240538c6d9b38e57c82d51f75a73409d2 \ - --hash=sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778 \ - --hash=sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a \ - --hash=sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30 \ - --hash=sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a -hikari==2.1.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:36d2629f5f1df39d3edc7bb8f64996e82f6926f297e18ababcf753120f7f404b \ - --hash=sha256:498bc39d2777eb5ceeec63e3b08362dda39d966a0f2197867f94e8293bb4a277 -idna==3.10 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \ - --hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3 -iniconfig==2.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \ - --hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 -multidict==6.1.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f \ - --hash=sha256:06809f4f0f7ab7ea2cabf9caca7d79c22c0758b58a71f9d32943ae13c7ace056 \ - --hash=sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761 \ - --hash=sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3 \ - --hash=sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b \ - --hash=sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6 \ - --hash=sha256:10524ebd769727ac77ef2278390fb0068d83f3acb7773792a5080f2b0abf7748 \ - --hash=sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966 \ - --hash=sha256:16e5f4bf4e603eb1fdd5d8180f1a25f30056f22e55ce51fb3d6ad4ab29f7d96f \ - --hash=sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1 \ - --hash=sha256:189f652a87e876098bbc67b4da1049afb5f5dfbaa310dd67c594b01c10388db6 \ - --hash=sha256:1ca0083e80e791cffc6efce7660ad24af66c8d4079d2a750b29001b53ff59ada \ - --hash=sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305 \ - --hash=sha256:2090f6a85cafc5b2db085124d752757c9d251548cedabe9bd31afe6363e0aff2 \ - --hash=sha256:20b9b5fbe0b88d0bdef2012ef7dee867f874b72528cf1d08f1d59b0e3850129d \ - --hash=sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a \ - --hash=sha256:22f3105d4fb15c8f57ff3959a58fcab6ce36814486500cd7485651230ad4d4ef \ - --hash=sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c \ - --hash=sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb \ - --hash=sha256:3380252550e372e8511d49481bd836264c009adb826b23fefcc5dd3c69692f60 \ - --hash=sha256:3702ea6872c5a2a4eeefa6ffd36b042e9773f05b1f37ae3ef7264b1163c2dcf6 \ - --hash=sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4 \ - --hash=sha256:3914f5aaa0f36d5d60e8ece6a308ee1c9784cd75ec8151062614657a114c4478 \ - --hash=sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81 \ - --hash=sha256:3c8b88a2ccf5493b6c8da9076fb151ba106960a2df90c2633f342f120751a9e7 \ - --hash=sha256:3e97b5e938051226dc025ec80980c285b053ffb1e25a3db2a3aa3bc046bf7f56 \ - --hash=sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3 \ - --hash=sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6 \ - --hash=sha256:483a6aea59cb89904e1ceabd2b47368b5600fb7de78a6e4a2c2987b2d256cf30 \ - --hash=sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb \ - --hash=sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506 \ - --hash=sha256:4a9cb68166a34117d6646c0023c7b759bf197bee5ad4272f420a0141d7eb03a0 \ - --hash=sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925 \ - --hash=sha256:4e18b656c5e844539d506a0a06432274d7bd52a7487e6828c63a63d69185626c \ - --hash=sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6 \ - --hash=sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e \ - --hash=sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95 \ - --hash=sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2 \ - --hash=sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133 \ - --hash=sha256:5845c1fd4866bb5dd3125d89b90e57ed3138241540897de748cdf19de8a2fca2 \ - --hash=sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa \ - --hash=sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3 \ - --hash=sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3 \ - --hash=sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436 \ - --hash=sha256:682b987361e5fd7a139ed565e30d81fd81e9629acc7d925a205366877d8c8657 \ - --hash=sha256:6b5d83030255983181005e6cfbac1617ce9746b219bc2aad52201ad121226581 \ - --hash=sha256:6bb5992037f7a9eff7991ebe4273ea7f51f1c1c511e6a2ce511d0e7bdb754492 \ - --hash=sha256:73eae06aa53af2ea5270cc066dcaf02cc60d2994bbb2c4ef5764949257d10f43 \ - --hash=sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2 \ - --hash=sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2 \ - --hash=sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926 \ - --hash=sha256:87701f25a2352e5bf7454caa64757642734da9f6b11384c1f9d1a8e699758057 \ - --hash=sha256:9079dfc6a70abe341f521f78405b8949f96db48da98aeb43f9907f342f627cdc \ - --hash=sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80 \ - --hash=sha256:957cf8e4b6e123a9eea554fa7ebc85674674b713551de587eb318a2df3e00255 \ - --hash=sha256:99f826cbf970077383d7de805c0681799491cb939c25450b9b5b3ced03ca99f1 \ - --hash=sha256:9f636b730f7e8cb19feb87094949ba54ee5357440b9658b2a32a5ce4bce53972 \ - --hash=sha256:a114d03b938376557927ab23f1e950827c3b893ccb94b62fd95d430fd0e5cf53 \ - --hash=sha256:a185f876e69897a6f3325c3f19f26a297fa058c5e456bfcff8015e9a27e83ae1 \ - --hash=sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423 \ - --hash=sha256:aa466da5b15ccea564bdab9c89175c762bc12825f4659c11227f515cee76fa4a \ - --hash=sha256:aaed8b0562be4a0876ee3b6946f6869b7bcdb571a5d1496683505944e268b160 \ - --hash=sha256:ab7c4ceb38d91570a650dba194e1ca87c2b543488fe9309b4212694174fd539c \ - --hash=sha256:ac10f4c2b9e770c4e393876e35a7046879d195cd123b4f116d299d442b335bcd \ - --hash=sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa \ - --hash=sha256:b1c416351ee6271b2f49b56ad7f308072f6f44b37118d69c2cad94f3fa8a40d5 \ - --hash=sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b \ - --hash=sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa \ - --hash=sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef \ - --hash=sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44 \ - --hash=sha256:c08be4f460903e5a9d0f76818db3250f12e9c344e79314d1d570fc69d7f4eae4 \ - --hash=sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156 \ - --hash=sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753 \ - --hash=sha256:ce2186a7df133a9c895dea3331ddc5ddad42cdd0d1ea2f0a51e5d161e4762f28 \ - --hash=sha256:d093be959277cb7dee84b801eb1af388b6ad3ca6a6b6bf1ed7585895789d027d \ - --hash=sha256:d094ddec350a2fb899fec68d8353c78233debde9b7d8b4beeafa70825f1c281a \ - --hash=sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304 \ - --hash=sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008 \ - --hash=sha256:d618649d4e70ac6efcbba75be98b26ef5078faad23592f9b51ca492953012429 \ - --hash=sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72 \ - --hash=sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399 \ - --hash=sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3 \ - --hash=sha256:db7457bac39421addd0c8449933ac32d8042aae84a14911a757ae6ca3eef1392 \ - --hash=sha256:e27bbb6d14416713a8bd7aaa1313c0fc8d44ee48d74497a0ff4c3a1b6ccb5167 \ - --hash=sha256:e617fb6b0b6953fffd762669610c1c4ffd05632c138d61ac7e14ad187870669c \ - --hash=sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774 \ - --hash=sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351 \ - --hash=sha256:f179dee3b863ab1c59580ff60f9d99f632f34ccb38bf67a33ec6b3ecadd0fd76 \ - --hash=sha256:f4c035da3f544b1882bac24115f3e2e8760f10a0107614fc9839fd232200b875 \ - --hash=sha256:f67f217af4b1ff66c68a87318012de788dd95fcfeb24cc889011f4e1c7454dfd \ - --hash=sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28 \ - --hash=sha256:ff3827aef427c89a25cc96ded1759271a93603aba9fb977a6d264648ebf989db -mypy-extensions==1.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d \ - --hash=sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782 -mypy==1.13.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc \ - --hash=sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e \ - --hash=sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f \ - --hash=sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74 \ - --hash=sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a \ - --hash=sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2 \ - --hash=sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b \ - --hash=sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73 \ - --hash=sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e \ - --hash=sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d \ - --hash=sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d \ - --hash=sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6 \ - --hash=sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca \ - --hash=sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d \ - --hash=sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5 \ - --hash=sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62 \ - --hash=sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a \ - --hash=sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc \ - --hash=sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7 \ - --hash=sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb \ - --hash=sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7 \ - --hash=sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732 \ - --hash=sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80 \ - --hash=sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a \ - --hash=sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc \ - --hash=sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2 \ - --hash=sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0 \ - --hash=sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24 \ - --hash=sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7 \ - --hash=sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b \ - --hash=sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372 \ - --hash=sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8 -nodeenv==1.9.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ - --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 -nox==2024.10.9 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:1d36f309a0a2a853e9bccb76bbef6bb118ba92fa92674d15604ca99adeb29eab \ - --hash=sha256:7aa9dc8d1c27e9f45ab046ffd1c3b2c4f7c91755304769df231308849ebded95 -packaging==24.2 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \ - --hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f -platformdirs==4.3.6 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ - --hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb -pluggy==1.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1 \ - --hash=sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669 -propcache==0.2.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9 \ - --hash=sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763 \ - --hash=sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325 \ - --hash=sha256:140fbf08ab3588b3468932974a9331aff43c0ab8a2ec2c608b6d7d1756dbb6cb \ - --hash=sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b \ - --hash=sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09 \ - --hash=sha256:1ec43d76b9677637a89d6ab86e1fef70d739217fefa208c65352ecf0282be957 \ - --hash=sha256:20a617c776f520c3875cf4511e0d1db847a076d720714ae35ffe0df3e440be68 \ - --hash=sha256:218db2a3c297a3768c11a34812e63b3ac1c3234c3a086def9c0fee50d35add1f \ - --hash=sha256:22aa8f2272d81d9317ff5756bb108021a056805ce63dd3630e27d042c8092798 \ - --hash=sha256:25a1f88b471b3bc911d18b935ecb7115dff3a192b6fef46f0bfaf71ff4f12418 \ - --hash=sha256:25c8d773a62ce0451b020c7b29a35cfbc05de8b291163a7a0f3b7904f27253e6 \ - --hash=sha256:2a60ad3e2553a74168d275a0ef35e8c0a965448ffbc3b300ab3a5bb9956c2162 \ - --hash=sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f \ - --hash=sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036 \ - --hash=sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8 \ - --hash=sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2 \ - --hash=sha256:33ac8f098df0585c0b53009f039dfd913b38c1d2edafed0cedcc0c32a05aa110 \ - --hash=sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23 \ - --hash=sha256:363ea8cd3c5cb6679f1c2f5f1f9669587361c062e4899fce56758efa928728f8 \ - --hash=sha256:375a12d7556d462dc64d70475a9ee5982465fbb3d2b364f16b86ba9135793638 \ - --hash=sha256:388f3217649d6d59292b722d940d4d2e1e6a7003259eb835724092a1cca0203a \ - --hash=sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44 \ - --hash=sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2 \ - --hash=sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2 \ - --hash=sha256:3dfafb44f7bb35c0c06eda6b2ab4bfd58f02729e7c4045e179f9a861b07c9850 \ - --hash=sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136 \ - --hash=sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b \ - --hash=sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887 \ - --hash=sha256:4569158070180c3855e9c0791c56be3ceeb192defa2cdf6a3f39e54319e56b89 \ - --hash=sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87 \ - --hash=sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348 \ - --hash=sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4 \ - --hash=sha256:53d1bd3f979ed529f0805dd35ddaca330f80a9a6d90bc0121d2ff398f8ed8861 \ - --hash=sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e \ - --hash=sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c \ - --hash=sha256:56bb5c98f058a41bb58eead194b4db8c05b088c93d94d5161728515bd52b052b \ - --hash=sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb \ - --hash=sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1 \ - --hash=sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de \ - --hash=sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354 \ - --hash=sha256:662dd62358bdeaca0aee5761de8727cfd6861432e3bb828dc2a693aa0471a563 \ - --hash=sha256:676135dcf3262c9c5081cc8f19ad55c8a64e3f7282a21266d05544450bffc3a5 \ - --hash=sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf \ - --hash=sha256:67b69535c870670c9f9b14a75d28baa32221d06f6b6fa6f77a0a13c5a7b0a5b9 \ - --hash=sha256:682a7c79a2fbf40f5dbb1eb6bfe2cd865376deeac65acf9beb607505dced9e12 \ - --hash=sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4 \ - --hash=sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5 \ - --hash=sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71 \ - --hash=sha256:73e4b40ea0eda421b115248d7e79b59214411109a5bc47d0d48e4c73e3b8fcf9 \ - --hash=sha256:74acd6e291f885678631b7ebc85d2d4aec458dd849b8c841b57ef04047833bed \ - --hash=sha256:7665f04d0c7f26ff8bb534e1c65068409bf4687aa2534faf7104d7182debb336 \ - --hash=sha256:7735e82e3498c27bcb2d17cb65d62c14f1100b71723b68362872bca7d0913d90 \ - --hash=sha256:77a86c261679ea5f3896ec060be9dc8e365788248cc1e049632a1be682442063 \ - --hash=sha256:7cf18abf9764746b9c8704774d8b06714bcb0a63641518a3a89c7f85cc02c2ad \ - --hash=sha256:83928404adf8fb3d26793665633ea79b7361efa0287dfbd372a7e74311d51ee6 \ - --hash=sha256:8e40876731f99b6f3c897b66b803c9e1c07a989b366c6b5b475fafd1f7ba3fb8 \ - --hash=sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e \ - --hash=sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2 \ - --hash=sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7 \ - --hash=sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d \ - --hash=sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d \ - --hash=sha256:9517d5e9e0731957468c29dbfd0f976736a0e55afaea843726e887f36fe017df \ - --hash=sha256:952e0d9d07609d9c5be361f33b0d6d650cd2bae393aabb11d9b719364521984b \ - --hash=sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178 \ - --hash=sha256:97e48e8875e6c13909c800fa344cd54cc4b2b0db1d5f911f840458a500fde2c2 \ - --hash=sha256:9e0f07b42d2a50c7dd2d8675d50f7343d998c64008f1da5fef888396b7f84630 \ - --hash=sha256:a3dc1a4b165283bd865e8f8cb5f0c64c05001e0718ed06250d8cac9bec115b48 \ - --hash=sha256:a3ebe9a75be7ab0b7da2464a77bb27febcb4fab46a34f9288f39d74833db7f61 \ - --hash=sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89 \ - --hash=sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb \ - --hash=sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3 \ - --hash=sha256:b33d7a286c0dc1a15f5fc864cc48ae92a846df287ceac2dd499926c3801054a6 \ - --hash=sha256:bc092ba439d91df90aea38168e11f75c655880c12782facf5cf9c00f3d42b562 \ - --hash=sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b \ - --hash=sha256:c5869b8fd70b81835a6f187c5fdbe67917a04d7e52b6e7cc4e5fe39d55c39d58 \ - --hash=sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db \ - --hash=sha256:cfac69017ef97db2438efb854edf24f5a29fd09a536ff3a992b75990720cdc99 \ - --hash=sha256:d2f0d0f976985f85dfb5f3d685697ef769faa6b71993b46b295cdbbd6be8cc37 \ - --hash=sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83 \ - --hash=sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a \ - --hash=sha256:d9b6ddac6408194e934002a69bcaadbc88c10b5f38fb9307779d1c629181815d \ - --hash=sha256:db47514ffdbd91ccdc7e6f8407aac4ee94cc871b15b577c1c324236b013ddd04 \ - --hash=sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70 \ - --hash=sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544 \ - --hash=sha256:e63e3e1e0271f374ed489ff5ee73d4b6e7c60710e1f76af5f0e1a6117cd26394 \ - --hash=sha256:e70fac33e8b4ac63dfc4c956fd7d85a0b1139adcfc0d964ce288b7c527537fea \ - --hash=sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7 \ - --hash=sha256:f45eec587dafd4b2d41ac189c2156461ebd0c1082d2fe7013571598abb8505d1 \ - --hash=sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793 \ - --hash=sha256:f571aea50ba5623c308aa146eb650eebf7dbe0fd8c5d946e28343cb3b5aad577 \ - --hash=sha256:f60f0ac7005b9f5a6091009b09a419ace1610e163fa5deaba5ce3484341840e7 \ - --hash=sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57 \ - --hash=sha256:f6d5749fdd33d90e34c2efb174c7e236829147a2713334d708746e94c4bde40d \ - --hash=sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032 \ - --hash=sha256:fa1076244f54bb76e65e22cb6910365779d5c3d71d1f18b275f1dfc7b0d71b4d \ - --hash=sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016 \ - --hash=sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504 -pyright==1.1.389 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:41e9620bba9254406dc1f621a88ceab5a88af4c826feb4f614d95691ed243a60 \ - --hash=sha256:716bf8cc174ab8b4dcf6828c3298cac05c5ed775dda9910106a5dcfe4c7fe220 -pytest-asyncio==0.23.8 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2 \ - --hash=sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3 -pytest-cov==6.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35 \ - --hash=sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0 -pytest-sugar==1.0.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:6422e83258f5b0c04ce7c632176c7732cab5fdb909cb39cca5c9139f81276c0a \ - --hash=sha256:70ebcd8fc5795dc457ff8b69d266a4e2e8a74ae0c3edc749381c64b5246c8dfd -pytest-timeout==2.3.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:12397729125c6ecbdaca01035b9e5239d4db97352320af155b3f5de1ba5165d9 \ - --hash=sha256:68188cb703edfc6a18fad98dc25a3c61e9f24d644b0b70f33af545219fc7813e -pytest-xdist==3.6.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7 \ - --hash=sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d -pytest==7.4.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32 \ - --hash=sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a -python-dateutil==2.9.0.post0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ - --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 -six==1.16.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 -termcolor==2.5.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:37b17b5fc1e604945c2642c872a3764b5d547a48009871aea3edd3afa180afb8 \ - --hash=sha256:998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f -typing-extensions==4.12.2 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ - --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 -virtualenv==20.27.1 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba \ - --hash=sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4 -yarl==1.18.0 ; python_full_version >= "3.11.0" and python_version < "3.14" \ - --hash=sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075 \ - --hash=sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a \ - --hash=sha256:074fee89caab89a97e18ef5f29060ef61ba3cae6cd77673acc54bfdd3214b7b7 \ - --hash=sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8 \ - --hash=sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88 \ - --hash=sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc \ - --hash=sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced \ - --hash=sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b \ - --hash=sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df \ - --hash=sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715 \ - --hash=sha256:20de4a8b04de70c49698dc2390b7fd2d18d424d3b876371f9b775e2b462d4b41 \ - --hash=sha256:2d90f2e4d16a5b0915ee065218b435d2ef619dd228973b1b47d262a6f7cd8fa5 \ - --hash=sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34 \ - --hash=sha256:309f8d27d6f93ceeeb80aa6980e883aa57895270f7f41842b92247e65d7aeddf \ - --hash=sha256:32141e13a1d5a48525e519c9197d3f4d9744d818d5c7d6547524cc9eccc8971e \ - --hash=sha256:34176bfb082add67cb2a20abd85854165540891147f88b687a5ed0dc225750a0 \ - --hash=sha256:38b39b7b3e692b6c92b986b00137a3891eddb66311b229d1940dcbd4f025083c \ - --hash=sha256:3a3709450a574d61be6ac53d582496014342ea34876af8dc17cc16da32826c9a \ - --hash=sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6 \ - --hash=sha256:3f576ed278860df2721a5d57da3381040176ef1d07def9688a385c8330db61a1 \ - --hash=sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb \ - --hash=sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6 \ - --hash=sha256:466d31fd043ef9af822ee3f1df8fdff4e8c199a7f4012c2642006af240eade17 \ - --hash=sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d \ - --hash=sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d \ - --hash=sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689 \ - --hash=sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46 \ - --hash=sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28 \ - --hash=sha256:609ffd44fed2ed88d9b4ef62ee860cf86446cf066333ad4ce4123505b819e581 \ - --hash=sha256:67b336c15e564d76869c9a21316f90edf546809a5796a083b8f57c845056bc01 \ - --hash=sha256:685cc37f3f307c6a8e879986c6d85328f4c637f002e219f50e2ef66f7e062c1d \ - --hash=sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00 \ - --hash=sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72 \ - --hash=sha256:701bb4a8f4de191c8c0cc9a1e6d5142f4df880e9d1210e333b829ca9425570ed \ - --hash=sha256:73553bbeea7d6ec88c08ad8027f4e992798f0abc459361bf06641c71972794dc \ - --hash=sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc \ - --hash=sha256:7609b8462351c4836b3edce4201acb6dd46187b207c589b30a87ffd1813b48dc \ - --hash=sha256:7db9584235895a1dffca17e1c634b13870852094f6389b68dcc6338086aa7b08 \ - --hash=sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e \ - --hash=sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa \ - --hash=sha256:8254dbfce84ee5d1e81051ee7a0f1536c108ba294c0fdb5933476398df0654f3 \ - --hash=sha256:8b8d3e4e014fb4274f1c5bf61511d2199e263909fb0b8bda2a7428b0894e8dc6 \ - --hash=sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93 \ - --hash=sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1 \ - --hash=sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee \ - --hash=sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902 \ - --hash=sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e \ - --hash=sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda \ - --hash=sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056 \ - --hash=sha256:a45d94075ac0647621eaaf693c8751813a3eccac455d423f473ffed38c8ac5c9 \ - --hash=sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd \ - --hash=sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0 \ - --hash=sha256:a7ee6884a8848792d58b854946b685521f41d8871afa65e0d4a774954e9c9e89 \ - --hash=sha256:ae38bd86eae3ba3d2ce5636cc9e23c80c9db2e9cb557e40b98153ed102b5a736 \ - --hash=sha256:b026cf2c32daf48d90c0c4e406815c3f8f4cfe0c6dfccb094a9add1ff6a0e41a \ - --hash=sha256:b0a2074a37285570d54b55820687de3d2f2b9ecf1b714e482e48c9e7c0402038 \ - --hash=sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7 \ - --hash=sha256:b212452b80cae26cb767aa045b051740e464c5129b7bd739c58fbb7deb339e7b \ - --hash=sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f \ - --hash=sha256:b4095c5019bb889aa866bf12ed4c85c0daea5aafcb7c20d1519f02a1e738f07f \ - --hash=sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c \ - --hash=sha256:bd80ed29761490c622edde5dd70537ca8c992c2952eb62ed46984f8eff66d6e8 \ - --hash=sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85 \ - --hash=sha256:c0f4808644baf0a434a3442df5e0bedf8d05208f0719cedcd499e168b23bfdc4 \ - --hash=sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716 \ - --hash=sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393 \ - --hash=sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350 \ - --hash=sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74 \ - --hash=sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75 \ - --hash=sha256:d89ae7de94631b60d468412c18290d358a9d805182373d804ec839978b120422 \ - --hash=sha256:d9d4f5e471e8dc49b593a80766c2328257e405f943c56a3dc985c125732bc4cf \ - --hash=sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5 \ - --hash=sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0 \ - --hash=sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929 \ - --hash=sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af \ - --hash=sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a \ - --hash=sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c \ - --hash=sha256:f172b8b2c72a13a06ea49225a9c47079549036ad1b34afa12d5491b881f5b993 \ - --hash=sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd \ - --hash=sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b \ - --hash=sha256:fa2c9cb607e0f660d48c54a63de7a9b36fef62f6b8bd50ff592ce1137e73ac7d \ - --hash=sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42 diff --git a/noxfile.py b/noxfile.py index 65a8d0e06..14e418df6 100644 --- a/noxfile.py +++ b/noxfile.py @@ -28,6 +28,7 @@ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +"""Development tasks implemented by Piped.""" import pathlib import sys diff --git a/pyproject.toml b/pyproject.toml index 27377f7b9..938a36ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,49 @@ Repository = "https://github.com/FasterSpeeding/Tanjun" Documentation = "https://tanjun.cursed.solutions/" Changelog = "https://tanjun.cursed.solutions/changelog" +[dependency-groups] +docs = [ + "markdown-include>=0.8", + "mkdocs>=1.4.2", + "mkdocstrings[python]>=0.19", + "mkdocs-material>=8.5.11", + "mkdocs-minify-plugin>=0.6.4", +] +freeze-locks = ["uv"] +lint = [ + "codespell>=2.2.2", + "pre-commit-hooks>=4.4", + "slotscheck>=0.16.1", + "ruff", +] +publish = ["flit>=3.8.0"] +reformat = [ + "black>=22.10.0", + "isort>=5.11.3", + "pre-commit-hooks>=4.4", + "pycln>=2.1.2", + "sort-all>=1.2", +] +templating = ["Jinja2>=3.1.2"] +tests = [ + "pytest>=7", + "pytest-cov>=4", + "pytest-sugar>=0.9.6", + "pytest-timeout>=2.1", + "freezegun>=1.2.2", + "pytest-asyncio>=0.20.1", + "pytest-timeout>=2.1", + "pytest-xdist>=3.1", + # The pytest extensions aren't compatible with v8 yet. + "pytest==7.4.0", +] +type-checking = [ + "mypy>=0.991", + "nox", + "pyright>=1.1.285", + {include-group = "tests"}, +] + [tool.flit.module] name = "tanjun" @@ -64,60 +107,57 @@ exclude_lines = [ "^if typing.TYPE_CHECKING:$" ] -[tool.flake8] -accept-encodings = "utf-8" -count = true -docstring-convention = "numpy" -eradicate-aggressive = true -extend-select = ["TC100", "TC101"] -force-future-annotations = true -ignore-decorators = "overload" -max-complexity = 20 -max-function-length = 100 -# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this. -max-line-length = 130 -min_python_version = "3.11" -pep585-activation = "always" -show_source = false -statistics = false +[tool.ruff.lint] +select = ["ALL"] ignore = [ - "A003", # class attribute is shadowing a builtin - "CFQ004", # Function has too many returns. - "CFQ002", # Function has too many arguments. - "D102", # Missing docstring in public method. - "D105", # Magic methods not having a docstring. - "D401", # Conflicts with property doc-strings too much. - "D404", # Conflicts with property doc-strings too much. - "D412", # No blank lines allowed between a section header and its content - "E402", # Module level import not at top of file (isn't compatible with our import style). - "IFS001", # "use a oneliner here". - "N818", # Exceptions should have an "Error" suffix in their name - "SIM105", # Use contextlib.suppress - "TRY003", # Avoid specifying long messages outside the exception class (this hits way too many std exceptions rn) - "T101", # TO-DO comment detection (T102 is FIX-ME and T103 is XXX). - "W503", # line break before binary operator. - "W504", # line break before binary operator (again, I guess). - "S101", # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. - "E203", # whitespace before ':' - "E231", # missing whitespace after ',' - "E701", # Incompatible with black: E701 multiple statements on one line (colon) - "E704", # Incompatible with black: E704 multiple statements on one line (def) - #"ASYNC910", # Return from async function with no guaranteed checkpoint or exception since function definition. - #"ASYNC911", # exit from async iterable with no guaranteed checkpoint since function definition - #"ASYNC102", #await inside __aexit__ on line 247 must have shielded cancel scope with a timeout. + "ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `` + "COM812", # Trailing comma missing (incompatible with black) + "FIX002", # Line contains TODO, consider resolving the issue + "I001", # [*] Import block is un-sorted or un-formatted + "S101", # Use of `assert` detected + "SIM108", # Use ternary operator `` instead of `if`-`else`-block + "TD002", # Missing author in TODO; try: `# TODO(): ...` or `# TODO @: ...` + "TD003", # Missing issue link on the line following this TODO ] -per-file-ignores = [ - "*.py: ASYNC102, ASYNC910, ASYNC911", - "docs_src/*.py: ASYNC102, ASYNC910, ASYNC911, DALL000, D100, D101, D103, E800, FA100, FA101, F841, INP001, N806, TC001, TC101", - "examples/*.py: ASYNC102, ASYNC910, ASYNC911, DALL000, D100, D101, D103, E800, FA100, FA101, F401, F403, INP001, TC001, TC003", - "noxfile.py: ASYNC102, ASYNC910, ASYNC911, D100, FA101, F401, F403, INP001", - "tanjun/abc.py: A005", # A005 the module is shadowing a Python builtin module "abc" - "tanjun/py.typed: ASYNC102, ASYNC910, ASYNC911, D100", - "tests/*.py: ASYNC102, ASYNC910, ASYNC911, CCE002, DALL000, D100, D101, D103, D104, FA100, FA101, TC003", - "tests/test_annotations*.py: ASYNC102, ASYNC910, ASYNC911, CCE002, DALL000, D100, D101, D103, D104, FA100, FA101, TC101, TC003", - "tests/test_clients*.py: ASYNC102, ASYNC910, ASYNC911, CCE002, DALL000, D100, D101, D103, D104, FA100, FA101, TC101", - "tests/test_components*.py: ASYNC102, ASYNC910, ASYNC911, CCE002, DALL000, D100, D101, D103, D104, FA100, FA101, TC101", + +[tool.ruff.lint.per-file-ignores] +"docs_src/**/*.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "D100", # Missing docstring in public module + "D101", # Missing docstring in public class + "D102", # Missing docstring in public method + "D103", # Missing docstring in public function + "F841", # Local variable `` is assigned to but never used + "INP001", # File `` is part of an implicit namespace package. Add an `__init__.py`. + "PIE790", # [*] Unnecessary `...` literal + "T201", # `print` found ] +"noxfile.py" = [ + "F403", # `from noxfile import *` used; unable to detect undefined name +] +"tests/**/*.py" = [ + "D100", # Missing docstring in public module + "D101", # Missing docstring in public class + "D102", # Missing docstring in public method + "D103", # Missing docstring in public function + "D104", # Missing docstring in public package + "PLR2004", # Magic value used in comparison, consider replacing `` with a constant variable + "SLF001", # Private member accessed: `_injector` +] + +[tool.ruff.lint.mccabe] +max-complexity = 20 + +[tool.ruff.lint.pycodestyle] +# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this. +max-line-length = 130 + +[tool.ruff.lint.pydocstyle] +convention = "numpy" + +[tool.ruff.lint.pylint] +max-args = 12 +max-branches = 15 [tool.isort] profile = "black" @@ -144,7 +184,7 @@ disable_error_code = ["type-abstract"] default_sessions = [ "reformat", "verify-markup", - "flake8", + "lint", "spell-check", "slot-check", "type-check", @@ -169,7 +209,6 @@ python_versions = ["3.11", "3.12", "3.13"] [tool.piped.github_actions.type_check] [tool.piped.github_actions.update_licence] [tool.piped.github_actions.upgrade_locks] -[tool.piped.github_actions.verify_locks] [tool.piped.github_actions.verify_types] [tool.pycln] diff --git a/uv.lock b/uv.lock new file mode 100644 index 000000000..33f2d2781 --- /dev/null +++ b/uv.lock @@ -0,0 +1,1777 @@ +version = 1 +requires-python = ">=3.11.0, <3.14" + +[[package]] +name = "aiohappyeyeballs" +version = "2.4.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/69/2f6d5a019bd02e920a3417689a89887b39ad1e350b562f9955693d900c40/aiohappyeyeballs-2.4.3.tar.gz", hash = "sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586", size = 21809 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/d8/120cd0fe3e8530df0539e71ba9683eade12cae103dd7543e50d15f737917/aiohappyeyeballs-2.4.3-py3-none-any.whl", hash = "sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572", size = 14742 }, +] + +[[package]] +name = "aiohttp" +version = "3.11.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohappyeyeballs" }, + { name = "aiosignal" }, + { name = "attrs" }, + { name = "frozenlist" }, + { name = "multidict" }, + { name = "propcache" }, + { name = "yarl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2c/e5/c7ad0689e8ab74c3ec9bf20e0f667e1278b3738ae19ae3fed21e6a0543ca/aiohttp-3.11.8.tar.gz", hash = "sha256:7bc9d64a2350cbb29a9732334e1a0743cbb6844de1731cbdf5949b235653f3fd", size = 7667904 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/95/af92cedf27707a77b4827e45922f87fde9eed1aee9817c2d93fa6f8b54b9/aiohttp-3.11.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f8dd02b44555893adfe7cc4b3b454fee04f9dcec45cf66ef5bb53ebf393f0505", size = 707895 }, + { url = "https://files.pythonhosted.org/packages/d0/a5/8f28d1b1e37810bf9957dfbbc376da5f8cc377b029dec0e20d5ddacc2253/aiohttp-3.11.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:658052941324edea3dee1f681375e70779f55e437e07bdfc4b5bbe65ad53cefb", size = 467535 }, + { url = "https://files.pythonhosted.org/packages/c9/eb/65c5a4163f79a8dcf8ceb69ca012bf5d14c599819ffa4b52b52aaef0c878/aiohttp-3.11.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6c829471a9e2266da4a0666f8a9e215f19320f79778af379c1c7db324ac24ed2", size = 454817 }, + { url = "https://files.pythonhosted.org/packages/58/f5/7939dbf646708ecc90a8c56d3c4b6602628d9cc2ec0df6a99d9b6004ad4a/aiohttp-3.11.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d21951756690f5d86d0215da38eb0fd65def03b5e2a1c08a4a39718a6d0d48f2", size = 1685395 }, + { url = "https://files.pythonhosted.org/packages/ee/00/619262f2f8d0966c55753bbe65020594462072c0dc485b24de0e7f0229b1/aiohttp-3.11.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2fa50ddc6b21cc1ae23e13524d6f75b27e279fdf5cf905b2df6fd171891ac4e2", size = 1742815 }, + { url = "https://files.pythonhosted.org/packages/55/d0/9be70ee6125a4be06aec54157ed47720426c0d3319bcf816c42ef64487be/aiohttp-3.11.8-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a5afbd805e449048ecebb1a256176e953d4ca9e48bab387d4d1c8524f1c7a95", size = 1783689 }, + { url = "https://files.pythonhosted.org/packages/56/6a/f5f2edab5d5a5ebc00447d906d12822cdc4e80ce8d9aa10b66bbec38caf4/aiohttp-3.11.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea68db69f2a4ddc24b28b8e754fc0b963ed7f9b9a76137f06fe44643d6821fbd", size = 1675581 }, + { url = "https://files.pythonhosted.org/packages/b0/17/9937026e4e152cd475d88e01fe95e0f792165503115d7d12d9a6cd817173/aiohttp-3.11.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80b3ac163145660ce660aed2f1005e6d4de840d39728990b7250525eeec4e4a8", size = 1621760 }, + { url = "https://files.pythonhosted.org/packages/d3/ee/eb9037cd040a27b234d07d714b9e167e6ea56b8a41cdaa365d17a7bcb4a4/aiohttp-3.11.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e9ac0cce897904b77e109e5403ed713187dbdf96832bfd061ac07164264be16c", size = 1652785 }, + { url = "https://files.pythonhosted.org/packages/b7/34/1c0422065285b272c0ddb63cf61dfb42bdbc0d6c3cc51e59ac1023226c31/aiohttp-3.11.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:3260c77cff4e35245bc517658bd54d7a64787f71f3c4f723877c82f22835b032", size = 1649670 }, + { url = "https://files.pythonhosted.org/packages/e0/d2/fc45946781450f2cde010b757c609e1189985961d590300a8637ee4c0b87/aiohttp-3.11.8-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f7fd9c11ffad6b022bf02a41a70418cb2ab3b33f2c27842a5999e3ab78daf280", size = 1732519 }, + { url = "https://files.pythonhosted.org/packages/c3/b1/56f72200edf9eaae46f9dbbda6434bd970afe48ec8ee494e1cf65c04a8fd/aiohttp-3.11.8-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:16bda233a7b159ab08107e8858fedca90a9de287057fab54cafde51bd83f9819", size = 1753866 }, + { url = "https://files.pythonhosted.org/packages/9f/29/907e42c94e534a94d4b281ace2ae66d339ab84d8976cdb7dc429d098eb0d/aiohttp-3.11.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4867008617bbf86e9fb5b00f72dd0e3a00a579b32233caff834320867f9b7cac", size = 1692152 }, + { url = "https://files.pythonhosted.org/packages/d7/83/f03968fcbedd92db3131d927b2aedc221003e1d1ce188b39ec4da49a6a5b/aiohttp-3.11.8-cp311-cp311-win32.whl", hash = "sha256:17e6b9d8e29e3bfc7f893f327e92c9769d3582cee2fb1652c1431ac3f60115a0", size = 415560 }, + { url = "https://files.pythonhosted.org/packages/5f/c2/44848c66e0538b8cbd708346754efc7928be5071b0ed0bbbe0db21608306/aiohttp-3.11.8-cp311-cp311-win_amd64.whl", hash = "sha256:7f3be4961a5c2c670f31caab7641a37ea2a97031f0d8ae15bcfd36b6bf273200", size = 441670 }, + { url = "https://files.pythonhosted.org/packages/74/bb/975dcefc5d2238f24815ef1df7358643108ae8efe7371d1c700efd1d813a/aiohttp-3.11.8-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0e3b5bfef913d6be270c81976fbc0cbf66625cd92663bbb7e03b3adbd6aa4ac6", size = 703595 }, + { url = "https://files.pythonhosted.org/packages/f4/f4/4480ffeca247026a89a828ff701f726a39029d63c20d0c3575c05cc21045/aiohttp-3.11.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cb51a81cb637b9a072c9cfae1839e35c6579638861eb3479eb5d6e6ce8bc6782", size = 462675 }, + { url = "https://files.pythonhosted.org/packages/9d/3a/34fb0a91f667eea7050c299c3d84993db953385b1d5c287173a5bdd7a2c0/aiohttp-3.11.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dd2ca84e5f7a35f313a62eb7d6a50bac6760b60bafce34586750712731c0aeff", size = 455270 }, + { url = "https://files.pythonhosted.org/packages/80/b2/6b7b7728552700b8af03ce1370a4da65d8b7d769d6303c5d453968c7e335/aiohttp-3.11.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47c6663df9446aa848b478413219600da4b54bc0409e1ac4bc80fb1a81501363", size = 1679484 }, + { url = "https://files.pythonhosted.org/packages/86/ae/92cd1a78ab4a962dc57482006b770c436d0ddb30b20cea954279577baec0/aiohttp-3.11.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c665ed4b52256614858b20711bbbd2755b0e19ec86870f8ff1645acf9ae9e760", size = 1736045 }, + { url = "https://files.pythonhosted.org/packages/17/9d/37ebdcb0f7da1b8e902accc239592e2824d13d0f723acb36dd4a4201ecc4/aiohttp-3.11.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35d4545e7684da7a954ffc2dce495462cb16a902dffdebe98572408f6aaaee83", size = 1790952 }, + { url = "https://files.pythonhosted.org/packages/02/9e/d572035320752770c00e6b821f4641493a611976f4dec85012b86b49be8e/aiohttp-3.11.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85be3899e6860dd2cd3f4370ded6708e939d00d5ec922a8eb328d114db605a47", size = 1689079 }, + { url = "https://files.pythonhosted.org/packages/b3/f2/faff5fa14c51161a6f074ed56295562bc80b1c54f9933186c4cccabf6ded/aiohttp-3.11.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a0ed9f1f2697713c48efc9ec483ad5d062e4aa91854f090a3eba0b19c002851d", size = 1616554 }, + { url = "https://files.pythonhosted.org/packages/b3/ea/00412278060ea50c2d5c8a48e7f7f94e95e2170079b67c6772475d153927/aiohttp-3.11.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c0dbae99737badf3f5e862088a118e28d3b36f03eb608a6382eddfd68178e05b", size = 1643126 }, + { url = "https://files.pythonhosted.org/packages/1f/93/9cb3e20cb8f73f00b94f92864f7e1937fd2b33059b2536f6532a2afabe6a/aiohttp-3.11.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:beae08f900b2980af4353a0200eb162b39f276fd8a6e43079a540f83964671f4", size = 1649517 }, + { url = "https://files.pythonhosted.org/packages/e3/27/24e8dc49f4f524d728dcb757f74d9b3f5a652ecb5d20158e175b73186280/aiohttp-3.11.8-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d6f9e5fd1b3ecbaca3e04a15a02d1fa213248608caee99fd5bdddd4759959cf7", size = 1697243 }, + { url = "https://files.pythonhosted.org/packages/16/bf/480de7d40affc95a046c8580e54ff4875a73ac5e7b8cafca9877f0cf089a/aiohttp-3.11.8-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a7def89a41fe32120d89cd4577f5efbab3c52234c5890066ced8a2f7202dff88", size = 1730902 }, + { url = "https://files.pythonhosted.org/packages/24/ce/74ed004d72a3d41933ac729765cd58aea8b61fd287fc870abc42f2d6b978/aiohttp-3.11.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:98f596cf59292e779bc387f22378a3d2c5e052c9fe2bf822ac4f547c6fe57758", size = 1696230 }, + { url = "https://files.pythonhosted.org/packages/a5/22/fdba63fc388ec880e99868609761671598b01bb402e063d69c338eaf8a27/aiohttp-3.11.8-cp312-cp312-win32.whl", hash = "sha256:b64fa6b76b35b695cd3e5c42a4e568cbea8d41c9e59165e2a43da00976e2027e", size = 410669 }, + { url = "https://files.pythonhosted.org/packages/7e/b8/37683614a4db2763b56376d4a532cceb0496b7984e1596e2da4b7c953166/aiohttp-3.11.8-cp312-cp312-win_amd64.whl", hash = "sha256:afba47981ff73b1794c00dce774334dcfe62664b3b4f78f278b77d21ce9daf43", size = 437086 }, + { url = "https://files.pythonhosted.org/packages/56/12/97a55a4fe36a68e6e51749c2edd546b4792bc47039d78b766273d91178af/aiohttp-3.11.8-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a81525430da5ca356fae6e889daeb6f5cc0d5f0cef88e59cdde48e2394ea1365", size = 696879 }, + { url = "https://files.pythonhosted.org/packages/da/4c/e84542b25315be8e4ec2fd06cfb31713d940fd94d378d7737f357ec7254c/aiohttp-3.11.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7565689e86a88c1d258351ebd14e343337b76a56ca5c0a2c1db96ec28149386f", size = 459325 }, + { url = "https://files.pythonhosted.org/packages/6b/b5/db278214e5f915c7b203ff66735d1a1e9bfc4e8f331ebe72e74e92cfab7c/aiohttp-3.11.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d0f9dbe9763c014c408ad51a027dc9582518e992dc63e2ffe359ac1b4840a560", size = 452061 }, + { url = "https://files.pythonhosted.org/packages/4a/64/00f313ef75b1ac3d3c0bc408da78ffa0e7698cfd9cd55ab1af3693af74ed/aiohttp-3.11.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ca580edc3ccd7f6ea76ad9cf59f5a8756d338e770b5eda7be26bcda8fa7ef53", size = 1662840 }, + { url = "https://files.pythonhosted.org/packages/3b/9d/eaea2168b1bbe13c31c378e887d92802f352cf28ea09acbbffed84eb908e/aiohttp-3.11.8-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7d141631a7348038fc7b5d1a81b3c9afa9aa056188ded7902fe754028fdea5c5", size = 1716479 }, + { url = "https://files.pythonhosted.org/packages/f1/51/37f8e30e2053e472febe091006b0c763d02538acb1f52d6af2e5d0d7e656/aiohttp-3.11.8-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64e6b14608a56a4c76c60daac730b0c0eeaf9d10dfc3231f7fc26521a0d628fd", size = 1772536 }, + { url = "https://files.pythonhosted.org/packages/6e/de/70b3caf16eb51cc92ba560800d52c2ce0bd71f0cb94eaa22ba0ba93dfe6a/aiohttp-3.11.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0983d0ce329f2f9dbeb355c3744bd6333f34e0dc56025b6b7d4f285b90acb51e", size = 1673785 }, + { url = "https://files.pythonhosted.org/packages/90/40/d9d6164452f05a5019394b0e76ff2068d5b0d85b0213f369c7435264fde0/aiohttp-3.11.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d96b93a46a3742880fa21bcb35c6c40cf27714ec0fb8ec85fe444d73b95131b9", size = 1601468 }, + { url = "https://files.pythonhosted.org/packages/7c/b0/e2b1964aed11246b4bdc35c0f04b4d353fd9826e33b86e382f05f338e51c/aiohttp-3.11.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f4f1779c3142d913c509c2ed1de8b8f920e07a5cd65ac1f57c61cfb6bfded5a4", size = 1614807 }, + { url = "https://files.pythonhosted.org/packages/22/74/f1bd4c746c74520af3fac8efc34f7191a2b07c32f595009e54049e8b3746/aiohttp-3.11.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:48be7cff468c9c0d86a02e6a826e1fe159094b16d5aa2c17703e7317f791b0f9", size = 1616589 }, + { url = "https://files.pythonhosted.org/packages/35/25/283d0da0573a0c32ae00b0d407e4219308c13b338b8f86e0b77339090349/aiohttp-3.11.8-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:daea456b79ca2bacc7f062845bbb1139c3b3231fc83169da5a682cf385416dd1", size = 1684232 }, + { url = "https://files.pythonhosted.org/packages/51/31/b7dd54d33dd604adb988e4fe4cd35b311f03efc4701743f307041b97e749/aiohttp-3.11.8-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:c92e763cf641e10ad9342597d20060ba23de5e411aada96660e679e3f9371189", size = 1714593 }, + { url = "https://files.pythonhosted.org/packages/bd/8e/76f7919864c755c90696df132686b2a9fd9725e7ad9073db4ac9b52e872f/aiohttp-3.11.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a750ee5a177e0f873d6b2d7d0fa6e1e7c658fc0ca8ea56438dcba2ac94bedb09", size = 1669610 }, + { url = "https://files.pythonhosted.org/packages/ec/93/bde417393de7545c194f0aefc9b4062a2b7d0e8ae8e7c85f5fa74971b433/aiohttp-3.11.8-cp313-cp313-win32.whl", hash = "sha256:4448c9c7f77bad48a6569062c0c16deb77fbb7363de1dc71ed087f66fb3b3c96", size = 409458 }, + { url = "https://files.pythonhosted.org/packages/da/e7/45d57621d9caba3c7d2687618c0e12025e477bd035834cf9ec3334e82810/aiohttp-3.11.8-cp313-cp313-win_amd64.whl", hash = "sha256:481075a1949de79a8a6841e0086f2f5f464785c592cf527ed0db2c0cbd0e1ba2", size = 435403 }, +] + +[[package]] +name = "aiosignal" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "frozenlist" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ae/67/0952ed97a9793b4958e5736f6d2b346b414a2cd63e82d05940032f45b32f/aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc", size = 19422 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/ac/a7305707cb852b7e16ff80eaf5692309bde30e2b1100a1fcacdc8f731d97/aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17", size = 7617 }, +] + +[[package]] +name = "alluka" +version = "0.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d5/ca/042a60f53edef08475b335014ccf1c29bdfcdaf7a952c1b18618d4dedddb/alluka-0.4.0.tar.gz", hash = "sha256:25ca19ffe47eab876ea1a6cc118af9b30dd075ac1bf706a248750ab38e0c5c9b", size = 218656 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/74/ff/a3eb3861e9203d35f8ad9ec06e5d20d871a39848b838a53f7675f76a5838/alluka-0.4.0-py3-none-any.whl", hash = "sha256:758f4d0623dc8e895949fedac8e9fb124cfdd412b9608ab5eba7f8db316692e0", size = 27037 }, +] + +[[package]] +name = "argcomplete" +version = "3.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/39/27605e133e7f4bb0c8e48c9a6b87101515e3446003e0442761f6a02ac35e/argcomplete-3.5.1.tar.gz", hash = "sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4", size = 82280 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/be/a606a6701d491cfae75583c80a6583f8abe9c36c0b9666e867e7cdd62fe8/argcomplete-3.5.1-py3-none-any.whl", hash = "sha256:1a1d148bdaa3e3b93454900163403df41448a248af01b6e849edc5ac08e6c363", size = 43498 }, +] + +[[package]] +name = "attrs" +version = "24.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346", size = 792678 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6a/21/5b6702a7f963e95456c0de2d495f67bf5fd62840ac655dc451586d23d39a/attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2", size = 63001 }, +] + +[[package]] +name = "babel" +version = "2.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316", size = 9348104 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/20/bc79bc575ba2e2a7f70e8a1155618bb1301eaa5132a8271373a6903f73f8/babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", size = 9587599 }, +] + +[[package]] +name = "black" +version = "24.10.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d8/0d/cc2fb42b8c50d80143221515dd7e4766995bd07c56c9a3ed30baf080b6dc/black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875", size = 645813 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/cc/7496bb63a9b06a954d3d0ac9fe7a73f3bf1cd92d7a58877c27f4ad1e9d41/black-24.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5a2221696a8224e335c28816a9d331a6c2ae15a2ee34ec857dcf3e45dbfa99ad", size = 1607468 }, + { url = "https://files.pythonhosted.org/packages/2b/e3/69a738fb5ba18b5422f50b4f143544c664d7da40f09c13969b2fd52900e0/black-24.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9da3333530dbcecc1be13e69c250ed8dfa67f43c4005fb537bb426e19200d50", size = 1437270 }, + { url = "https://files.pythonhosted.org/packages/c9/9b/2db8045b45844665c720dcfe292fdaf2e49825810c0103e1191515fc101a/black-24.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4007b1393d902b48b36958a216c20c4482f601569d19ed1df294a496eb366392", size = 1737061 }, + { url = "https://files.pythonhosted.org/packages/a3/95/17d4a09a5be5f8c65aa4a361444d95edc45def0de887810f508d3f65db7a/black-24.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:394d4ddc64782e51153eadcaaca95144ac4c35e27ef9b0a42e121ae7e57a9175", size = 1423293 }, + { url = "https://files.pythonhosted.org/packages/90/04/bf74c71f592bcd761610bbf67e23e6a3cff824780761f536512437f1e655/black-24.10.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b5e39e0fae001df40f95bd8cc36b9165c5e2ea88900167bddf258bacef9bbdc3", size = 1644256 }, + { url = "https://files.pythonhosted.org/packages/4c/ea/a77bab4cf1887f4b2e0bce5516ea0b3ff7d04ba96af21d65024629afedb6/black-24.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d37d422772111794b26757c5b55a3eade028aa3fde43121ab7b673d050949d65", size = 1448534 }, + { url = "https://files.pythonhosted.org/packages/4e/3e/443ef8bc1fbda78e61f79157f303893f3fddf19ca3c8989b163eb3469a12/black-24.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:14b3502784f09ce2443830e3133dacf2c0110d45191ed470ecb04d0f5f6fcb0f", size = 1761892 }, + { url = "https://files.pythonhosted.org/packages/52/93/eac95ff229049a6901bc84fec6908a5124b8a0b7c26ea766b3b8a5debd22/black-24.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:30d2c30dc5139211dda799758559d1b049f7f14c580c409d6ad925b74a4208a8", size = 1434796 }, + { url = "https://files.pythonhosted.org/packages/d0/a0/a993f58d4ecfba035e61fca4e9f64a2ecae838fc9f33ab798c62173ed75c/black-24.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cbacacb19e922a1d75ef2b6ccaefcd6e93a2c05ede32f06a21386a04cedb981", size = 1643986 }, + { url = "https://files.pythonhosted.org/packages/37/d5/602d0ef5dfcace3fb4f79c436762f130abd9ee8d950fa2abdbf8bbc555e0/black-24.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f93102e0c5bb3907451063e08b9876dbeac810e7da5a8bfb7aeb5a9ef89066b", size = 1448085 }, + { url = "https://files.pythonhosted.org/packages/47/6d/a3a239e938960df1a662b93d6230d4f3e9b4a22982d060fc38c42f45a56b/black-24.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ddacb691cdcdf77b96f549cf9591701d8db36b2f19519373d60d31746068dbf2", size = 1760928 }, + { url = "https://files.pythonhosted.org/packages/dd/cf/af018e13b0eddfb434df4d9cd1b2b7892bab119f7a20123e93f6910982e8/black-24.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:680359d932801c76d2e9c9068d05c6b107f2584b2a5b88831c83962eb9984c1b", size = 1436875 }, + { url = "https://files.pythonhosted.org/packages/8d/a7/4b27c50537ebca8bec139b872861f9d2bf501c5ec51fcf897cb924d9e264/black-24.10.0-py3-none-any.whl", hash = "sha256:3bb2b7a1f7b685f85b11fed1ef10f8a9148bceb49853e47a294a3dd963c1dd7d", size = 206898 }, +] + +[[package]] +name = "certifi" +version = "2024.8.30" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9", size = 168507 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/90/3c9ff0512038035f59d279fddeb79f5f1eccd8859f06d6163c58798b9487/certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", size = 167321 }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e", size = 106620 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9c/61/73589dcc7a719582bf56aae309b6103d2762b526bffe189d635a7fcfd998/charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c", size = 193339 }, + { url = "https://files.pythonhosted.org/packages/77/d5/8c982d58144de49f59571f940e329ad6e8615e1e82ef84584c5eeb5e1d72/charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944", size = 124366 }, + { url = "https://files.pythonhosted.org/packages/bf/19/411a64f01ee971bed3231111b69eb56f9331a769072de479eae7de52296d/charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee", size = 118874 }, + { url = "https://files.pythonhosted.org/packages/4c/92/97509850f0d00e9f14a46bc751daabd0ad7765cff29cdfb66c68b6dad57f/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c", size = 138243 }, + { url = "https://files.pythonhosted.org/packages/e2/29/d227805bff72ed6d6cb1ce08eec707f7cfbd9868044893617eb331f16295/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6", size = 148676 }, + { url = "https://files.pythonhosted.org/packages/13/bc/87c2c9f2c144bedfa62f894c3007cd4530ba4b5351acb10dc786428a50f0/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea", size = 141289 }, + { url = "https://files.pythonhosted.org/packages/eb/5b/6f10bad0f6461fa272bfbbdf5d0023b5fb9bc6217c92bf068fa5a99820f5/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc", size = 142585 }, + { url = "https://files.pythonhosted.org/packages/3b/a0/a68980ab8a1f45a36d9745d35049c1af57d27255eff8c907e3add84cf68f/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5", size = 144408 }, + { url = "https://files.pythonhosted.org/packages/d7/a1/493919799446464ed0299c8eef3c3fad0daf1c3cd48bff9263c731b0d9e2/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594", size = 139076 }, + { url = "https://files.pythonhosted.org/packages/fb/9d/9c13753a5a6e0db4a0a6edb1cef7aee39859177b64e1a1e748a6e3ba62c2/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c", size = 146874 }, + { url = "https://files.pythonhosted.org/packages/75/d2/0ab54463d3410709c09266dfb416d032a08f97fd7d60e94b8c6ef54ae14b/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365", size = 150871 }, + { url = "https://files.pythonhosted.org/packages/8d/c9/27e41d481557be53d51e60750b85aa40eaf52b841946b3cdeff363105737/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129", size = 148546 }, + { url = "https://files.pythonhosted.org/packages/ee/44/4f62042ca8cdc0cabf87c0fc00ae27cd8b53ab68be3605ba6d071f742ad3/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236", size = 143048 }, + { url = "https://files.pythonhosted.org/packages/01/f8/38842422988b795220eb8038745d27a675ce066e2ada79516c118f291f07/charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99", size = 94389 }, + { url = "https://files.pythonhosted.org/packages/0b/6e/b13bd47fa9023b3699e94abf565b5a2f0b0be6e9ddac9812182596ee62e4/charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27", size = 101752 }, + { url = "https://files.pythonhosted.org/packages/d3/0b/4b7a70987abf9b8196845806198975b6aab4ce016632f817ad758a5aa056/charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6", size = 194445 }, + { url = "https://files.pythonhosted.org/packages/50/89/354cc56cf4dd2449715bc9a0f54f3aef3dc700d2d62d1fa5bbea53b13426/charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf", size = 125275 }, + { url = "https://files.pythonhosted.org/packages/fa/44/b730e2a2580110ced837ac083d8ad222343c96bb6b66e9e4e706e4d0b6df/charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db", size = 119020 }, + { url = "https://files.pythonhosted.org/packages/9d/e4/9263b8240ed9472a2ae7ddc3e516e71ef46617fe40eaa51221ccd4ad9a27/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1", size = 139128 }, + { url = "https://files.pythonhosted.org/packages/6b/e3/9f73e779315a54334240353eaea75854a9a690f3f580e4bd85d977cb2204/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03", size = 149277 }, + { url = "https://files.pythonhosted.org/packages/1a/cf/f1f50c2f295312edb8a548d3fa56a5c923b146cd3f24114d5adb7e7be558/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284", size = 142174 }, + { url = "https://files.pythonhosted.org/packages/16/92/92a76dc2ff3a12e69ba94e7e05168d37d0345fa08c87e1fe24d0c2a42223/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15", size = 143838 }, + { url = "https://files.pythonhosted.org/packages/a4/01/2117ff2b1dfc61695daf2babe4a874bca328489afa85952440b59819e9d7/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8", size = 146149 }, + { url = "https://files.pythonhosted.org/packages/f6/9b/93a332b8d25b347f6839ca0a61b7f0287b0930216994e8bf67a75d050255/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2", size = 140043 }, + { url = "https://files.pythonhosted.org/packages/ab/f6/7ac4a01adcdecbc7a7587767c776d53d369b8b971382b91211489535acf0/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719", size = 148229 }, + { url = "https://files.pythonhosted.org/packages/9d/be/5708ad18161dee7dc6a0f7e6cf3a88ea6279c3e8484844c0590e50e803ef/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631", size = 151556 }, + { url = "https://files.pythonhosted.org/packages/5a/bb/3d8bc22bacb9eb89785e83e6723f9888265f3a0de3b9ce724d66bd49884e/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b", size = 149772 }, + { url = "https://files.pythonhosted.org/packages/f7/fa/d3fc622de05a86f30beea5fc4e9ac46aead4731e73fd9055496732bcc0a4/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565", size = 144800 }, + { url = "https://files.pythonhosted.org/packages/9a/65/bdb9bc496d7d190d725e96816e20e2ae3a6fa42a5cac99c3c3d6ff884118/charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7", size = 94836 }, + { url = "https://files.pythonhosted.org/packages/3e/67/7b72b69d25b89c0b3cea583ee372c43aa24df15f0e0f8d3982c57804984b/charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9", size = 102187 }, + { url = "https://files.pythonhosted.org/packages/f3/89/68a4c86f1a0002810a27f12e9a7b22feb198c59b2f05231349fbce5c06f4/charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114", size = 194617 }, + { url = "https://files.pythonhosted.org/packages/4f/cd/8947fe425e2ab0aa57aceb7807af13a0e4162cd21eee42ef5b053447edf5/charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed", size = 125310 }, + { url = "https://files.pythonhosted.org/packages/5b/f0/b5263e8668a4ee9becc2b451ed909e9c27058337fda5b8c49588183c267a/charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250", size = 119126 }, + { url = "https://files.pythonhosted.org/packages/ff/6e/e445afe4f7fda27a533f3234b627b3e515a1b9429bc981c9a5e2aa5d97b6/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920", size = 139342 }, + { url = "https://files.pythonhosted.org/packages/a1/b2/4af9993b532d93270538ad4926c8e37dc29f2111c36f9c629840c57cd9b3/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64", size = 149383 }, + { url = "https://files.pythonhosted.org/packages/fb/6f/4e78c3b97686b871db9be6f31d64e9264e889f8c9d7ab33c771f847f79b7/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23", size = 142214 }, + { url = "https://files.pythonhosted.org/packages/2b/c9/1c8fe3ce05d30c87eff498592c89015b19fade13df42850aafae09e94f35/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc", size = 144104 }, + { url = "https://files.pythonhosted.org/packages/ee/68/efad5dcb306bf37db7db338338e7bb8ebd8cf38ee5bbd5ceaaaa46f257e6/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d", size = 146255 }, + { url = "https://files.pythonhosted.org/packages/0c/75/1ed813c3ffd200b1f3e71121c95da3f79e6d2a96120163443b3ad1057505/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88", size = 140251 }, + { url = "https://files.pythonhosted.org/packages/7d/0d/6f32255c1979653b448d3c709583557a4d24ff97ac4f3a5be156b2e6a210/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90", size = 148474 }, + { url = "https://files.pythonhosted.org/packages/ac/a0/c1b5298de4670d997101fef95b97ac440e8c8d8b4efa5a4d1ef44af82f0d/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b", size = 151849 }, + { url = "https://files.pythonhosted.org/packages/04/4f/b3961ba0c664989ba63e30595a3ed0875d6790ff26671e2aae2fdc28a399/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d", size = 149781 }, + { url = "https://files.pythonhosted.org/packages/d8/90/6af4cd042066a4adad58ae25648a12c09c879efa4849c705719ba1b23d8c/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482", size = 144970 }, + { url = "https://files.pythonhosted.org/packages/cc/67/e5e7e0cbfefc4ca79025238b43cdf8a2037854195b37d6417f3d0895c4c2/charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67", size = 94973 }, + { url = "https://files.pythonhosted.org/packages/65/97/fc9bbc54ee13d33dc54a7fcf17b26368b18505500fc01e228c27b5222d80/charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b", size = 102308 }, + { url = "https://files.pythonhosted.org/packages/bf/9b/08c0432272d77b04803958a4598a51e2a4b51c06640af8b8f0f908c18bf2/charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079", size = 49446 }, +] + +[[package]] +name = "click" +version = "8.1.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "platform_system == 'Windows'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de", size = 336121 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", size = 97941 }, +] + +[[package]] +name = "codespell" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a0/a9/98353dfc7afcdf18cffd2dd3e959a25eaaf2728cf450caa59af89648a8e4/codespell-2.3.0.tar.gz", hash = "sha256:360c7d10f75e65f67bad720af7007e1060a5d395670ec11a7ed1fed9dd17471f", size = 329791 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/20/b6019add11e84f821184234cea0ad91442373489ef7ccfa3d73a71b908fa/codespell-2.3.0-py3-none-any.whl", hash = "sha256:a9c7cef2501c9cfede2110fd6d4e5e62296920efe9abfb84648df866e47f58d1", size = 329167 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "colorlog" +version = "6.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d3/7a/359f4d5df2353f26172b3cc39ea32daa39af8de522205f512f458923e677/colorlog-6.9.0.tar.gz", hash = "sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2", size = 16624 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e3/51/9b208e85196941db2f0654ad0357ca6388ab3ed67efdbfc799f35d1f83aa/colorlog-6.9.0-py3-none-any.whl", hash = "sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff", size = 11424 }, +] + +[[package]] +name = "coverage" +version = "7.6.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ab/75/aecfd0a3adbec6e45753976bc2a9fed62b42cea9a206d10fd29244a77953/coverage-7.6.8.tar.gz", hash = "sha256:8b2b8503edb06822c86d82fa64a4a5cb0760bb8f31f26e138ec743f422f37cfc", size = 801425 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/9f/e98211980f6e2f439e251737482aa77906c9b9c507824c71a2ce7eea0402/coverage-7.6.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:86cffe9c6dfcfe22e28027069725c7f57f4b868a3f86e81d1c62462764dc46d4", size = 207093 }, + { url = "https://files.pythonhosted.org/packages/fd/c7/8bab83fb9c20f7f8163c5a20dcb62d591b906a214a6dc6b07413074afc80/coverage-7.6.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d82ab6816c3277dc962cfcdc85b1efa0e5f50fb2c449432deaf2398a2928ab94", size = 207536 }, + { url = "https://files.pythonhosted.org/packages/1e/d6/00243df625f1b282bb25c83ce153ae2c06f8e7a796a8d833e7235337b4d9/coverage-7.6.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13690e923a3932e4fad4c0ebfb9cb5988e03d9dcb4c5150b5fcbf58fd8bddfc4", size = 239482 }, + { url = "https://files.pythonhosted.org/packages/1e/07/faf04b3eeb55ffc2a6f24b65dffe6e0359ec3b283e6efb5050ea0707446f/coverage-7.6.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4be32da0c3827ac9132bb488d331cb32e8d9638dd41a0557c5569d57cf22c9c1", size = 236886 }, + { url = "https://files.pythonhosted.org/packages/43/23/c79e497bf4d8fcacd316bebe1d559c765485b8ec23ac4e23025be6bfce09/coverage-7.6.8-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44e6c85bbdc809383b509d732b06419fb4544dca29ebe18480379633623baafb", size = 238749 }, + { url = "https://files.pythonhosted.org/packages/b5/e5/791bae13be3c6451e32ef7af1192e711c6a319f3c597e9b218d148fd0633/coverage-7.6.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:768939f7c4353c0fac2f7c37897e10b1414b571fd85dd9fc49e6a87e37a2e0d8", size = 237679 }, + { url = "https://files.pythonhosted.org/packages/05/c6/bbfdfb03aada601fb8993ced17468c8c8e0b4aafb3097026e680fabb7ce1/coverage-7.6.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e44961e36cb13c495806d4cac67640ac2866cb99044e210895b506c26ee63d3a", size = 236317 }, + { url = "https://files.pythonhosted.org/packages/67/f9/f8e5a4b2ce96d1b0e83ae6246369eb8437001dc80ec03bb51c87ff557cd8/coverage-7.6.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3ea8bb1ab9558374c0ab591783808511d135a833c3ca64a18ec927f20c4030f0", size = 237084 }, + { url = "https://files.pythonhosted.org/packages/f0/70/b05328901e4debe76e033717e1452d00246c458c44e9dbd893e7619c2967/coverage-7.6.8-cp311-cp311-win32.whl", hash = "sha256:629a1ba2115dce8bf75a5cce9f2486ae483cb89c0145795603d6554bdc83e801", size = 209638 }, + { url = "https://files.pythonhosted.org/packages/70/55/1efa24f960a2fa9fbc44a9523d3f3c50ceb94dd1e8cd732168ab2dc41b07/coverage-7.6.8-cp311-cp311-win_amd64.whl", hash = "sha256:fb9fc32399dca861584d96eccd6c980b69bbcd7c228d06fb74fe53e007aa8ef9", size = 210506 }, + { url = "https://files.pythonhosted.org/packages/76/ce/3edf581c8fe429ed8ced6e6d9ac693c25975ef9093413276dab6ed68a80a/coverage-7.6.8-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e683e6ecc587643f8cde8f5da6768e9d165cd31edf39ee90ed7034f9ca0eefee", size = 207285 }, + { url = "https://files.pythonhosted.org/packages/09/9c/cf102ab046c9cf8895c3f7aadcde6f489a4b2ec326757e8c6e6581829b5e/coverage-7.6.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1defe91d41ce1bd44b40fabf071e6a01a5aa14de4a31b986aa9dfd1b3e3e414a", size = 207522 }, + { url = "https://files.pythonhosted.org/packages/39/06/42aa6dd13dbfca72e1fd8ffccadbc921b6e75db34545ebab4d955d1e7ad3/coverage-7.6.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7ad66e8e50225ebf4236368cc43c37f59d5e6728f15f6e258c8639fa0dd8e6d", size = 240543 }, + { url = "https://files.pythonhosted.org/packages/a0/20/2932971dc215adeca8eeff446266a7fef17a0c238e881ffedebe7bfa0669/coverage-7.6.8-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fe47da3e4fda5f1abb5709c156eca207eacf8007304ce3019eb001e7a7204cb", size = 237577 }, + { url = "https://files.pythonhosted.org/packages/ac/85/4323ece0cd5452c9522f4b6e5cc461e6c7149a4b1887c9e7a8b1f4e51146/coverage-7.6.8-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:202a2d645c5a46b84992f55b0a3affe4f0ba6b4c611abec32ee88358db4bb649", size = 239646 }, + { url = "https://files.pythonhosted.org/packages/77/52/b2537487d8f36241e518e84db6f79e26bc3343b14844366e35b090fae0d4/coverage-7.6.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4674f0daa1823c295845b6a740d98a840d7a1c11df00d1fd62614545c1583787", size = 239128 }, + { url = "https://files.pythonhosted.org/packages/7c/99/7f007762012186547d0ecc3d328da6b6f31a8c99f05dc1e13dcd929918cd/coverage-7.6.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:74610105ebd6f33d7c10f8907afed696e79c59e3043c5f20eaa3a46fddf33b4c", size = 237434 }, + { url = "https://files.pythonhosted.org/packages/97/53/e9b5cf0682a1cab9352adfac73caae0d77ae1d65abc88975d510f7816389/coverage-7.6.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37cda8712145917105e07aab96388ae76e787270ec04bcb9d5cc786d7cbb8443", size = 239095 }, + { url = "https://files.pythonhosted.org/packages/0c/50/054f0b464fbae0483217186478eefa2e7df3a79917ed7f1d430b6da2cf0d/coverage-7.6.8-cp312-cp312-win32.whl", hash = "sha256:9e89d5c8509fbd6c03d0dd1972925b22f50db0792ce06324ba069f10787429ad", size = 209895 }, + { url = "https://files.pythonhosted.org/packages/df/d0/09ba870360a27ecf09e177ca2ff59d4337fc7197b456f22ceff85cffcfa5/coverage-7.6.8-cp312-cp312-win_amd64.whl", hash = "sha256:379c111d3558272a2cae3d8e57e6b6e6f4fe652905692d54bad5ea0ca37c5ad4", size = 210684 }, + { url = "https://files.pythonhosted.org/packages/9a/84/6f0ccf94a098ac3d6d6f236bd3905eeac049a9e0efcd9a63d4feca37ac4b/coverage-7.6.8-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b0c69f4f724c64dfbfe79f5dfb503b42fe6127b8d479b2677f2b227478db2eb", size = 207313 }, + { url = "https://files.pythonhosted.org/packages/db/2b/e3b3a3a12ebec738c545897ac9f314620470fcbc368cdac88cf14974ba20/coverage-7.6.8-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c15b32a7aca8038ed7644f854bf17b663bc38e1671b5d6f43f9a2b2bd0c46f63", size = 207574 }, + { url = "https://files.pythonhosted.org/packages/db/c0/5bf95d42b6a8d21dfce5025ce187f15db57d6460a59b67a95fe8728162f1/coverage-7.6.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63068a11171e4276f6ece913bde059e77c713b48c3a848814a6537f35afb8365", size = 240090 }, + { url = "https://files.pythonhosted.org/packages/57/b8/d6fd17d1a8e2b0e1a4e8b9cb1f0f261afd422570735899759c0584236916/coverage-7.6.8-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f4548c5ead23ad13fb7a2c8ea541357474ec13c2b736feb02e19a3085fac002", size = 237237 }, + { url = "https://files.pythonhosted.org/packages/d4/e4/a91e9bb46809c8b63e68fc5db5c4d567d3423b6691d049a4f950e38fbe9d/coverage-7.6.8-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b4b4299dd0d2c67caaaf286d58aef5e75b125b95615dda4542561a5a566a1e3", size = 239225 }, + { url = "https://files.pythonhosted.org/packages/31/9c/9b99b0591ec4555b7292d271e005f27b465388ce166056c435b288db6a69/coverage-7.6.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c9ebfb2507751f7196995142f057d1324afdab56db1d9743aab7f50289abd022", size = 238888 }, + { url = "https://files.pythonhosted.org/packages/a6/85/285c2df9a04bc7c31f21fd9d4a24d19e040ec5e2ff06e572af1f6514c9e7/coverage-7.6.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c1b4474beee02ede1eef86c25ad4600a424fe36cff01a6103cb4533c6bf0169e", size = 236974 }, + { url = "https://files.pythonhosted.org/packages/cb/a1/95ec8522206f76cdca033bf8bb61fff56429fb414835fc4d34651dfd29fc/coverage-7.6.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d9fd2547e6decdbf985d579cf3fc78e4c1d662b9b0ff7cc7862baaab71c9cc5b", size = 238815 }, + { url = "https://files.pythonhosted.org/packages/8d/ac/687e9ba5e6d0979e9dab5c02e01c4f24ac58260ef82d88d3b433b3f84f1e/coverage-7.6.8-cp313-cp313-win32.whl", hash = "sha256:8aae5aea53cbfe024919715eca696b1a3201886ce83790537d1c3668459c7146", size = 209957 }, + { url = "https://files.pythonhosted.org/packages/2f/a3/b61cc8e3fcf075293fb0f3dee405748453c5ba28ac02ceb4a87f52bdb105/coverage-7.6.8-cp313-cp313-win_amd64.whl", hash = "sha256:ae270e79f7e169ccfe23284ff5ea2d52a6f401dc01b337efb54b3783e2ce3f28", size = 210711 }, + { url = "https://files.pythonhosted.org/packages/ee/4b/891c8b9acf1b62c85e4a71dac142ab9284e8347409b7355de02e3f38306f/coverage-7.6.8-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:de38add67a0af869b0d79c525d3e4588ac1ffa92f39116dbe0ed9753f26eba7d", size = 208053 }, + { url = "https://files.pythonhosted.org/packages/18/a9/9e330409b291cc002723d339346452800e78df1ce50774ca439ade1d374f/coverage-7.6.8-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b07c25d52b1c16ce5de088046cd2432b30f9ad5e224ff17c8f496d9cb7d1d451", size = 208329 }, + { url = "https://files.pythonhosted.org/packages/9c/0d/33635fd429f6589c6e1cdfc7bf581aefe4c1792fbff06383f9d37f59db60/coverage-7.6.8-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62a66ff235e4c2e37ed3b6104d8b478d767ff73838d1222132a7a026aa548764", size = 251052 }, + { url = "https://files.pythonhosted.org/packages/23/32/8a08da0e46f3830bbb9a5b40614241b2e700f27a9c2889f53122486443ed/coverage-7.6.8-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09b9f848b28081e7b975a3626e9081574a7b9196cde26604540582da60235fdf", size = 246765 }, + { url = "https://files.pythonhosted.org/packages/56/3f/3b86303d2c14350fdb1c6c4dbf9bc76000af2382f42ca1d4d99c6317666e/coverage-7.6.8-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:093896e530c38c8e9c996901858ac63f3d4171268db2c9c8b373a228f459bbc5", size = 249125 }, + { url = "https://files.pythonhosted.org/packages/36/cb/c4f081b9023f9fd8646dbc4ef77be0df090263e8f66f4ea47681e0dc2cff/coverage-7.6.8-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a7b8ac36fd688c8361cbc7bf1cb5866977ece6e0b17c34aa0df58bda4fa18a4", size = 248615 }, + { url = "https://files.pythonhosted.org/packages/32/ee/53bdbf67760928c44b57b2c28a8c0a4bf544f85a9ee129a63ba5c78fdee4/coverage-7.6.8-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:38c51297b35b3ed91670e1e4efb702b790002e3245a28c76e627478aa3c10d83", size = 246507 }, + { url = "https://files.pythonhosted.org/packages/57/49/5a57910bd0af6d8e802b4ca65292576d19b54b49f81577fd898505dee075/coverage-7.6.8-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2e4e0f60cb4bd7396108823548e82fdab72d4d8a65e58e2c19bbbc2f1e2bfa4b", size = 247785 }, + { url = "https://files.pythonhosted.org/packages/bd/37/e450c9f6b297c79bb9858407396ed3e084dcc22990dd110ab01d5ceb9770/coverage-7.6.8-cp313-cp313t-win32.whl", hash = "sha256:6535d996f6537ecb298b4e287a855f37deaf64ff007162ec0afb9ab8ba3b8b71", size = 210605 }, + { url = "https://files.pythonhosted.org/packages/44/79/7d0c7dd237c6905018e2936cd1055fe1d42e7eba2ebab3c00f4aad2a27d7/coverage-7.6.8-cp313-cp313t-win_amd64.whl", hash = "sha256:c79c0685f142ca53256722a384540832420dff4ab15fec1863d7e5bc8691bdcc", size = 211777 }, +] + +[package.optional-dependencies] +toml = [ + { name = "tomli", marker = "python_full_version <= '3.11'" }, +] + +[[package]] +name = "csscompressor" +version = "0.9.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/2a/8c3ac3d8bc94e6de8d7ae270bb5bc437b210bb9d6d9e46630c98f4abd20c/csscompressor-0.9.5.tar.gz", hash = "sha256:afa22badbcf3120a4f392e4d22f9fff485c044a1feda4a950ecc5eba9dd31a05", size = 237808 } + +[[package]] +name = "distlib" +version = "0.3.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403", size = 613923 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/91/a1/cf2472db20f7ce4a6be1253a81cfdf85ad9c7885ffbed7047fb72c24cf87/distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87", size = 468973 }, +] + +[[package]] +name = "docutils" +version = "0.21.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408 }, +] + +[[package]] +name = "execnet" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bb/ff/b4c0dc78fbe20c3e59c0c7334de0c27eb4001a2b2017999af398bf730817/execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3", size = 166524 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/09/2aea36ff60d16dd8879bdb2f5b3ee0ba8d08cbbdcdfe870e695ce3784385/execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc", size = 40612 }, +] + +[[package]] +name = "filelock" +version = "3.16.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9d/db/3ef5bb276dae18d6ec2124224403d1d67bccdbefc17af4cc8f553e341ab1/filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435", size = 18037 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/f8/feced7779d755758a52d1f6635d990b8d98dc0a29fa568bbe0625f18fdf3/filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0", size = 16163 }, +] + +[[package]] +name = "flit" +version = "3.10.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "flit-core" }, + { name = "pip" }, + { name = "requests" }, + { name = "tomli-w" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/03/46/f84b8815d161e7392d124d3de6e5880d1d36a74162a77a5e2839dc3c8c68/flit-3.10.1.tar.gz", hash = "sha256:9c6258ae76d218ce60f9e39a43ca42006a3abcc5c44ea6bb2a1daa13857a8f1a", size = 143162 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b6/ba/d88b8f3253b4af5a88559aede6345975cc2b18ed77bf8daf977bbb9df2c5/flit-3.10.1-py3-none-any.whl", hash = "sha256:d79c19c2caae73cc486d3d827af6a11c1a84b9efdfab8d9683b714ec8d1dc1f1", size = 50683 }, +] + +[[package]] +name = "flit-core" +version = "3.10.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d5/ae/09427bea9227a33ec834ed5461432752fd5d02b14f93dd68406c91684622/flit_core-3.10.1.tar.gz", hash = "sha256:66e5b87874a0d6e39691f0e22f09306736b633548670ad3c09ec9db03c5662f7", size = 42842 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/be/2d/293fe6a58e73df57cc2b5e5cf2b17c6bb4fb5b0c390bab8f1e87bdc62529/flit_core-3.10.1-py3-none-any.whl", hash = "sha256:cb31a76e8b31ad3351bb89e531f64ef2b05d1e65bd939183250bf81ddf4922a8", size = 36389 }, +] + +[[package]] +name = "freezegun" +version = "1.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "python-dateutil" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2c/ef/722b8d71ddf4d48f25f6d78aa2533d505bf3eec000a7cacb8ccc8de61f2f/freezegun-1.5.1.tar.gz", hash = "sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9", size = 33697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/51/0b/0d7fee5919bccc1fdc1c2a7528b98f65c6f69b223a3fd8f809918c142c36/freezegun-1.5.1-py3-none-any.whl", hash = "sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1", size = 17569 }, +] + +[[package]] +name = "frozenlist" +version = "1.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8f/ed/0f4cec13a93c02c47ec32d81d11c0c1efbadf4a471e3f3ce7cad366cbbd3/frozenlist-1.5.0.tar.gz", hash = "sha256:81d5af29e61b9c8348e876d442253723928dce6433e0e76cd925cd83f1b4b817", size = 39930 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/43/0bed28bf5eb1c9e4301003b74453b8e7aa85fb293b31dde352aac528dafc/frozenlist-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:fd74520371c3c4175142d02a976aee0b4cb4a7cc912a60586ffd8d5929979b30", size = 94987 }, + { url = "https://files.pythonhosted.org/packages/bb/bf/b74e38f09a246e8abbe1e90eb65787ed745ccab6eaa58b9c9308e052323d/frozenlist-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2f3f7a0fbc219fb4455264cae4d9f01ad41ae6ee8524500f381de64ffaa077d5", size = 54584 }, + { url = "https://files.pythonhosted.org/packages/2c/31/ab01375682f14f7613a1ade30149f684c84f9b8823a4391ed950c8285656/frozenlist-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f47c9c9028f55a04ac254346e92977bf0f166c483c74b4232bee19a6697e4778", size = 52499 }, + { url = "https://files.pythonhosted.org/packages/98/a8/d0ac0b9276e1404f58fec3ab6e90a4f76b778a49373ccaf6a563f100dfbc/frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0996c66760924da6e88922756d99b47512a71cfd45215f3570bf1e0b694c206a", size = 276357 }, + { url = "https://files.pythonhosted.org/packages/ad/c9/c7761084fa822f07dac38ac29f841d4587570dd211e2262544aa0b791d21/frozenlist-1.5.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2fe128eb4edeabe11896cb6af88fca5346059f6c8d807e3b910069f39157869", size = 287516 }, + { url = "https://files.pythonhosted.org/packages/a1/ff/cd7479e703c39df7bdab431798cef89dc75010d8aa0ca2514c5b9321db27/frozenlist-1.5.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a8ea951bbb6cacd492e3948b8da8c502a3f814f5d20935aae74b5df2b19cf3d", size = 283131 }, + { url = "https://files.pythonhosted.org/packages/59/a0/370941beb47d237eca4fbf27e4e91389fd68699e6f4b0ebcc95da463835b/frozenlist-1.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:de537c11e4aa01d37db0d403b57bd6f0546e71a82347a97c6a9f0dcc532b3a45", size = 261320 }, + { url = "https://files.pythonhosted.org/packages/b8/5f/c10123e8d64867bc9b4f2f510a32042a306ff5fcd7e2e09e5ae5100ee333/frozenlist-1.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c2623347b933fcb9095841f1cc5d4ff0b278addd743e0e966cb3d460278840d", size = 274877 }, + { url = "https://files.pythonhosted.org/packages/fa/79/38c505601ae29d4348f21706c5d89755ceded02a745016ba2f58bd5f1ea6/frozenlist-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cee6798eaf8b1416ef6909b06f7dc04b60755206bddc599f52232606e18179d3", size = 269592 }, + { url = "https://files.pythonhosted.org/packages/19/e2/39f3a53191b8204ba9f0bb574b926b73dd2efba2a2b9d2d730517e8f7622/frozenlist-1.5.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f5f9da7f5dbc00a604fe74aa02ae7c98bcede8a3b8b9666f9f86fc13993bc71a", size = 265934 }, + { url = "https://files.pythonhosted.org/packages/d5/c9/3075eb7f7f3a91f1a6b00284af4de0a65a9ae47084930916f5528144c9dd/frozenlist-1.5.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:90646abbc7a5d5c7c19461d2e3eeb76eb0b204919e6ece342feb6032c9325ae9", size = 283859 }, + { url = "https://files.pythonhosted.org/packages/05/f5/549f44d314c29408b962fa2b0e69a1a67c59379fb143b92a0a065ffd1f0f/frozenlist-1.5.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:bdac3c7d9b705d253b2ce370fde941836a5f8b3c5c2b8fd70940a3ea3af7f4f2", size = 287560 }, + { url = "https://files.pythonhosted.org/packages/9d/f8/cb09b3c24a3eac02c4c07a9558e11e9e244fb02bf62c85ac2106d1eb0c0b/frozenlist-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:03d33c2ddbc1816237a67f66336616416e2bbb6beb306e5f890f2eb22b959cdf", size = 277150 }, + { url = "https://files.pythonhosted.org/packages/37/48/38c2db3f54d1501e692d6fe058f45b6ad1b358d82cd19436efab80cfc965/frozenlist-1.5.0-cp311-cp311-win32.whl", hash = "sha256:237f6b23ee0f44066219dae14c70ae38a63f0440ce6750f868ee08775073f942", size = 45244 }, + { url = "https://files.pythonhosted.org/packages/ca/8c/2ddffeb8b60a4bce3b196c32fcc30d8830d4615e7b492ec2071da801b8ad/frozenlist-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:0cc974cc93d32c42e7b0f6cf242a6bd941c57c61b618e78b6c0a96cb72788c1d", size = 51634 }, + { url = "https://files.pythonhosted.org/packages/79/73/fa6d1a96ab7fd6e6d1c3500700963eab46813847f01ef0ccbaa726181dd5/frozenlist-1.5.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:31115ba75889723431aa9a4e77d5f398f5cf976eea3bdf61749731f62d4a4a21", size = 94026 }, + { url = "https://files.pythonhosted.org/packages/ab/04/ea8bf62c8868b8eada363f20ff1b647cf2e93377a7b284d36062d21d81d1/frozenlist-1.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7437601c4d89d070eac8323f121fcf25f88674627505334654fd027b091db09d", size = 54150 }, + { url = "https://files.pythonhosted.org/packages/d0/9a/8e479b482a6f2070b26bda572c5e6889bb3ba48977e81beea35b5ae13ece/frozenlist-1.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7948140d9f8ece1745be806f2bfdf390127cf1a763b925c4a805c603df5e697e", size = 51927 }, + { url = "https://files.pythonhosted.org/packages/e3/12/2aad87deb08a4e7ccfb33600871bbe8f0e08cb6d8224371387f3303654d7/frozenlist-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feeb64bc9bcc6b45c6311c9e9b99406660a9c05ca8a5b30d14a78555088b0b3a", size = 282647 }, + { url = "https://files.pythonhosted.org/packages/77/f2/07f06b05d8a427ea0060a9cef6e63405ea9e0d761846b95ef3fb3be57111/frozenlist-1.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:683173d371daad49cffb8309779e886e59c2f369430ad28fe715f66d08d4ab1a", size = 289052 }, + { url = "https://files.pythonhosted.org/packages/bd/9f/8bf45a2f1cd4aa401acd271b077989c9267ae8463e7c8b1eb0d3f561b65e/frozenlist-1.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7d57d8f702221405a9d9b40f9da8ac2e4a1a8b5285aac6100f3393675f0a85ee", size = 291719 }, + { url = "https://files.pythonhosted.org/packages/41/d1/1f20fd05a6c42d3868709b7604c9f15538a29e4f734c694c6bcfc3d3b935/frozenlist-1.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30c72000fbcc35b129cb09956836c7d7abf78ab5416595e4857d1cae8d6251a6", size = 267433 }, + { url = "https://files.pythonhosted.org/packages/af/f2/64b73a9bb86f5a89fb55450e97cd5c1f84a862d4ff90d9fd1a73ab0f64a5/frozenlist-1.5.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:000a77d6034fbad9b6bb880f7ec073027908f1b40254b5d6f26210d2dab1240e", size = 283591 }, + { url = "https://files.pythonhosted.org/packages/29/e2/ffbb1fae55a791fd6c2938dd9ea779509c977435ba3940b9f2e8dc9d5316/frozenlist-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5d7f5a50342475962eb18b740f3beecc685a15b52c91f7d975257e13e029eca9", size = 273249 }, + { url = "https://files.pythonhosted.org/packages/2e/6e/008136a30798bb63618a114b9321b5971172a5abddff44a100c7edc5ad4f/frozenlist-1.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:87f724d055eb4785d9be84e9ebf0f24e392ddfad00b3fe036e43f489fafc9039", size = 271075 }, + { url = "https://files.pythonhosted.org/packages/ae/f0/4e71e54a026b06724cec9b6c54f0b13a4e9e298cc8db0f82ec70e151f5ce/frozenlist-1.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6e9080bb2fb195a046e5177f10d9d82b8a204c0736a97a153c2466127de87784", size = 285398 }, + { url = "https://files.pythonhosted.org/packages/4d/36/70ec246851478b1c0b59f11ef8ade9c482ff447c1363c2bd5fad45098b12/frozenlist-1.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9b93d7aaa36c966fa42efcaf716e6b3900438632a626fb09c049f6a2f09fc631", size = 294445 }, + { url = "https://files.pythonhosted.org/packages/37/e0/47f87544055b3349b633a03c4d94b405956cf2437f4ab46d0928b74b7526/frozenlist-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:52ef692a4bc60a6dd57f507429636c2af8b6046db8b31b18dac02cbc8f507f7f", size = 280569 }, + { url = "https://files.pythonhosted.org/packages/f9/7c/490133c160fb6b84ed374c266f42800e33b50c3bbab1652764e6e1fc498a/frozenlist-1.5.0-cp312-cp312-win32.whl", hash = "sha256:29d94c256679247b33a3dc96cce0f93cbc69c23bf75ff715919332fdbb6a32b8", size = 44721 }, + { url = "https://files.pythonhosted.org/packages/b1/56/4e45136ffc6bdbfa68c29ca56ef53783ef4c2fd395f7cbf99a2624aa9aaa/frozenlist-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:8969190d709e7c48ea386db202d708eb94bdb29207a1f269bab1196ce0dcca1f", size = 51329 }, + { url = "https://files.pythonhosted.org/packages/da/3b/915f0bca8a7ea04483622e84a9bd90033bab54bdf485479556c74fd5eaf5/frozenlist-1.5.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:7a1a048f9215c90973402e26c01d1cff8a209e1f1b53f72b95c13db61b00f953", size = 91538 }, + { url = "https://files.pythonhosted.org/packages/c7/d1/a7c98aad7e44afe5306a2b068434a5830f1470675f0e715abb86eb15f15b/frozenlist-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dd47a5181ce5fcb463b5d9e17ecfdb02b678cca31280639255ce9d0e5aa67af0", size = 52849 }, + { url = "https://files.pythonhosted.org/packages/3a/c8/76f23bf9ab15d5f760eb48701909645f686f9c64fbb8982674c241fbef14/frozenlist-1.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1431d60b36d15cda188ea222033eec8e0eab488f39a272461f2e6d9e1a8e63c2", size = 50583 }, + { url = "https://files.pythonhosted.org/packages/1f/22/462a3dd093d11df623179d7754a3b3269de3b42de2808cddef50ee0f4f48/frozenlist-1.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6482a5851f5d72767fbd0e507e80737f9c8646ae7fd303def99bfe813f76cf7f", size = 265636 }, + { url = "https://files.pythonhosted.org/packages/80/cf/e075e407fc2ae7328155a1cd7e22f932773c8073c1fc78016607d19cc3e5/frozenlist-1.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:44c49271a937625619e862baacbd037a7ef86dd1ee215afc298a417ff3270608", size = 270214 }, + { url = "https://files.pythonhosted.org/packages/a1/58/0642d061d5de779f39c50cbb00df49682832923f3d2ebfb0fedf02d05f7f/frozenlist-1.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12f78f98c2f1c2429d42e6a485f433722b0061d5c0b0139efa64f396efb5886b", size = 273905 }, + { url = "https://files.pythonhosted.org/packages/ab/66/3fe0f5f8f2add5b4ab7aa4e199f767fd3b55da26e3ca4ce2cc36698e50c4/frozenlist-1.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce3aa154c452d2467487765e3adc730a8c153af77ad84096bc19ce19a2400840", size = 250542 }, + { url = "https://files.pythonhosted.org/packages/f6/b8/260791bde9198c87a465224e0e2bb62c4e716f5d198fc3a1dacc4895dbd1/frozenlist-1.5.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b7dc0c4338e6b8b091e8faf0db3168a37101943e687f373dce00959583f7439", size = 267026 }, + { url = "https://files.pythonhosted.org/packages/2e/a4/3d24f88c527f08f8d44ade24eaee83b2627793fa62fa07cbb7ff7a2f7d42/frozenlist-1.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:45e0896250900b5aa25180f9aec243e84e92ac84bd4a74d9ad4138ef3f5c97de", size = 257690 }, + { url = "https://files.pythonhosted.org/packages/de/9a/d311d660420b2beeff3459b6626f2ab4fb236d07afbdac034a4371fe696e/frozenlist-1.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:561eb1c9579d495fddb6da8959fd2a1fca2c6d060d4113f5844b433fc02f2641", size = 253893 }, + { url = "https://files.pythonhosted.org/packages/c6/23/e491aadc25b56eabd0f18c53bb19f3cdc6de30b2129ee0bc39cd387cd560/frozenlist-1.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:df6e2f325bfee1f49f81aaac97d2aa757c7646534a06f8f577ce184afe2f0a9e", size = 267006 }, + { url = "https://files.pythonhosted.org/packages/08/c4/ab918ce636a35fb974d13d666dcbe03969592aeca6c3ab3835acff01f79c/frozenlist-1.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:140228863501b44b809fb39ec56b5d4071f4d0aa6d216c19cbb08b8c5a7eadb9", size = 276157 }, + { url = "https://files.pythonhosted.org/packages/c0/29/3b7a0bbbbe5a34833ba26f686aabfe982924adbdcafdc294a7a129c31688/frozenlist-1.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7707a25d6a77f5d27ea7dc7d1fc608aa0a478193823f88511ef5e6b8a48f9d03", size = 264642 }, + { url = "https://files.pythonhosted.org/packages/ab/42/0595b3dbffc2e82d7fe658c12d5a5bafcd7516c6bf2d1d1feb5387caa9c1/frozenlist-1.5.0-cp313-cp313-win32.whl", hash = "sha256:31a9ac2b38ab9b5a8933b693db4939764ad3f299fcaa931a3e605bc3460e693c", size = 44914 }, + { url = "https://files.pythonhosted.org/packages/17/c4/b7db1206a3fea44bf3b838ca61deb6f74424a8a5db1dd53ecb21da669be6/frozenlist-1.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:11aabdd62b8b9c4b84081a3c246506d1cddd2dd93ff0ad53ede5defec7886b28", size = 51167 }, + { url = "https://files.pythonhosted.org/packages/c6/c8/a5be5b7550c10858fcf9b0ea054baccab474da77d37f1e828ce043a3a5d4/frozenlist-1.5.0-py3-none-any.whl", hash = "sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3", size = 11901 }, +] + +[[package]] +name = "ghp-import" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "python-dateutil" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d9/29/d40217cbe2f6b1359e00c6c307bb3fc876ba74068cbab3dde77f03ca0dc4/ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343", size = 10943 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619", size = 11034 }, +] + +[[package]] +name = "griffe" +version = "1.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d4/c9/8167810358ca129839156dc002526e7398b5fad4a9d7b6e88b875e802d0d/griffe-1.5.1.tar.gz", hash = "sha256:72964f93e08c553257706d6cd2c42d1c172213feb48b2be386f243380b405d4b", size = 384113 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/00/e693a155da0a2a72fd2df75b8fe338146cae59d590ad6f56800adde90cb5/griffe-1.5.1-py3-none-any.whl", hash = "sha256:ad6a7980f8c424c9102160aafa3bcdf799df0e75f7829d75af9ee5aef656f860", size = 127132 }, +] + +[[package]] +name = "hikari" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "attrs" }, + { name = "colorlog" }, + { name = "multidict" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8f/15/cb7828b457a853fc7048595f27b6f41e22f7bc74aa3f4db983a7da3d275f/hikari-2.1.0.tar.gz", hash = "sha256:498bc39d2777eb5ceeec63e3b08362dda39d966a0f2197867f94e8293bb4a277", size = 442768 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/e0/6f33f884af6c8a78190fca7a96b0cf2059fca8a4dc364f87ec165488794a/hikari-2.1.0-py3-none-any.whl", hash = "sha256:36d2629f5f1df39d3edc7bb8f64996e82f6926f297e18ababcf753120f7f404b", size = 545560 }, +] + +[[package]] +name = "hikari-tanjun" +version = "2.17.7" +source = { editable = "." } +dependencies = [ + { name = "alluka" }, + { name = "hikari" }, + { name = "typing-extensions" }, +] + +[package.dev-dependencies] +docs = [ + { name = "markdown-include" }, + { name = "mkdocs" }, + { name = "mkdocs-material" }, + { name = "mkdocs-minify-plugin" }, + { name = "mkdocstrings", extra = ["python"] }, +] +freeze-locks = [ + { name = "uv" }, +] +lint = [ + { name = "codespell" }, + { name = "pre-commit-hooks" }, + { name = "ruff" }, + { name = "slotscheck" }, +] +publish = [ + { name = "flit" }, +] +reformat = [ + { name = "black" }, + { name = "isort" }, + { name = "pre-commit-hooks" }, + { name = "pycln" }, + { name = "sort-all" }, +] +templating = [ + { name = "jinja2" }, +] +tests = [ + { name = "freezegun" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "pytest-sugar" }, + { name = "pytest-timeout" }, + { name = "pytest-xdist" }, +] +type-checking = [ + { name = "freezegun" }, + { name = "mypy" }, + { name = "nox" }, + { name = "pyright" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "pytest-sugar" }, + { name = "pytest-timeout" }, + { name = "pytest-xdist" }, +] + +[package.metadata] +requires-dist = [ + { name = "alluka", specifier = ">=0.2.0,<1" }, + { name = "hikari", specifier = ">=2.0.0.dev115,<3" }, + { name = "typing-extensions", specifier = ">=4.5,<5" }, +] + +[package.metadata.requires-dev] +docs = [ + { name = "markdown-include", specifier = ">=0.8" }, + { name = "mkdocs", specifier = ">=1.4.2" }, + { name = "mkdocs-material", specifier = ">=8.5.11" }, + { name = "mkdocs-minify-plugin", specifier = ">=0.6.4" }, + { name = "mkdocstrings", extras = ["python"], specifier = ">=0.19" }, +] +freeze-locks = [{ name = "uv" }] +lint = [ + { name = "codespell", specifier = ">=2.2.2" }, + { name = "pre-commit-hooks", specifier = ">=4.4" }, + { name = "ruff" }, + { name = "slotscheck", specifier = ">=0.16.1" }, +] +publish = [{ name = "flit", specifier = ">=3.8.0" }] +reformat = [ + { name = "black", specifier = ">=22.10.0" }, + { name = "isort", specifier = ">=5.11.3" }, + { name = "pre-commit-hooks", specifier = ">=4.4" }, + { name = "pycln", specifier = ">=2.1.2" }, + { name = "sort-all", specifier = ">=1.2" }, +] +templating = [{ name = "jinja2", specifier = ">=3.1.2" }] +tests = [ + { name = "freezegun", specifier = ">=1.2.2" }, + { name = "pytest", specifier = "==7.4.0" }, + { name = "pytest", specifier = ">=7" }, + { name = "pytest-asyncio", specifier = ">=0.20.1" }, + { name = "pytest-cov", specifier = ">=4" }, + { name = "pytest-sugar", specifier = ">=0.9.6" }, + { name = "pytest-timeout", specifier = ">=2.1" }, + { name = "pytest-xdist", specifier = ">=3.1" }, +] +type-checking = [ + { name = "freezegun", specifier = ">=1.2.2" }, + { name = "mypy", specifier = ">=0.991" }, + { name = "nox" }, + { name = "pyright", specifier = ">=1.1.285" }, + { name = "pytest", specifier = "==7.4.0" }, + { name = "pytest", specifier = ">=7" }, + { name = "pytest-asyncio", specifier = ">=0.20.1" }, + { name = "pytest-cov", specifier = ">=4" }, + { name = "pytest-sugar", specifier = ">=0.9.6" }, + { name = "pytest-timeout", specifier = ">=2.1" }, + { name = "pytest-xdist", specifier = ">=3.1" }, +] + +[[package]] +name = "htmlmin2" +version = "0.1.13" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/be/31/a76f4bfa885f93b8167cb4c85cf32b54d1f64384d0b897d45bc6d19b7b45/htmlmin2-0.1.13-py3-none-any.whl", hash = "sha256:75609f2a42e64f7ce57dbff28a39890363bde9e7e5885db633317efbdf8c79a2", size = 34486 }, +] + +[[package]] +name = "idna" +version = "3.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442 }, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, +] + +[[package]] +name = "isort" +version = "5.13.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/87/f9/c1eb8635a24e87ade2efce21e3ce8cd6b8630bb685ddc9cdaca1349b2eb5/isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109", size = 175303 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/b3/8def84f539e7d2289a02f0524b944b15d7c75dab7628bedf1c4f0992029c/isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6", size = 92310 }, +] + +[[package]] +name = "jinja2" +version = "3.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", size = 240245 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d", size = 133271 }, +] + +[[package]] +name = "jsmin" +version = "3.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/73/e01e4c5e11ad0494f4407a3f623ad4d87714909f50b17a06ed121034ff6e/jsmin-3.0.1.tar.gz", hash = "sha256:c0959a121ef94542e807a674142606f7e90214a2b3d1eb17300244bbb5cc2bfc", size = 13925 } + +[[package]] +name = "libcst" +version = "1.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/27/a6/a19b587108b15d3e0bfa8d0944265809581c8b8e161e22c9c9060afbbf4a/libcst-1.5.1.tar.gz", hash = "sha256:71cb294db84df9e410208009c732628e920111683c2f2b2e0c5b71b98464f365", size = 773387 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/c1/83f7ff3a225ad09527b8d15b410e1bba168bafe0d134d93645b1d8b69859/libcst-1.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:db7711a762b0327b581be5a963908fecd74412bdda34db34553faa521563c22d", size = 2123894 }, + { url = "https://files.pythonhosted.org/packages/5b/70/7b765a0a8db8084703fe408ed1c583c434e99b8ec3e7c6192732a1959eb8/libcst-1.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aa524bd012aaae1f485fd44490ef5abf708b14d2addc0f06b28de3e4585c4b9e", size = 2032548 }, + { url = "https://files.pythonhosted.org/packages/3c/01/d4111674d3cfe817c12ef79f8d39b2058a3bd8cd01a307a7db62118cd0ed/libcst-1.5.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3ffb8135c09e41e8cf710b152c33e9b7f1d0d0b9f242bae0c502eb082fdb1fb", size = 2173948 }, + { url = "https://files.pythonhosted.org/packages/4e/3b/0e7698e7715d2ed44512718dd6f45d5d698498b5c9fa906b4028a369a7f6/libcst-1.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76a8ac7a84f9b6f678a668bff85b360e0a93fa8d7f25a74a206a28110734bb2a", size = 2264422 }, + { url = "https://files.pythonhosted.org/packages/0d/c4/a76444a28015fb7327cfdbde7d3f88f633e88fce2fe910c7aaa7d4780422/libcst-1.5.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:89c808bdb5fa9ca02df41dd234cbb0e9de0d2e0c029c7063d5435a9f6781cc10", size = 2341569 }, + { url = "https://files.pythonhosted.org/packages/54/1c/3f116e3baa47f71929467b404643c09e31af7acb77de8d2b3fe5d1b06212/libcst-1.5.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:40fbbaa8b839bfbfa5b300623ca2b6b0768b58bbc31b341afbc99110c9bee232", size = 2219836 }, + { url = "https://files.pythonhosted.org/packages/ea/f7/746b6d91125cf1f398889d1b4488b10cc3df6b35d9762c2131294a1e8217/libcst-1.5.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c7021e3904d8d088c369afc3fe17c279883e583415ef07edacadba76cfbecd27", size = 2325108 }, + { url = "https://files.pythonhosted.org/packages/fc/82/260932412cd9d6c1ac60283889adc18c21ffc55c8b5b63309b95bc277f76/libcst-1.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:f053a5deb6a214972dbe9fa26ecd8255edb903de084a3d7715bf9e9da8821c50", size = 2031804 }, + { url = "https://files.pythonhosted.org/packages/8f/0c/eac92358d05e75516f15654fb1550c9af165ce5a19f2b8adf44916ebebc4/libcst-1.5.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:666813950b8637af0c0e96b1ca46f5d5f183d2fe50bbac2186f5b283a99f3529", size = 2122234 }, + { url = "https://files.pythonhosted.org/packages/b3/26/6925af831f039e27eb380ba64448f33aea255ab6ecae6b5deec6ec637197/libcst-1.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b7b58b36022ae77a5a00002854043ae95c03e92f6062ad08473eff326f32efa0", size = 2031324 }, + { url = "https://files.pythonhosted.org/packages/e0/87/1b593bdddcb0d38d2232dab96b1f92deb2481c72063394f0394f680ff5b3/libcst-1.5.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eeb13d7c598fe9a798a1d22eae56ab3d3d599b38b83436039bd6ae229fc854d7", size = 2172432 }, + { url = "https://files.pythonhosted.org/packages/88/27/966f9fe2652aa496a85503333559937e58979eef674f9803c995d6704c44/libcst-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5987daff8389b0df60b5c20499ff4fb73fc03cb3ae1f6a746eefd204ed08df85", size = 2263445 }, + { url = "https://files.pythonhosted.org/packages/ff/79/f172226edbdd5b3a31d3c270e4407b35e3f5b0c6e404967e42314f1b434e/libcst-1.5.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00f3d2f32ee081bad3394546b0b9ac5e31686d3b5cfe4892d716d2ba65f9ec08", size = 2343044 }, + { url = "https://files.pythonhosted.org/packages/91/f2/664ae80583c66bcc3a2debcc8bab04e6843c3a6ac02e94050dddb5e5909c/libcst-1.5.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1ff21005c33b634957a98db438e882522febf1cacc62fa716f29e163a3f5871a", size = 2217129 }, + { url = "https://files.pythonhosted.org/packages/8b/df/b6b506d50f0a00a49d4e6217fd521c208cbf8693687cd0ac5880507ca6d1/libcst-1.5.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:15697ea9f1edbb9a263364d966c72abda07195d1c1a6838eb79af057f1040770", size = 2322129 }, + { url = "https://files.pythonhosted.org/packages/eb/84/9c79a0aa5334f39a86844d32ef474491a817e9eefaa8f23fc81e7ad07d8b/libcst-1.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:cedd4c8336e01c51913113fbf5566b8f61a86d90f3d5cc5b1cb5049575622c5f", size = 2032278 }, + { url = "https://files.pythonhosted.org/packages/ff/68/89e1f0aa5697d9d7c9a78f630ffb65c43d5820008e5141504206836b86ce/libcst-1.5.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:06a9b4c9b76da4a7399e6f1f3a325196fb5febd3ea59fac1f68e2116f3517cd8", size = 2122230 }, + { url = "https://files.pythonhosted.org/packages/0f/1a/c23ab5bccd26f08c7faf982a3a2ab7a78d39502c4304585d107a160d9aa4/libcst-1.5.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:940ec4c8db4c2d620a7268d6c83e64ff646e4afd74ae5183d0f0ef3b80e05be0", size = 2031325 }, + { url = "https://files.pythonhosted.org/packages/d6/5b/a0f1bbd74054ef592c32ec0956ba083585af9b835c19a8d4b78ba536ec55/libcst-1.5.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbccb016b1ac6d892344300dcccc8a16887b71bb7f875ba56c0ed6c1a7ade8be", size = 2172432 }, + { url = "https://files.pythonhosted.org/packages/42/d4/ad8af53181fbcd44913925498bdd05d2a76f170253883c0183cf237c5173/libcst-1.5.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c615af2117320e9a218083c83ec61227d3547e38a0de80329376971765f27a9e", size = 2263442 }, + { url = "https://files.pythonhosted.org/packages/c5/ed/a152f3b0b34c833a09c424336fd464b5b053b1e07e012a95887a7292c55a/libcst-1.5.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02b38fa4d9f13e79fe69e9b5407b9e173557bcfb5960f7866cf4145af9c7ae09", size = 2343045 }, + { url = "https://files.pythonhosted.org/packages/d1/43/d84090dc9b560ee1586e8ec8e3af34488695c52df244a0d9c3a473401e01/libcst-1.5.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:3334afe9e7270e175de01198f816b0dc78dda94d9d72152b61851c323e4e741e", size = 2217130 }, + { url = "https://files.pythonhosted.org/packages/7a/95/c82b3f9fde6d5476837111e05d563542b5922ebe929c849e67c2a4ef2638/libcst-1.5.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:26c804fa8091747128579013df0b5f8e6b0c7904d9c4ee83841f136f53e18684", size = 2322130 }, + { url = "https://files.pythonhosted.org/packages/53/54/3bf26fc2cd9f3b5a1ce4f574ddd1238b96d6e4a9c1c0fccd0c10f7e84e59/libcst-1.5.1-cp313-cp313-win_amd64.whl", hash = "sha256:b5a0d3c632aa2b21c5fa145e4e8dbf86f45c9b37a64c0b7221a5a45caf58915a", size = 2032277 }, +] + +[[package]] +name = "markdown" +version = "3.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/28/3af612670f82f4c056911fbbbb42760255801b3068c48de792d354ff4472/markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2", size = 357086 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/08/83871f3c50fc983b88547c196d11cf8c3340e37c32d2e9d6152abe2c61f7/Markdown-3.7-py3-none-any.whl", hash = "sha256:7eb6df5690b81a1d7942992c97fad2938e956e79df20cbc6186e9c3a77b1c803", size = 106349 }, +] + +[[package]] +name = "markdown-include" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ad/d8/66bf162fe6c1adb619f94a6da599323eecacf15b6d57469d0fd0421c10df/markdown-include-0.8.1.tar.gz", hash = "sha256:1d0623e0fc2757c38d35df53752768356162284259d259c486b4ab6285cdbbe3", size = 21873 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d7/e2/c4d20b21a05fe0fee571649cebc05f7f72e80b1a743f932e7326125e6c9e/markdown_include-0.8.1-py3-none-any.whl", hash = "sha256:32f0635b9cfef46997b307e2430022852529f7a5b87c0075c504283e7cc7db53", size = 18837 }, +] + +[[package]] +name = "markdown-it-py" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528 }, +] + +[[package]] +name = "markupsafe" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6b/28/bbf83e3f76936960b850435576dd5e67034e200469571be53f69174a2dfd/MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", size = 14353 }, + { url = "https://files.pythonhosted.org/packages/6c/30/316d194b093cde57d448a4c3209f22e3046c5bb2fb0820b118292b334be7/MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", size = 12392 }, + { url = "https://files.pythonhosted.org/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", size = 23984 }, + { url = "https://files.pythonhosted.org/packages/f1/a4/aefb044a2cd8d7334c8a47d3fb2c9f328ac48cb349468cc31c20b539305f/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", size = 23120 }, + { url = "https://files.pythonhosted.org/packages/8d/21/5e4851379f88f3fad1de30361db501300d4f07bcad047d3cb0449fc51f8c/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", size = 23032 }, + { url = "https://files.pythonhosted.org/packages/00/7b/e92c64e079b2d0d7ddf69899c98842f3f9a60a1ae72657c89ce2655c999d/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", size = 24057 }, + { url = "https://files.pythonhosted.org/packages/f9/ac/46f960ca323037caa0a10662ef97d0a4728e890334fc156b9f9e52bcc4ca/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", size = 23359 }, + { url = "https://files.pythonhosted.org/packages/69/84/83439e16197337b8b14b6a5b9c2105fff81d42c2a7c5b58ac7b62ee2c3b1/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", size = 23306 }, + { url = "https://files.pythonhosted.org/packages/9a/34/a15aa69f01e2181ed8d2b685c0d2f6655d5cca2c4db0ddea775e631918cd/MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", size = 15094 }, + { url = "https://files.pythonhosted.org/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", size = 15521 }, + { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274 }, + { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348 }, + { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149 }, + { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118 }, + { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993 }, + { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178 }, + { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319 }, + { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352 }, + { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097 }, + { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601 }, + { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274 }, + { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352 }, + { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122 }, + { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085 }, + { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978 }, + { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208 }, + { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357 }, + { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344 }, + { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101 }, + { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603 }, + { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510 }, + { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486 }, + { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480 }, + { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914 }, + { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796 }, + { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473 }, + { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114 }, + { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098 }, + { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208 }, + { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739 }, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979 }, +] + +[[package]] +name = "mergedeep" +version = "1.3.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8", size = 4661 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/19/04f9b178c2d8a15b076c8b5140708fa6ffc5601fb6f1e975537072df5b2a/mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307", size = 6354 }, +] + +[[package]] +name = "mkdocs" +version = "1.6.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "ghp-import" }, + { name = "jinja2" }, + { name = "markdown" }, + { name = "markupsafe" }, + { name = "mergedeep" }, + { name = "mkdocs-get-deps" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "pyyaml" }, + { name = "pyyaml-env-tag" }, + { name = "watchdog" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bc/c6/bbd4f061bd16b378247f12953ffcb04786a618ce5e904b8c5a01a0309061/mkdocs-1.6.1.tar.gz", hash = "sha256:7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2", size = 3889159 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/5b/dbc6a8cddc9cfa9c4971d59fb12bb8d42e161b7e7f8cc89e49137c5b279c/mkdocs-1.6.1-py3-none-any.whl", hash = "sha256:db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e", size = 3864451 }, +] + +[[package]] +name = "mkdocs-autorefs" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, + { name = "markupsafe" }, + { name = "mkdocs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fb/ae/0f1154c614d6a8b8a36fff084e5b82af3a15f7d2060cf0dcdb1c53297a71/mkdocs_autorefs-1.2.0.tar.gz", hash = "sha256:a86b93abff653521bda71cf3fc5596342b7a23982093915cb74273f67522190f", size = 40262 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/26/4d39d52ea2219604053a4d05b98e90d6a335511cc01806436ec4886b1028/mkdocs_autorefs-1.2.0-py3-none-any.whl", hash = "sha256:d588754ae89bd0ced0c70c06f58566a4ee43471eeeee5202427da7de9ef85a2f", size = 16522 }, +] + +[[package]] +name = "mkdocs-get-deps" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mergedeep" }, + { name = "platformdirs" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c", size = 10239 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/d4/029f984e8d3f3b6b726bd33cafc473b75e9e44c0f7e80a5b29abc466bdea/mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134", size = 9521 }, +] + +[[package]] +name = "mkdocs-material" +version = "9.5.46" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "babel" }, + { name = "colorama" }, + { name = "jinja2" }, + { name = "markdown" }, + { name = "mkdocs" }, + { name = "mkdocs-material-extensions" }, + { name = "paginate" }, + { name = "pygments" }, + { name = "pymdown-extensions" }, + { name = "regex" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/79/f1/3efdd8f000e497e9a13ba9429d4fdeb0d87f0f876bebd7d8613ff86a8910/mkdocs_material-9.5.46.tar.gz", hash = "sha256:ae2043f4238e572f9a40e0b577f50400d6fc31e2fef8ea141800aebf3bd273d7", size = 3910723 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/64/af210ec1bc40fb2f195b7feede4c895c54c94acc48b108a2ad28b79d226f/mkdocs_material-9.5.46-py3-none-any.whl", hash = "sha256:98f0a2039c62e551a68aad0791a8d41324ff90c03a6e6cea381a384b84908b83", size = 8625807 }, +] + +[[package]] +name = "mkdocs-material-extensions" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443", size = 11847 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31", size = 8728 }, +] + +[[package]] +name = "mkdocs-minify-plugin" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "csscompressor" }, + { name = "htmlmin2" }, + { name = "jsmin" }, + { name = "mkdocs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/52/67/fe4b77e7a8ae7628392e28b14122588beaf6078b53eb91c7ed000fd158ac/mkdocs-minify-plugin-0.8.0.tar.gz", hash = "sha256:bc11b78b8120d79e817308e2b11539d790d21445eb63df831e393f76e52e753d", size = 8366 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/cd/2e8d0d92421916e2ea4ff97f10a544a9bd5588eb747556701c983581df13/mkdocs_minify_plugin-0.8.0-py3-none-any.whl", hash = "sha256:5fba1a3f7bd9a2142c9954a6559a57e946587b21f133165ece30ea145c66aee6", size = 6723 }, +] + +[[package]] +name = "mkdocstrings" +version = "0.27.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "jinja2" }, + { name = "markdown" }, + { name = "markupsafe" }, + { name = "mkdocs" }, + { name = "mkdocs-autorefs" }, + { name = "platformdirs" }, + { name = "pymdown-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e2/5a/5de70538c2cefae7ac3a15b5601e306ef3717290cb2aab11d51cbbc2d1c0/mkdocstrings-0.27.0.tar.gz", hash = "sha256:16adca6d6b0a1f9e0c07ff0b02ced8e16f228a9d65a37c063ec4c14d7b76a657", size = 94830 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cd/10/4c27c3063c2b3681a4b7942f8dbdeb4fa34fecb2c19b594e7345ebf4f86f/mkdocstrings-0.27.0-py3-none-any.whl", hash = "sha256:6ceaa7ea830770959b55a16203ac63da24badd71325b96af950e59fd37366332", size = 30658 }, +] + +[package.optional-dependencies] +python = [ + { name = "mkdocstrings-python" }, +] + +[[package]] +name = "mkdocstrings-python" +version = "1.12.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "griffe" }, + { name = "mkdocs-autorefs" }, + { name = "mkdocstrings" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/23/ec/cb6debe2db77f1ef42b25b21d93b5021474de3037cd82385e586aee72545/mkdocstrings_python-1.12.2.tar.gz", hash = "sha256:7a1760941c0b52a2cd87b960a9e21112ffe52e7df9d0b9583d04d47ed2e186f3", size = 168207 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5b/c1/ac524e1026d9580cbc654b5d19f5843c8b364a66d30f956372cd09fd2f92/mkdocstrings_python-1.12.2-py3-none-any.whl", hash = "sha256:7f7d40d6db3cb1f5d19dbcd80e3efe4d0ba32b073272c0c0de9de2e604eda62a", size = 111759 }, +] + +[[package]] +name = "multidict" +version = "6.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/be/504b89a5e9ca731cd47487e91c469064f8ae5af93b7259758dcfc2b9c848/multidict-6.1.0.tar.gz", hash = "sha256:22ae2ebf9b0c69d206c003e2f6a914ea33f0a932d4aa16f236afc049d9958f4a", size = 64002 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/93/13/df3505a46d0cd08428e4c8169a196131d1b0c4b515c3649829258843dde6/multidict-6.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3efe2c2cb5763f2f1b275ad2bf7a287d3f7ebbef35648a9726e3b69284a4f3d6", size = 48570 }, + { url = "https://files.pythonhosted.org/packages/f0/e1/a215908bfae1343cdb72f805366592bdd60487b4232d039c437fe8f5013d/multidict-6.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7053d3b0353a8b9de430a4f4b4268ac9a4fb3481af37dfe49825bf45ca24156", size = 29316 }, + { url = "https://files.pythonhosted.org/packages/70/0f/6dc70ddf5d442702ed74f298d69977f904960b82368532c88e854b79f72b/multidict-6.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:27e5fc84ccef8dfaabb09d82b7d179c7cf1a3fbc8a966f8274fcb4ab2eb4cadb", size = 29640 }, + { url = "https://files.pythonhosted.org/packages/d8/6d/9c87b73a13d1cdea30b321ef4b3824449866bd7f7127eceed066ccb9b9ff/multidict-6.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e2b90b43e696f25c62656389d32236e049568b39320e2735d51f08fd362761b", size = 131067 }, + { url = "https://files.pythonhosted.org/packages/cc/1e/1b34154fef373371fd6c65125b3d42ff5f56c7ccc6bfff91b9b3c60ae9e0/multidict-6.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d83a047959d38a7ff552ff94be767b7fd79b831ad1cd9920662db05fec24fe72", size = 138507 }, + { url = "https://files.pythonhosted.org/packages/fb/e0/0bc6b2bac6e461822b5f575eae85da6aae76d0e2a79b6665d6206b8e2e48/multidict-6.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d1a9dd711d0877a1ece3d2e4fea11a8e75741ca21954c919406b44e7cf971304", size = 133905 }, + { url = "https://files.pythonhosted.org/packages/ba/af/73d13b918071ff9b2205fcf773d316e0f8fefb4ec65354bbcf0b10908cc6/multidict-6.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec2abea24d98246b94913b76a125e855eb5c434f7c46546046372fe60f666351", size = 129004 }, + { url = "https://files.pythonhosted.org/packages/74/21/23960627b00ed39643302d81bcda44c9444ebcdc04ee5bedd0757513f259/multidict-6.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4867cafcbc6585e4b678876c489b9273b13e9fff9f6d6d66add5e15d11d926cb", size = 121308 }, + { url = "https://files.pythonhosted.org/packages/8b/5c/cf282263ffce4a596ed0bb2aa1a1dddfe1996d6a62d08842a8d4b33dca13/multidict-6.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5b48204e8d955c47c55b72779802b219a39acc3ee3d0116d5080c388970b76e3", size = 132608 }, + { url = "https://files.pythonhosted.org/packages/d7/3e/97e778c041c72063f42b290888daff008d3ab1427f5b09b714f5a8eff294/multidict-6.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:d8fff389528cad1618fb4b26b95550327495462cd745d879a8c7c2115248e399", size = 127029 }, + { url = "https://files.pythonhosted.org/packages/47/ac/3efb7bfe2f3aefcf8d103e9a7162572f01936155ab2f7ebcc7c255a23212/multidict-6.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:a7a9541cd308eed5e30318430a9c74d2132e9a8cb46b901326272d780bf2d423", size = 137594 }, + { url = "https://files.pythonhosted.org/packages/42/9b/6c6e9e8dc4f915fc90a9b7798c44a30773dea2995fdcb619870e705afe2b/multidict-6.1.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:da1758c76f50c39a2efd5e9859ce7d776317eb1dd34317c8152ac9251fc574a3", size = 134556 }, + { url = "https://files.pythonhosted.org/packages/1d/10/8e881743b26aaf718379a14ac58572a240e8293a1c9d68e1418fb11c0f90/multidict-6.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c943a53e9186688b45b323602298ab727d8865d8c9ee0b17f8d62d14b56f0753", size = 130993 }, + { url = "https://files.pythonhosted.org/packages/45/84/3eb91b4b557442802d058a7579e864b329968c8d0ea57d907e7023c677f2/multidict-6.1.0-cp311-cp311-win32.whl", hash = "sha256:90f8717cb649eea3504091e640a1b8568faad18bd4b9fcd692853a04475a4b80", size = 26405 }, + { url = "https://files.pythonhosted.org/packages/9f/0b/ad879847ecbf6d27e90a6eabb7eff6b62c129eefe617ea45eae7c1f0aead/multidict-6.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:82176036e65644a6cc5bd619f65f6f19781e8ec2e5330f51aa9ada7504cc1926", size = 28795 }, + { url = "https://files.pythonhosted.org/packages/fd/16/92057c74ba3b96d5e211b553895cd6dc7cc4d1e43d9ab8fafc727681ef71/multidict-6.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b04772ed465fa3cc947db808fa306d79b43e896beb677a56fb2347ca1a49c1fa", size = 48713 }, + { url = "https://files.pythonhosted.org/packages/94/3d/37d1b8893ae79716179540b89fc6a0ee56b4a65fcc0d63535c6f5d96f217/multidict-6.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6180c0ae073bddeb5a97a38c03f30c233e0a4d39cd86166251617d1bbd0af436", size = 29516 }, + { url = "https://files.pythonhosted.org/packages/a2/12/adb6b3200c363062f805275b4c1e656be2b3681aada66c80129932ff0bae/multidict-6.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:071120490b47aa997cca00666923a83f02c7fbb44f71cf7f136df753f7fa8761", size = 29557 }, + { url = "https://files.pythonhosted.org/packages/47/e9/604bb05e6e5bce1e6a5cf80a474e0f072e80d8ac105f1b994a53e0b28c42/multidict-6.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50b3a2710631848991d0bf7de077502e8994c804bb805aeb2925a981de58ec2e", size = 130170 }, + { url = "https://files.pythonhosted.org/packages/7e/13/9efa50801785eccbf7086b3c83b71a4fb501a4d43549c2f2f80b8787d69f/multidict-6.1.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b58c621844d55e71c1b7f7c498ce5aa6985d743a1a59034c57a905b3f153c1ef", size = 134836 }, + { url = "https://files.pythonhosted.org/packages/bf/0f/93808b765192780d117814a6dfcc2e75de6dcc610009ad408b8814dca3ba/multidict-6.1.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:55b6d90641869892caa9ca42ff913f7ff1c5ece06474fbd32fb2cf6834726c95", size = 133475 }, + { url = "https://files.pythonhosted.org/packages/d3/c8/529101d7176fe7dfe1d99604e48d69c5dfdcadb4f06561f465c8ef12b4df/multidict-6.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b820514bfc0b98a30e3d85462084779900347e4d49267f747ff54060cc33925", size = 131049 }, + { url = "https://files.pythonhosted.org/packages/ca/0c/fc85b439014d5a58063e19c3a158a889deec399d47b5269a0f3b6a2e28bc/multidict-6.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:10a9b09aba0c5b48c53761b7c720aaaf7cf236d5fe394cd399c7ba662d5f9966", size = 120370 }, + { url = "https://files.pythonhosted.org/packages/db/46/d4416eb20176492d2258fbd47b4abe729ff3b6e9c829ea4236f93c865089/multidict-6.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1e16bf3e5fc9f44632affb159d30a437bfe286ce9e02754759be5536b169b305", size = 125178 }, + { url = "https://files.pythonhosted.org/packages/5b/46/73697ad7ec521df7de5531a32780bbfd908ded0643cbe457f981a701457c/multidict-6.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76f364861c3bfc98cbbcbd402d83454ed9e01a5224bb3a28bf70002a230f73e2", size = 119567 }, + { url = "https://files.pythonhosted.org/packages/cd/ed/51f060e2cb0e7635329fa6ff930aa5cffa17f4c7f5c6c3ddc3500708e2f2/multidict-6.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:820c661588bd01a0aa62a1283f20d2be4281b086f80dad9e955e690c75fb54a2", size = 129822 }, + { url = "https://files.pythonhosted.org/packages/df/9e/ee7d1954b1331da3eddea0c4e08d9142da5f14b1321c7301f5014f49d492/multidict-6.1.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:0e5f362e895bc5b9e67fe6e4ded2492d8124bdf817827f33c5b46c2fe3ffaca6", size = 128656 }, + { url = "https://files.pythonhosted.org/packages/77/00/8538f11e3356b5d95fa4b024aa566cde7a38aa7a5f08f4912b32a037c5dc/multidict-6.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3ec660d19bbc671e3a6443325f07263be452c453ac9e512f5eb935e7d4ac28b3", size = 125360 }, + { url = "https://files.pythonhosted.org/packages/be/05/5d334c1f2462d43fec2363cd00b1c44c93a78c3925d952e9a71caf662e96/multidict-6.1.0-cp312-cp312-win32.whl", hash = "sha256:58130ecf8f7b8112cdb841486404f1282b9c86ccb30d3519faf301b2e5659133", size = 26382 }, + { url = "https://files.pythonhosted.org/packages/a3/bf/f332a13486b1ed0496d624bcc7e8357bb8053823e8cd4b9a18edc1d97e73/multidict-6.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:188215fc0aafb8e03341995e7c4797860181562380f81ed0a87ff455b70bf1f1", size = 28529 }, + { url = "https://files.pythonhosted.org/packages/22/67/1c7c0f39fe069aa4e5d794f323be24bf4d33d62d2a348acdb7991f8f30db/multidict-6.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d569388c381b24671589335a3be6e1d45546c2988c2ebe30fdcada8457a31008", size = 48771 }, + { url = "https://files.pythonhosted.org/packages/3c/25/c186ee7b212bdf0df2519eacfb1981a017bda34392c67542c274651daf23/multidict-6.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:052e10d2d37810b99cc170b785945421141bf7bb7d2f8799d431e7db229c385f", size = 29533 }, + { url = "https://files.pythonhosted.org/packages/67/5e/04575fd837e0958e324ca035b339cea174554f6f641d3fb2b4f2e7ff44a2/multidict-6.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f90c822a402cb865e396a504f9fc8173ef34212a342d92e362ca498cad308e28", size = 29595 }, + { url = "https://files.pythonhosted.org/packages/d3/b2/e56388f86663810c07cfe4a3c3d87227f3811eeb2d08450b9e5d19d78876/multidict-6.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b225d95519a5bf73860323e633a664b0d85ad3d5bede6d30d95b35d4dfe8805b", size = 130094 }, + { url = "https://files.pythonhosted.org/packages/6c/ee/30ae9b4186a644d284543d55d491fbd4239b015d36b23fea43b4c94f7052/multidict-6.1.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:23bfd518810af7de1116313ebd9092cb9aa629beb12f6ed631ad53356ed6b86c", size = 134876 }, + { url = "https://files.pythonhosted.org/packages/84/c7/70461c13ba8ce3c779503c70ec9d0345ae84de04521c1f45a04d5f48943d/multidict-6.1.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c09fcfdccdd0b57867577b719c69e347a436b86cd83747f179dbf0cc0d4c1f3", size = 133500 }, + { url = "https://files.pythonhosted.org/packages/4a/9f/002af221253f10f99959561123fae676148dd730e2daa2cd053846a58507/multidict-6.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf6bea52ec97e95560af5ae576bdac3aa3aae0b6758c6efa115236d9e07dae44", size = 131099 }, + { url = "https://files.pythonhosted.org/packages/82/42/d1c7a7301d52af79d88548a97e297f9d99c961ad76bbe6f67442bb77f097/multidict-6.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57feec87371dbb3520da6192213c7d6fc892d5589a93db548331954de8248fd2", size = 120403 }, + { url = "https://files.pythonhosted.org/packages/68/f3/471985c2c7ac707547553e8f37cff5158030d36bdec4414cb825fbaa5327/multidict-6.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0c3f390dc53279cbc8ba976e5f8035eab997829066756d811616b652b00a23a3", size = 125348 }, + { url = "https://files.pythonhosted.org/packages/67/2c/e6df05c77e0e433c214ec1d21ddd203d9a4770a1f2866a8ca40a545869a0/multidict-6.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:59bfeae4b25ec05b34f1956eaa1cb38032282cd4dfabc5056d0a1ec4d696d3aa", size = 119673 }, + { url = "https://files.pythonhosted.org/packages/c5/cd/bc8608fff06239c9fb333f9db7743a1b2eafe98c2666c9a196e867a3a0a4/multidict-6.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b2f59caeaf7632cc633b5cf6fc449372b83bbdf0da4ae04d5be36118e46cc0aa", size = 129927 }, + { url = "https://files.pythonhosted.org/packages/44/8e/281b69b7bc84fc963a44dc6e0bbcc7150e517b91df368a27834299a526ac/multidict-6.1.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:37bb93b2178e02b7b618893990941900fd25b6b9ac0fa49931a40aecdf083fe4", size = 128711 }, + { url = "https://files.pythonhosted.org/packages/12/a4/63e7cd38ed29dd9f1881d5119f272c898ca92536cdb53ffe0843197f6c85/multidict-6.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4e9f48f58c2c523d5a06faea47866cd35b32655c46b443f163d08c6d0ddb17d6", size = 125519 }, + { url = "https://files.pythonhosted.org/packages/38/e0/4f5855037a72cd8a7a2f60a3952d9aa45feedb37ae7831642102604e8a37/multidict-6.1.0-cp313-cp313-win32.whl", hash = "sha256:3a37ffb35399029b45c6cc33640a92bef403c9fd388acce75cdc88f58bd19a81", size = 26426 }, + { url = "https://files.pythonhosted.org/packages/7e/a5/17ee3a4db1e310b7405f5d25834460073a8ccd86198ce044dfaf69eac073/multidict-6.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:e9aa71e15d9d9beaad2c6b9319edcdc0a49a43ef5c0a4c8265ca9ee7d6c67774", size = 28531 }, + { url = "https://files.pythonhosted.org/packages/99/b7/b9e70fde2c0f0c9af4cc5277782a89b66d35948ea3369ec9f598358c3ac5/multidict-6.1.0-py3-none-any.whl", hash = "sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506", size = 10051 }, +] + +[[package]] +name = "mypy" +version = "1.13.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mypy-extensions" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e8/21/7e9e523537991d145ab8a0a2fd98548d67646dc2aaaf6091c31ad883e7c1/mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e", size = 3152532 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/19/de0822609e5b93d02579075248c7aa6ceaddcea92f00bf4ea8e4c22e3598/mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d", size = 10939027 }, + { url = "https://files.pythonhosted.org/packages/c8/71/6950fcc6ca84179137e4cbf7cf41e6b68b4a339a1f5d3e954f8c34e02d66/mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d", size = 10108699 }, + { url = "https://files.pythonhosted.org/packages/26/50/29d3e7dd166e74dc13d46050b23f7d6d7533acf48f5217663a3719db024e/mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b", size = 12506263 }, + { url = "https://files.pythonhosted.org/packages/3f/1d/676e76f07f7d5ddcd4227af3938a9c9640f293b7d8a44dd4ff41d4db25c1/mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73", size = 12984688 }, + { url = "https://files.pythonhosted.org/packages/9c/03/5a85a30ae5407b1d28fab51bd3e2103e52ad0918d1e68f02a7778669a307/mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca", size = 9626811 }, + { url = "https://files.pythonhosted.org/packages/fb/31/c526a7bd2e5c710ae47717c7a5f53f616db6d9097caf48ad650581e81748/mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5", size = 11077900 }, + { url = "https://files.pythonhosted.org/packages/83/67/b7419c6b503679d10bd26fc67529bc6a1f7a5f220bbb9f292dc10d33352f/mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e", size = 10074818 }, + { url = "https://files.pythonhosted.org/packages/ba/07/37d67048786ae84e6612575e173d713c9a05d0ae495dde1e68d972207d98/mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2", size = 12589275 }, + { url = "https://files.pythonhosted.org/packages/1f/17/b1018c6bb3e9f1ce3956722b3bf91bff86c1cefccca71cec05eae49d6d41/mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0", size = 13037783 }, + { url = "https://files.pythonhosted.org/packages/cb/32/cd540755579e54a88099aee0287086d996f5a24281a673f78a0e14dba150/mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2", size = 9726197 }, + { url = "https://files.pythonhosted.org/packages/11/bb/ab4cfdc562cad80418f077d8be9b4491ee4fb257440da951b85cbb0a639e/mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7", size = 11069721 }, + { url = "https://files.pythonhosted.org/packages/59/3b/a393b1607cb749ea2c621def5ba8c58308ff05e30d9dbdc7c15028bca111/mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62", size = 10063996 }, + { url = "https://files.pythonhosted.org/packages/d1/1f/6b76be289a5a521bb1caedc1f08e76ff17ab59061007f201a8a18cc514d1/mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8", size = 12584043 }, + { url = "https://files.pythonhosted.org/packages/a6/83/5a85c9a5976c6f96e3a5a7591aa28b4a6ca3a07e9e5ba0cec090c8b596d6/mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7", size = 13036996 }, + { url = "https://files.pythonhosted.org/packages/b4/59/c39a6f752f1f893fccbcf1bdd2aca67c79c842402b5283563d006a67cf76/mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc", size = 9737709 }, + { url = "https://files.pythonhosted.org/packages/3b/86/72ce7f57431d87a7ff17d442f521146a6585019eb8f4f31b7c02801f78ad/mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a", size = 2647043 }, +] + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/98/a4/1ab47638b92648243faf97a5aeb6ea83059cc3624972ab6b8d2316078d3f/mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782", size = 4433 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", size = 4695 }, +] + +[[package]] +name = "nodeenv" +version = "1.9.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314 }, +] + +[[package]] +name = "nox" +version = "2024.10.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "argcomplete" }, + { name = "colorlog" }, + { name = "packaging" }, + { name = "virtualenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/08/93/4df547afcd56e0b2bbaa99bc2637deb218a01802ed62d80f763189be802c/nox-2024.10.9.tar.gz", hash = "sha256:7aa9dc8d1c27e9f45ab046ffd1c3b2c4f7c91755304769df231308849ebded95", size = 4003197 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/66/00/981f0dcaddf111b6caf6e03d7f7f01b07fd4af117316a7eb1c22039d9e37/nox-2024.10.9-py3-none-any.whl", hash = "sha256:1d36f309a0a2a853e9bccb76bbef6bb118ba92fa92674d15604ca99adeb29eab", size = 61210 }, +] + +[[package]] +name = "packaging" +version = "24.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, +] + +[[package]] +name = "paginate" +version = "0.5.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ec/46/68dde5b6bc00c1296ec6466ab27dddede6aec9af1b99090e1107091b3b84/paginate-0.5.7.tar.gz", hash = "sha256:22bd083ab41e1a8b4f3690544afb2c60c25e5c9a63a30fa2f483f6c60c8e5945", size = 19252 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/96/04b8e52da071d28f5e21a805b19cb9390aa17a47462ac87f5e2696b9566d/paginate-0.5.7-py2.py3-none-any.whl", hash = "sha256:b885e2af73abcf01d9559fd5216b57ef722f8c42affbb63942377668e35c7591", size = 13746 }, +] + +[[package]] +name = "pathspec" +version = "0.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191 }, +] + +[[package]] +name = "pip" +version = "24.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f4/b1/b422acd212ad7eedddaf7981eee6e5de085154ff726459cf2da7c5a184c1/pip-24.3.1.tar.gz", hash = "sha256:ebcb60557f2aefabc2e0f918751cd24ea0d56d8ec5445fe1807f1d2109660b99", size = 1931073 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl", hash = "sha256:3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed", size = 1822182 }, +] + +[[package]] +name = "platformdirs" +version = "4.3.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439 }, +] + +[[package]] +name = "pluggy" +version = "1.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, +] + +[[package]] +name = "pre-commit-hooks" +version = "5.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ruamel-yaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ac/7d/3299241a753c738d114600c360d754550b28c285281dc6a5132c4ccfae65/pre_commit_hooks-5.0.0.tar.gz", hash = "sha256:10626959a9eaf602fbfc22bc61b6e75801436f82326bfcee82bb1f2fc4bc646e", size = 29747 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/29/db1d855a661c02dbde5cab3057969133fcc62e7a0c6393e48fe9d0e81679/pre_commit_hooks-5.0.0-py2.py3-none-any.whl", hash = "sha256:8d71cfb582c5c314a5498d94e0104b6567a8b93fb35903ea845c491f4e290a7a", size = 41245 }, +] + +[[package]] +name = "propcache" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a9/4d/5e5a60b78dbc1d464f8a7bbaeb30957257afdc8512cbb9dfd5659304f5cd/propcache-0.2.0.tar.gz", hash = "sha256:df81779732feb9d01e5d513fad0122efb3d53bbc75f61b2a4f29a020bc985e70", size = 40951 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/1c/71eec730e12aec6511e702ad0cd73c2872eccb7cad39de8ba3ba9de693ef/propcache-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:63f13bf09cc3336eb04a837490b8f332e0db41da66995c9fd1ba04552e516354", size = 80811 }, + { url = "https://files.pythonhosted.org/packages/89/c3/7e94009f9a4934c48a371632197406a8860b9f08e3f7f7d922ab69e57a41/propcache-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608cce1da6f2672a56b24a015b42db4ac612ee709f3d29f27a00c943d9e851de", size = 46365 }, + { url = "https://files.pythonhosted.org/packages/c0/1d/c700d16d1d6903aeab28372fe9999762f074b80b96a0ccc953175b858743/propcache-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:466c219deee4536fbc83c08d09115249db301550625c7fef1c5563a584c9bc87", size = 45602 }, + { url = "https://files.pythonhosted.org/packages/2e/5e/4a3e96380805bf742712e39a4534689f4cddf5fa2d3a93f22e9fd8001b23/propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc2db02409338bf36590aa985a461b2c96fce91f8e7e0f14c50c5fcc4f229016", size = 236161 }, + { url = "https://files.pythonhosted.org/packages/a5/85/90132481183d1436dff6e29f4fa81b891afb6cb89a7306f32ac500a25932/propcache-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6ed8db0a556343d566a5c124ee483ae113acc9a557a807d439bcecc44e7dfbb", size = 244938 }, + { url = "https://files.pythonhosted.org/packages/4a/89/c893533cb45c79c970834274e2d0f6d64383ec740be631b6a0a1d2b4ddc0/propcache-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:91997d9cb4a325b60d4e3f20967f8eb08dfcb32b22554d5ef78e6fd1dda743a2", size = 243576 }, + { url = "https://files.pythonhosted.org/packages/8c/56/98c2054c8526331a05f205bf45cbb2cda4e58e56df70e76d6a509e5d6ec6/propcache-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c7dde9e533c0a49d802b4f3f218fa9ad0a1ce21f2c2eb80d5216565202acab4", size = 236011 }, + { url = "https://files.pythonhosted.org/packages/2d/0c/8b8b9f8a6e1abd869c0fa79b907228e7abb966919047d294ef5df0d136cf/propcache-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffcad6c564fe6b9b8916c1aefbb37a362deebf9394bd2974e9d84232e3e08504", size = 224834 }, + { url = "https://files.pythonhosted.org/packages/18/bb/397d05a7298b7711b90e13108db697732325cafdcd8484c894885c1bf109/propcache-0.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:97a58a28bcf63284e8b4d7b460cbee1edaab24634e82059c7b8c09e65284f178", size = 224946 }, + { url = "https://files.pythonhosted.org/packages/25/19/4fc08dac19297ac58135c03770b42377be211622fd0147f015f78d47cd31/propcache-0.2.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:945db8ee295d3af9dbdbb698cce9bbc5c59b5c3fe328bbc4387f59a8a35f998d", size = 217280 }, + { url = "https://files.pythonhosted.org/packages/7e/76/c79276a43df2096ce2aba07ce47576832b1174c0c480fe6b04bd70120e59/propcache-0.2.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:39e104da444a34830751715f45ef9fc537475ba21b7f1f5b0f4d71a3b60d7fe2", size = 220088 }, + { url = "https://files.pythonhosted.org/packages/c3/9a/8a8cf428a91b1336b883f09c8b884e1734c87f724d74b917129a24fe2093/propcache-0.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c5ecca8f9bab618340c8e848d340baf68bcd8ad90a8ecd7a4524a81c1764b3db", size = 233008 }, + { url = "https://files.pythonhosted.org/packages/25/7b/768a8969abd447d5f0f3333df85c6a5d94982a1bc9a89c53c154bf7a8b11/propcache-0.2.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c436130cc779806bdf5d5fae0d848713105472b8566b75ff70048c47d3961c5b", size = 237719 }, + { url = "https://files.pythonhosted.org/packages/ed/0d/e5d68ccc7976ef8b57d80613ac07bbaf0614d43f4750cf953f0168ef114f/propcache-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:191db28dc6dcd29d1a3e063c3be0b40688ed76434622c53a284e5427565bbd9b", size = 227729 }, + { url = "https://files.pythonhosted.org/packages/05/64/17eb2796e2d1c3d0c431dc5f40078d7282f4645af0bb4da9097fbb628c6c/propcache-0.2.0-cp311-cp311-win32.whl", hash = "sha256:5f2564ec89058ee7c7989a7b719115bdfe2a2fb8e7a4543b8d1c0cc4cf6478c1", size = 40473 }, + { url = "https://files.pythonhosted.org/packages/83/c5/e89fc428ccdc897ade08cd7605f174c69390147526627a7650fb883e0cd0/propcache-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e2e54267980349b723cff366d1e29b138b9a60fa376664a157a342689553f71", size = 44921 }, + { url = "https://files.pythonhosted.org/packages/7c/46/a41ca1097769fc548fc9216ec4c1471b772cc39720eb47ed7e38ef0006a9/propcache-0.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ee7606193fb267be4b2e3b32714f2d58cad27217638db98a60f9efb5efeccc2", size = 80800 }, + { url = "https://files.pythonhosted.org/packages/75/4f/93df46aab9cc473498ff56be39b5f6ee1e33529223d7a4d8c0a6101a9ba2/propcache-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:91ee8fc02ca52e24bcb77b234f22afc03288e1dafbb1f88fe24db308910c4ac7", size = 46443 }, + { url = "https://files.pythonhosted.org/packages/0b/17/308acc6aee65d0f9a8375e36c4807ac6605d1f38074b1581bd4042b9fb37/propcache-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2e900bad2a8456d00a113cad8c13343f3b1f327534e3589acc2219729237a2e8", size = 45676 }, + { url = "https://files.pythonhosted.org/packages/65/44/626599d2854d6c1d4530b9a05e7ff2ee22b790358334b475ed7c89f7d625/propcache-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f52a68c21363c45297aca15561812d542f8fc683c85201df0bebe209e349f793", size = 246191 }, + { url = "https://files.pythonhosted.org/packages/f2/df/5d996d7cb18df076debae7d76ac3da085c0575a9f2be6b1f707fe227b54c/propcache-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e41d67757ff4fbc8ef2af99b338bfb955010444b92929e9e55a6d4dcc3c4f09", size = 251791 }, + { url = "https://files.pythonhosted.org/packages/2e/6d/9f91e5dde8b1f662f6dd4dff36098ed22a1ef4e08e1316f05f4758f1576c/propcache-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a64e32f8bd94c105cc27f42d3b658902b5bcc947ece3c8fe7bc1b05982f60e89", size = 253434 }, + { url = "https://files.pythonhosted.org/packages/3c/e9/1b54b7e26f50b3e0497cd13d3483d781d284452c2c50dd2a615a92a087a3/propcache-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55346705687dbd7ef0d77883ab4f6fabc48232f587925bdaf95219bae072491e", size = 248150 }, + { url = "https://files.pythonhosted.org/packages/a7/ef/a35bf191c8038fe3ce9a414b907371c81d102384eda5dbafe6f4dce0cf9b/propcache-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00181262b17e517df2cd85656fcd6b4e70946fe62cd625b9d74ac9977b64d8d9", size = 233568 }, + { url = "https://files.pythonhosted.org/packages/97/d9/d00bb9277a9165a5e6d60f2142cd1a38a750045c9c12e47ae087f686d781/propcache-0.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6994984550eaf25dd7fc7bd1b700ff45c894149341725bb4edc67f0ffa94efa4", size = 229874 }, + { url = "https://files.pythonhosted.org/packages/8e/78/c123cf22469bdc4b18efb78893e69c70a8b16de88e6160b69ca6bdd88b5d/propcache-0.2.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:56295eb1e5f3aecd516d91b00cfd8bf3a13991de5a479df9e27dd569ea23959c", size = 225857 }, + { url = "https://files.pythonhosted.org/packages/31/1b/fd6b2f1f36d028820d35475be78859d8c89c8f091ad30e377ac49fd66359/propcache-0.2.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:439e76255daa0f8151d3cb325f6dd4a3e93043e6403e6491813bcaaaa8733887", size = 227604 }, + { url = "https://files.pythonhosted.org/packages/99/36/b07be976edf77a07233ba712e53262937625af02154353171716894a86a6/propcache-0.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f6475a1b2ecb310c98c28d271a30df74f9dd436ee46d09236a6b750a7599ce57", size = 238430 }, + { url = "https://files.pythonhosted.org/packages/0d/64/5822f496c9010e3966e934a011ac08cac8734561842bc7c1f65586e0683c/propcache-0.2.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3444cdba6628accf384e349014084b1cacd866fbb88433cd9d279d90a54e0b23", size = 244814 }, + { url = "https://files.pythonhosted.org/packages/fd/bd/8657918a35d50b18a9e4d78a5df7b6c82a637a311ab20851eef4326305c1/propcache-0.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4a9d9b4d0a9b38d1c391bb4ad24aa65f306c6f01b512e10a8a34a2dc5675d348", size = 235922 }, + { url = "https://files.pythonhosted.org/packages/a8/6f/ec0095e1647b4727db945213a9f395b1103c442ef65e54c62e92a72a3f75/propcache-0.2.0-cp312-cp312-win32.whl", hash = "sha256:69d3a98eebae99a420d4b28756c8ce6ea5a29291baf2dc9ff9414b42676f61d5", size = 40177 }, + { url = "https://files.pythonhosted.org/packages/20/a2/bd0896fdc4f4c1db46d9bc361c8c79a9bf08ccc08ba054a98e38e7ba1557/propcache-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:ad9c9b99b05f163109466638bd30ada1722abb01bbb85c739c50b6dc11f92dc3", size = 44446 }, + { url = "https://files.pythonhosted.org/packages/a8/a7/5f37b69197d4f558bfef5b4bceaff7c43cc9b51adf5bd75e9081d7ea80e4/propcache-0.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecddc221a077a8132cf7c747d5352a15ed763b674c0448d811f408bf803d9ad7", size = 78120 }, + { url = "https://files.pythonhosted.org/packages/c8/cd/48ab2b30a6b353ecb95a244915f85756d74f815862eb2ecc7a518d565b48/propcache-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0e53cb83fdd61cbd67202735e6a6687a7b491c8742dfc39c9e01e80354956763", size = 45127 }, + { url = "https://files.pythonhosted.org/packages/a5/ba/0a1ef94a3412aab057bd996ed5f0ac7458be5bf469e85c70fa9ceb43290b/propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92fe151145a990c22cbccf9ae15cae8ae9eddabfc949a219c9f667877e40853d", size = 44419 }, + { url = "https://files.pythonhosted.org/packages/b4/6c/ca70bee4f22fa99eacd04f4d2f1699be9d13538ccf22b3169a61c60a27fa/propcache-0.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6a21ef516d36909931a2967621eecb256018aeb11fc48656e3257e73e2e247a", size = 229611 }, + { url = "https://files.pythonhosted.org/packages/19/70/47b872a263e8511ca33718d96a10c17d3c853aefadeb86dc26e8421184b9/propcache-0.2.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f88a4095e913f98988f5b338c1d4d5d07dbb0b6bad19892fd447484e483ba6b", size = 234005 }, + { url = "https://files.pythonhosted.org/packages/4f/be/3b0ab8c84a22e4a3224719099c1229ddfdd8a6a1558cf75cb55ee1e35c25/propcache-0.2.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a5b3bb545ead161be780ee85a2b54fdf7092815995661947812dde94a40f6fb", size = 237270 }, + { url = "https://files.pythonhosted.org/packages/04/d8/f071bb000d4b8f851d312c3c75701e586b3f643fe14a2e3409b1b9ab3936/propcache-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67aeb72e0f482709991aa91345a831d0b707d16b0257e8ef88a2ad246a7280bf", size = 231877 }, + { url = "https://files.pythonhosted.org/packages/93/e7/57a035a1359e542bbb0a7df95aad6b9871ebee6dce2840cb157a415bd1f3/propcache-0.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c997f8c44ec9b9b0bcbf2d422cc00a1d9b9c681f56efa6ca149a941e5560da2", size = 217848 }, + { url = "https://files.pythonhosted.org/packages/f0/93/d1dea40f112ec183398fb6c42fde340edd7bab202411c4aa1a8289f461b6/propcache-0.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a66df3d4992bc1d725b9aa803e8c5a66c010c65c741ad901e260ece77f58d2f", size = 216987 }, + { url = "https://files.pythonhosted.org/packages/62/4c/877340871251145d3522c2b5d25c16a1690ad655fbab7bb9ece6b117e39f/propcache-0.2.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3ebbcf2a07621f29638799828b8d8668c421bfb94c6cb04269130d8de4fb7136", size = 212451 }, + { url = "https://files.pythonhosted.org/packages/7c/bb/a91b72efeeb42906ef58ccf0cdb87947b54d7475fee3c93425d732f16a61/propcache-0.2.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1235c01ddaa80da8235741e80815ce381c5267f96cc49b1477fdcf8c047ef325", size = 212879 }, + { url = "https://files.pythonhosted.org/packages/9b/7f/ee7fea8faac57b3ec5d91ff47470c6c5d40d7f15d0b1fccac806348fa59e/propcache-0.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3947483a381259c06921612550867b37d22e1df6d6d7e8361264b6d037595f44", size = 222288 }, + { url = "https://files.pythonhosted.org/packages/ff/d7/acd67901c43d2e6b20a7a973d9d5fd543c6e277af29b1eb0e1f7bd7ca7d2/propcache-0.2.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d5bed7f9805cc29c780f3aee05de3262ee7ce1f47083cfe9f77471e9d6777e83", size = 228257 }, + { url = "https://files.pythonhosted.org/packages/8d/6f/6272ecc7a8daad1d0754cfc6c8846076a8cb13f810005c79b15ce0ef0cf2/propcache-0.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e4a91d44379f45f5e540971d41e4626dacd7f01004826a18cb048e7da7e96544", size = 221075 }, + { url = "https://files.pythonhosted.org/packages/7c/bd/c7a6a719a6b3dd8b3aeadb3675b5783983529e4a3185946aa444d3e078f6/propcache-0.2.0-cp313-cp313-win32.whl", hash = "sha256:f902804113e032e2cdf8c71015651c97af6418363bea8d78dc0911d56c335032", size = 39654 }, + { url = "https://files.pythonhosted.org/packages/88/e7/0eef39eff84fa3e001b44de0bd41c7c0e3432e7648ffd3d64955910f002d/propcache-0.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:8f188cfcc64fb1266f4684206c9de0e80f54622c3f22a910cbd200478aeae61e", size = 43705 }, + { url = "https://files.pythonhosted.org/packages/3d/b6/e6d98278f2d49b22b4d033c9f792eda783b9ab2094b041f013fc69bcde87/propcache-0.2.0-py3-none-any.whl", hash = "sha256:2ccc28197af5313706511fab3a8b66dcd6da067a1331372c82ea1cb74285e036", size = 11603 }, +] + +[[package]] +name = "pycln" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "libcst" }, + { name = "pathspec" }, + { name = "pyyaml" }, + { name = "tomlkit" }, + { name = "typer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fa/75/c071c6b539a44770a140e2f48284b976b83b10d7c56ffb788ccce295acf6/pycln-2.4.0.tar.gz", hash = "sha256:1f3eefb7be18a9ee06c3bdd0ba2e91218cd39317e20130325f107e96eb84b9f6", size = 35486 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/01/5af486698064fb4e929494ab83a552c693d50c06e47ec353c757973ae530/pycln-2.4.0-py3-none-any.whl", hash = "sha256:d1bf648df17077306100815d255d45430035b36f66bac635df04a323c61ba126", size = 39946 }, +] + +[[package]] +name = "pygments" +version = "2.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", size = 4891905 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a", size = 1205513 }, +] + +[[package]] +name = "pymdown-extensions" +version = "10.12" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d8/0b/32f05854cfd432e9286bb41a870e0d1a926b72df5f5cdb6dec962b2e369e/pymdown_extensions-10.12.tar.gz", hash = "sha256:b0ee1e0b2bef1071a47891ab17003bfe5bf824a398e13f49f8ed653b699369a7", size = 840790 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/53/32/95a164ddf533bd676cbbe878e36e89b4ade3efde8dd61d0148c90cbbe57e/pymdown_extensions-10.12-py3-none-any.whl", hash = "sha256:49f81412242d3527b8b4967b990df395c89563043bc51a3d2d7d500e52123b77", size = 263448 }, +] + +[[package]] +name = "pyright" +version = "1.1.389" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "nodeenv" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/4e/9a5ab8745e7606b88c2c7ca223449ac9d82a71fd5e31df47b453f2cb39a1/pyright-1.1.389.tar.gz", hash = "sha256:716bf8cc174ab8b4dcf6828c3298cac05c5ed775dda9910106a5dcfe4c7fe220", size = 21940 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/26/c288cabf8cfc5a27e1aa9e5029b7682c0f920b8074f45d22bf844314d66a/pyright-1.1.389-py3-none-any.whl", hash = "sha256:41e9620bba9254406dc1f621a88ceab5a88af4c826feb4f614d95691ed243a60", size = 18581 }, +] + +[[package]] +name = "pytest" +version = "7.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a7/f3/dadfbdbf6b6c8b5bd02adb1e08bc9fbb45ba51c68b0893fa536378cdf485/pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a", size = 1349733 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/b2/741130cbcf2bbfa852ed95a60dc311c9e232c7ed25bac3d9b8880a8df4ae/pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32", size = 323580 }, +] + +[[package]] +name = "pytest-asyncio" +version = "0.23.8" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/de/b4/0b378b7bf26a8ae161c3890c0b48a91a04106c5713ce81b4b080ea2f4f18/pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3", size = 46920 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/82/62e2d63639ecb0fbe8a7ee59ef0bc69a4669ec50f6d3459f74ad4e4189a2/pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2", size = 17663 }, +] + +[[package]] +name = "pytest-cov" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "coverage", extra = ["toml"] }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/be/45/9b538de8cef30e17c7b45ef42f538a94889ed6a16f2387a6c89e73220651/pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0", size = 66945 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/36/3b/48e79f2cd6a61dbbd4807b4ed46cb564b4fd50a76166b1c4ea5c1d9e2371/pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35", size = 22949 }, +] + +[[package]] +name = "pytest-sugar" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "packaging" }, + { name = "pytest" }, + { name = "termcolor" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/ac/5754f5edd6d508bc6493bc37d74b928f102a5fff82d9a80347e180998f08/pytest-sugar-1.0.0.tar.gz", hash = "sha256:6422e83258f5b0c04ce7c632176c7732cab5fdb909cb39cca5c9139f81276c0a", size = 14992 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/fb/889f1b69da2f13691de09a111c16c4766a433382d44aa0ecf221deded44a/pytest_sugar-1.0.0-py3-none-any.whl", hash = "sha256:70ebcd8fc5795dc457ff8b69d266a4e2e8a74ae0c3edc749381c64b5246c8dfd", size = 10171 }, +] + +[[package]] +name = "pytest-timeout" +version = "2.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/93/0d/04719abc7a4bdb3a7a1f968f24b0f5253d698c9cc94975330e9d3145befb/pytest-timeout-2.3.1.tar.gz", hash = "sha256:12397729125c6ecbdaca01035b9e5239d4db97352320af155b3f5de1ba5165d9", size = 17697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/03/27/14af9ef8321f5edc7527e47def2a21d8118c6f329a9342cc61387a0c0599/pytest_timeout-2.3.1-py3-none-any.whl", hash = "sha256:68188cb703edfc6a18fad98dc25a3c61e9f24d644b0b70f33af545219fc7813e", size = 14148 }, +] + +[[package]] +name = "pytest-xdist" +version = "3.6.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "execnet" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/41/c4/3c310a19bc1f1e9ef50075582652673ef2bfc8cd62afef9585683821902f/pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d", size = 84060 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/82/1d96bf03ee4c0fdc3c0cbe61470070e659ca78dc0086fb88b66c185e2449/pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7", size = 46108 }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 }, +] + +[[package]] +name = "pyyaml" +version = "6.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/aa/7af4e81f7acba21a4c6be026da38fd2b872ca46226673c89a758ebdc4fd2/PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", size = 184612 }, + { url = "https://files.pythonhosted.org/packages/8b/62/b9faa998fd185f65c1371643678e4d58254add437edb764a08c5a98fb986/PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", size = 172040 }, + { url = "https://files.pythonhosted.org/packages/ad/0c/c804f5f922a9a6563bab712d8dcc70251e8af811fce4524d57c2c0fd49a4/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", size = 736829 }, + { url = "https://files.pythonhosted.org/packages/51/16/6af8d6a6b210c8e54f1406a6b9481febf9c64a3109c541567e35a49aa2e7/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", size = 764167 }, + { url = "https://files.pythonhosted.org/packages/75/e4/2c27590dfc9992f73aabbeb9241ae20220bd9452df27483b6e56d3975cc5/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", size = 762952 }, + { url = "https://files.pythonhosted.org/packages/9b/97/ecc1abf4a823f5ac61941a9c00fe501b02ac3ab0e373c3857f7d4b83e2b6/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4", size = 735301 }, + { url = "https://files.pythonhosted.org/packages/45/73/0f49dacd6e82c9430e46f4a027baa4ca205e8b0a9dce1397f44edc23559d/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", size = 756638 }, + { url = "https://files.pythonhosted.org/packages/22/5f/956f0f9fc65223a58fbc14459bf34b4cc48dec52e00535c79b8db361aabd/PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", size = 143850 }, + { url = "https://files.pythonhosted.org/packages/ed/23/8da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8/PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", size = 161980 }, + { url = "https://files.pythonhosted.org/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", size = 183873 }, + { url = "https://files.pythonhosted.org/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", size = 173302 }, + { url = "https://files.pythonhosted.org/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", size = 739154 }, + { url = "https://files.pythonhosted.org/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", size = 766223 }, + { url = "https://files.pythonhosted.org/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", size = 767542 }, + { url = "https://files.pythonhosted.org/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", size = 731164 }, + { url = "https://files.pythonhosted.org/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", size = 756611 }, + { url = "https://files.pythonhosted.org/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", size = 140591 }, + { url = "https://files.pythonhosted.org/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", size = 156338 }, + { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309 }, + { url = "https://files.pythonhosted.org/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", size = 171679 }, + { url = "https://files.pythonhosted.org/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", size = 733428 }, + { url = "https://files.pythonhosted.org/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", size = 763361 }, + { url = "https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", size = 759523 }, + { url = "https://files.pythonhosted.org/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", size = 726660 }, + { url = "https://files.pythonhosted.org/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", size = 751597 }, + { url = "https://files.pythonhosted.org/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", size = 140527 }, + { url = "https://files.pythonhosted.org/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", size = 156446 }, +] + +[[package]] +name = "pyyaml-env-tag" +version = "0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fb/8e/da1c6c58f751b70f8ceb1eb25bc25d524e8f14fe16edcce3f4e3ba08629c/pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb", size = 5631 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/66/bbb1dd374f5c870f59c5bb1db0e18cbe7fa739415a24cbd95b2d1f5ae0c4/pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069", size = 3911 }, +] + +[[package]] +name = "regex" +version = "2024.11.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/5f/bd69653fbfb76cf8604468d3b4ec4c403197144c7bfe0e6a5fc9e02a07cb/regex-2024.11.6.tar.gz", hash = "sha256:7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519", size = 399494 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/58/7e4d9493a66c88a7da6d205768119f51af0f684fe7be7bac8328e217a52c/regex-2024.11.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5478c6962ad548b54a591778e93cd7c456a7a29f8eca9c49e4f9a806dcc5d638", size = 482669 }, + { url = "https://files.pythonhosted.org/packages/34/4c/8f8e631fcdc2ff978609eaeef1d6994bf2f028b59d9ac67640ed051f1218/regex-2024.11.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c89a8cc122b25ce6945f0423dc1352cb9593c68abd19223eebbd4e56612c5b7", size = 287684 }, + { url = "https://files.pythonhosted.org/packages/c5/1b/f0e4d13e6adf866ce9b069e191f303a30ab1277e037037a365c3aad5cc9c/regex-2024.11.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:94d87b689cdd831934fa3ce16cc15cd65748e6d689f5d2b8f4f4df2065c9fa20", size = 284589 }, + { url = "https://files.pythonhosted.org/packages/25/4d/ab21047f446693887f25510887e6820b93f791992994f6498b0318904d4a/regex-2024.11.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1062b39a0a2b75a9c694f7a08e7183a80c63c0d62b301418ffd9c35f55aaa114", size = 792121 }, + { url = "https://files.pythonhosted.org/packages/45/ee/c867e15cd894985cb32b731d89576c41a4642a57850c162490ea34b78c3b/regex-2024.11.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:167ed4852351d8a750da48712c3930b031f6efdaa0f22fa1933716bfcd6bf4a3", size = 831275 }, + { url = "https://files.pythonhosted.org/packages/b3/12/b0f480726cf1c60f6536fa5e1c95275a77624f3ac8fdccf79e6727499e28/regex-2024.11.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d548dafee61f06ebdb584080621f3e0c23fff312f0de1afc776e2a2ba99a74f", size = 818257 }, + { url = "https://files.pythonhosted.org/packages/bf/ce/0d0e61429f603bac433910d99ef1a02ce45a8967ffbe3cbee48599e62d88/regex-2024.11.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a19f302cd1ce5dd01a9099aaa19cae6173306d1302a43b627f62e21cf18ac0", size = 792727 }, + { url = "https://files.pythonhosted.org/packages/e4/c1/243c83c53d4a419c1556f43777ccb552bccdf79d08fda3980e4e77dd9137/regex-2024.11.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bec9931dfb61ddd8ef2ebc05646293812cb6b16b60cf7c9511a832b6f1854b55", size = 780667 }, + { url = "https://files.pythonhosted.org/packages/c5/f4/75eb0dd4ce4b37f04928987f1d22547ddaf6c4bae697623c1b05da67a8aa/regex-2024.11.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9714398225f299aa85267fd222f7142fcb5c769e73d7733344efc46f2ef5cf89", size = 776963 }, + { url = "https://files.pythonhosted.org/packages/16/5d/95c568574e630e141a69ff8a254c2f188b4398e813c40d49228c9bbd9875/regex-2024.11.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:202eb32e89f60fc147a41e55cb086db2a3f8cb82f9a9a88440dcfc5d37faae8d", size = 784700 }, + { url = "https://files.pythonhosted.org/packages/8e/b5/f8495c7917f15cc6fee1e7f395e324ec3e00ab3c665a7dc9d27562fd5290/regex-2024.11.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4181b814e56078e9b00427ca358ec44333765f5ca1b45597ec7446d3a1ef6e34", size = 848592 }, + { url = "https://files.pythonhosted.org/packages/1c/80/6dd7118e8cb212c3c60b191b932dc57db93fb2e36fb9e0e92f72a5909af9/regex-2024.11.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:068376da5a7e4da51968ce4c122a7cd31afaaec4fccc7856c92f63876e57b51d", size = 852929 }, + { url = "https://files.pythonhosted.org/packages/11/9b/5a05d2040297d2d254baf95eeeb6df83554e5e1df03bc1a6687fc4ba1f66/regex-2024.11.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f2c4184420d881a3475fb2c6f4d95d53a8d50209a2500723d831036f7c45", size = 781213 }, + { url = "https://files.pythonhosted.org/packages/26/b7/b14e2440156ab39e0177506c08c18accaf2b8932e39fb092074de733d868/regex-2024.11.6-cp311-cp311-win32.whl", hash = "sha256:c36f9b6f5f8649bb251a5f3f66564438977b7ef8386a52460ae77e6070d309d9", size = 261734 }, + { url = "https://files.pythonhosted.org/packages/80/32/763a6cc01d21fb3819227a1cc3f60fd251c13c37c27a73b8ff4315433a8e/regex-2024.11.6-cp311-cp311-win_amd64.whl", hash = "sha256:02e28184be537f0e75c1f9b2f8847dc51e08e6e171c6bde130b2687e0c33cf60", size = 274052 }, + { url = "https://files.pythonhosted.org/packages/ba/30/9a87ce8336b172cc232a0db89a3af97929d06c11ceaa19d97d84fa90a8f8/regex-2024.11.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:52fb28f528778f184f870b7cf8f225f5eef0a8f6e3778529bdd40c7b3920796a", size = 483781 }, + { url = "https://files.pythonhosted.org/packages/01/e8/00008ad4ff4be8b1844786ba6636035f7ef926db5686e4c0f98093612add/regex-2024.11.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fdd6028445d2460f33136c55eeb1f601ab06d74cb3347132e1c24250187500d9", size = 288455 }, + { url = "https://files.pythonhosted.org/packages/60/85/cebcc0aff603ea0a201667b203f13ba75d9fc8668fab917ac5b2de3967bc/regex-2024.11.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:805e6b60c54bf766b251e94526ebad60b7de0c70f70a4e6210ee2891acb70bf2", size = 284759 }, + { url = "https://files.pythonhosted.org/packages/94/2b/701a4b0585cb05472a4da28ee28fdfe155f3638f5e1ec92306d924e5faf0/regex-2024.11.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b85c2530be953a890eaffde05485238f07029600e8f098cdf1848d414a8b45e4", size = 794976 }, + { url = "https://files.pythonhosted.org/packages/4b/bf/fa87e563bf5fee75db8915f7352e1887b1249126a1be4813837f5dbec965/regex-2024.11.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb26437975da7dc36b7efad18aa9dd4ea569d2357ae6b783bf1118dabd9ea577", size = 833077 }, + { url = "https://files.pythonhosted.org/packages/a1/56/7295e6bad94b047f4d0834e4779491b81216583c00c288252ef625c01d23/regex-2024.11.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:abfa5080c374a76a251ba60683242bc17eeb2c9818d0d30117b4486be10c59d3", size = 823160 }, + { url = "https://files.pythonhosted.org/packages/fb/13/e3b075031a738c9598c51cfbc4c7879e26729c53aa9cca59211c44235314/regex-2024.11.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b7fa6606c2881c1db9479b0eaa11ed5dfa11c8d60a474ff0e095099f39d98e", size = 796896 }, + { url = "https://files.pythonhosted.org/packages/24/56/0b3f1b66d592be6efec23a795b37732682520b47c53da5a32c33ed7d84e3/regex-2024.11.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c32f75920cf99fe6b6c539c399a4a128452eaf1af27f39bce8909c9a3fd8cbe", size = 783997 }, + { url = "https://files.pythonhosted.org/packages/f9/a1/eb378dada8b91c0e4c5f08ffb56f25fcae47bf52ad18f9b2f33b83e6d498/regex-2024.11.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:982e6d21414e78e1f51cf595d7f321dcd14de1f2881c5dc6a6e23bbbbd68435e", size = 781725 }, + { url = "https://files.pythonhosted.org/packages/83/f2/033e7dec0cfd6dda93390089864732a3409246ffe8b042e9554afa9bff4e/regex-2024.11.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a7c2155f790e2fb448faed6dd241386719802296ec588a8b9051c1f5c481bc29", size = 789481 }, + { url = "https://files.pythonhosted.org/packages/83/23/15d4552ea28990a74e7696780c438aadd73a20318c47e527b47a4a5a596d/regex-2024.11.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149f5008d286636e48cd0b1dd65018548944e495b0265b45e1bffecce1ef7f39", size = 852896 }, + { url = "https://files.pythonhosted.org/packages/e3/39/ed4416bc90deedbfdada2568b2cb0bc1fdb98efe11f5378d9892b2a88f8f/regex-2024.11.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e5364a4502efca094731680e80009632ad6624084aff9a23ce8c8c6820de3e51", size = 860138 }, + { url = "https://files.pythonhosted.org/packages/93/2d/dd56bb76bd8e95bbce684326302f287455b56242a4f9c61f1bc76e28360e/regex-2024.11.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0a86e7eeca091c09e021db8eb72d54751e527fa47b8d5787caf96d9831bd02ad", size = 787692 }, + { url = "https://files.pythonhosted.org/packages/0b/55/31877a249ab7a5156758246b9c59539abbeba22461b7d8adc9e8475ff73e/regex-2024.11.6-cp312-cp312-win32.whl", hash = "sha256:32f9a4c643baad4efa81d549c2aadefaeba12249b2adc5af541759237eee1c54", size = 262135 }, + { url = "https://files.pythonhosted.org/packages/38/ec/ad2d7de49a600cdb8dd78434a1aeffe28b9d6fc42eb36afab4a27ad23384/regex-2024.11.6-cp312-cp312-win_amd64.whl", hash = "sha256:a93c194e2df18f7d264092dc8539b8ffb86b45b899ab976aa15d48214138e81b", size = 273567 }, + { url = "https://files.pythonhosted.org/packages/90/73/bcb0e36614601016552fa9344544a3a2ae1809dc1401b100eab02e772e1f/regex-2024.11.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a6ba92c0bcdf96cbf43a12c717eae4bc98325ca3730f6b130ffa2e3c3c723d84", size = 483525 }, + { url = "https://files.pythonhosted.org/packages/0f/3f/f1a082a46b31e25291d830b369b6b0c5576a6f7fb89d3053a354c24b8a83/regex-2024.11.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:525eab0b789891ac3be914d36893bdf972d483fe66551f79d3e27146191a37d4", size = 288324 }, + { url = "https://files.pythonhosted.org/packages/09/c9/4e68181a4a652fb3ef5099e077faf4fd2a694ea6e0f806a7737aff9e758a/regex-2024.11.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:086a27a0b4ca227941700e0b31425e7a28ef1ae8e5e05a33826e17e47fbfdba0", size = 284617 }, + { url = "https://files.pythonhosted.org/packages/fc/fd/37868b75eaf63843165f1d2122ca6cb94bfc0271e4428cf58c0616786dce/regex-2024.11.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bde01f35767c4a7899b7eb6e823b125a64de314a8ee9791367c9a34d56af18d0", size = 795023 }, + { url = "https://files.pythonhosted.org/packages/c4/7c/d4cd9c528502a3dedb5c13c146e7a7a539a3853dc20209c8e75d9ba9d1b2/regex-2024.11.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b583904576650166b3d920d2bcce13971f6f9e9a396c673187f49811b2769dc7", size = 833072 }, + { url = "https://files.pythonhosted.org/packages/4f/db/46f563a08f969159c5a0f0e722260568425363bea43bb7ae370becb66a67/regex-2024.11.6-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c4de13f06a0d54fa0d5ab1b7138bfa0d883220965a29616e3ea61b35d5f5fc7", size = 823130 }, + { url = "https://files.pythonhosted.org/packages/db/60/1eeca2074f5b87df394fccaa432ae3fc06c9c9bfa97c5051aed70e6e00c2/regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cde6e9f2580eb1665965ce9bf17ff4952f34f5b126beb509fee8f4e994f143c", size = 796857 }, + { url = "https://files.pythonhosted.org/packages/10/db/ac718a08fcee981554d2f7bb8402f1faa7e868c1345c16ab1ebec54b0d7b/regex-2024.11.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d7f453dca13f40a02b79636a339c5b62b670141e63efd511d3f8f73fba162b3", size = 784006 }, + { url = "https://files.pythonhosted.org/packages/c2/41/7da3fe70216cea93144bf12da2b87367590bcf07db97604edeea55dac9ad/regex-2024.11.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:59dfe1ed21aea057a65c6b586afd2a945de04fc7db3de0a6e3ed5397ad491b07", size = 781650 }, + { url = "https://files.pythonhosted.org/packages/a7/d5/880921ee4eec393a4752e6ab9f0fe28009435417c3102fc413f3fe81c4e5/regex-2024.11.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b97c1e0bd37c5cd7902e65f410779d39eeda155800b65fc4d04cc432efa9bc6e", size = 789545 }, + { url = "https://files.pythonhosted.org/packages/dc/96/53770115e507081122beca8899ab7f5ae28ae790bfcc82b5e38976df6a77/regex-2024.11.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d1e379028e0fc2ae3654bac3cbbef81bf3fd571272a42d56c24007979bafb6", size = 853045 }, + { url = "https://files.pythonhosted.org/packages/31/d3/1372add5251cc2d44b451bd94f43b2ec78e15a6e82bff6a290ef9fd8f00a/regex-2024.11.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:13291b39131e2d002a7940fb176e120bec5145f3aeb7621be6534e46251912c4", size = 860182 }, + { url = "https://files.pythonhosted.org/packages/ed/e3/c446a64984ea9f69982ba1a69d4658d5014bc7a0ea468a07e1a1265db6e2/regex-2024.11.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f51f88c126370dcec4908576c5a627220da6c09d0bff31cfa89f2523843316d", size = 787733 }, + { url = "https://files.pythonhosted.org/packages/2b/f1/e40c8373e3480e4f29f2692bd21b3e05f296d3afebc7e5dcf21b9756ca1c/regex-2024.11.6-cp313-cp313-win32.whl", hash = "sha256:63b13cfd72e9601125027202cad74995ab26921d8cd935c25f09c630436348ff", size = 262122 }, + { url = "https://files.pythonhosted.org/packages/45/94/bc295babb3062a731f52621cdc992d123111282e291abaf23faa413443ea/regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a", size = 273545 }, +] + +[[package]] +name = "requests" +version = "2.32.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", size = 131218 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", size = 64928 }, +] + +[[package]] +name = "rich" +version = "13.9.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098", size = 223149 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/19/71/39c7c0d87f8d4e6c020a393182060eaefeeae6c01dab6a84ec346f2567df/rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90", size = 242424 }, +] + +[[package]] +name = "ruamel-yaml" +version = "0.18.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ruamel-yaml-clib", marker = "python_full_version < '3.13' and platform_python_implementation == 'CPython'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/29/81/4dfc17eb6ebb1aac314a3eb863c1325b907863a1b8b1382cdffcb6ac0ed9/ruamel.yaml-0.18.6.tar.gz", hash = "sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b", size = 143362 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/73/67/8ece580cc363331d9a53055130f86b096bf16e38156e33b1d3014fffda6b/ruamel.yaml-0.18.6-py3-none-any.whl", hash = "sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636", size = 117761 }, +] + +[[package]] +name = "ruamel-yaml-clib" +version = "0.2.12" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/84/80203abff8ea4993a87d823a5f632e4d92831ef75d404c9fc78d0176d2b5/ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f", size = 225315 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fb/8f/683c6ad562f558cbc4f7c029abcd9599148c51c54b5ef0f24f2638da9fbb/ruamel.yaml.clib-0.2.12-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:4a6679521a58256a90b0d89e03992c15144c5f3858f40d7c18886023d7943db6", size = 132224 }, + { url = "https://files.pythonhosted.org/packages/3c/d2/b79b7d695e2f21da020bd44c782490578f300dd44f0a4c57a92575758a76/ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:d84318609196d6bd6da0edfa25cedfbabd8dbde5140a0a23af29ad4b8f91fb1e", size = 641480 }, + { url = "https://files.pythonhosted.org/packages/68/6e/264c50ce2a31473a9fdbf4fa66ca9b2b17c7455b31ef585462343818bd6c/ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb43a269eb827806502c7c8efb7ae7e9e9d0573257a46e8e952f4d4caba4f31e", size = 739068 }, + { url = "https://files.pythonhosted.org/packages/86/29/88c2567bc893c84d88b4c48027367c3562ae69121d568e8a3f3a8d363f4d/ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:811ea1594b8a0fb466172c384267a4e5e367298af6b228931f273b111f17ef52", size = 703012 }, + { url = "https://files.pythonhosted.org/packages/11/46/879763c619b5470820f0cd6ca97d134771e502776bc2b844d2adb6e37753/ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cf12567a7b565cbf65d438dec6cfbe2917d3c1bdddfce84a9930b7d35ea59642", size = 704352 }, + { url = "https://files.pythonhosted.org/packages/02/80/ece7e6034256a4186bbe50dee28cd032d816974941a6abf6a9d65e4228a7/ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7dd5adc8b930b12c8fc5b99e2d535a09889941aa0d0bd06f4749e9a9397c71d2", size = 737344 }, + { url = "https://files.pythonhosted.org/packages/67/58/b1f60a1d591b771298ffa0428237afb092c7f29ae23bad93420b1eb10703/ruamel.yaml.clib-0.2.12-cp311-cp311-win32.whl", hash = "sha256:bd0a08f0bab19093c54e18a14a10b4322e1eacc5217056f3c063bd2f59853ce4", size = 100205 }, + { url = "https://files.pythonhosted.org/packages/b4/4f/b52f634c9548a9291a70dfce26ca7ebce388235c93588a1068028ea23fcc/ruamel.yaml.clib-0.2.12-cp311-cp311-win_amd64.whl", hash = "sha256:a274fb2cb086c7a3dea4322ec27f4cb5cc4b6298adb583ab0e211a4682f241eb", size = 118185 }, + { url = "https://files.pythonhosted.org/packages/48/41/e7a405afbdc26af961678474a55373e1b323605a4f5e2ddd4a80ea80f628/ruamel.yaml.clib-0.2.12-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:20b0f8dc160ba83b6dcc0e256846e1a02d044e13f7ea74a3d1d56ede4e48c632", size = 133433 }, + { url = "https://files.pythonhosted.org/packages/ec/b0/b850385604334c2ce90e3ee1013bd911aedf058a934905863a6ea95e9eb4/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:943f32bc9dedb3abff9879edc134901df92cfce2c3d5c9348f172f62eb2d771d", size = 647362 }, + { url = "https://files.pythonhosted.org/packages/44/d0/3f68a86e006448fb6c005aee66565b9eb89014a70c491d70c08de597f8e4/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95c3829bb364fdb8e0332c9931ecf57d9be3519241323c5274bd82f709cebc0c", size = 754118 }, + { url = "https://files.pythonhosted.org/packages/52/a9/d39f3c5ada0a3bb2870d7db41901125dbe2434fa4f12ca8c5b83a42d7c53/ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:749c16fcc4a2b09f28843cda5a193e0283e47454b63ec4b81eaa2242f50e4ccd", size = 706497 }, + { url = "https://files.pythonhosted.org/packages/b0/fa/097e38135dadd9ac25aecf2a54be17ddf6e4c23e43d538492a90ab3d71c6/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31", size = 698042 }, + { url = "https://files.pythonhosted.org/packages/ec/d5/a659ca6f503b9379b930f13bc6b130c9f176469b73b9834296822a83a132/ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32621c177bbf782ca5a18ba4d7af0f1082a3f6e517ac2a18b3974d4edf349680", size = 745831 }, + { url = "https://files.pythonhosted.org/packages/b1/82/85cb92f15a4231c89b95dfe08b09eb6adca929ef7df7e17ab59902b6f589/ruamel.yaml.clib-0.2.12-cp312-cp312-win32.whl", hash = "sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5", size = 98777 }, + { url = "https://files.pythonhosted.org/packages/d7/8f/c3654f6f1ddb75daf3922c3d8fc6005b1ab56671ad56ffb874d908bfa668/ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4", size = 115523 }, + { url = "https://files.pythonhosted.org/packages/29/00/4864119668d71a5fa45678f380b5923ff410701565821925c69780356ffa/ruamel.yaml.clib-0.2.12-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4c8c5d82f50bb53986a5e02d1b3092b03622c02c2eb78e29bec33fd9593bae1a", size = 132011 }, + { url = "https://files.pythonhosted.org/packages/7f/5e/212f473a93ae78c669ffa0cb051e3fee1139cb2d385d2ae1653d64281507/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux2014_aarch64.whl", hash = "sha256:e7e3736715fbf53e9be2a79eb4db68e4ed857017344d697e8b9749444ae57475", size = 642488 }, + { url = "https://files.pythonhosted.org/packages/1f/8f/ecfbe2123ade605c49ef769788f79c38ddb1c8fa81e01f4dbf5cf1a44b16/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b7e75b4965e1d4690e93021adfcecccbca7d61c7bddd8e22406ef2ff20d74ef", size = 745066 }, + { url = "https://files.pythonhosted.org/packages/e2/a9/28f60726d29dfc01b8decdb385de4ced2ced9faeb37a847bd5cf26836815/ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96777d473c05ee3e5e3c3e999f5d23c6f4ec5b0c38c098b3a5229085f74236c6", size = 701785 }, + { url = "https://files.pythonhosted.org/packages/84/7e/8e7ec45920daa7f76046578e4f677a3215fe8f18ee30a9cb7627a19d9b4c/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:3bc2a80e6420ca8b7d3590791e2dfc709c88ab9152c00eeb511c9875ce5778bf", size = 693017 }, + { url = "https://files.pythonhosted.org/packages/c5/b3/d650eaade4ca225f02a648321e1ab835b9d361c60d51150bac49063b83fa/ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e188d2699864c11c36cdfdada94d781fd5d6b0071cd9c427bceb08ad3d7c70e1", size = 741270 }, + { url = "https://files.pythonhosted.org/packages/30/8c/ed73f047a73638257aa9377ad356bea4d96125b305c34a28766f4445cc0f/ruamel.yaml.clib-0.2.12-cp313-cp313-win32.whl", hash = "sha256:6442cb36270b3afb1b4951f060eccca1ce49f3d087ca1ca4563a6eb479cb3de6", size = 98583 }, + { url = "https://files.pythonhosted.org/packages/b0/85/e8e751d8791564dd333d5d9a4eab0a7a115f7e349595417fd50ecae3395c/ruamel.yaml.clib-0.2.12-cp313-cp313-win_amd64.whl", hash = "sha256:e5b8daf27af0b90da7bb903a876477a9e6d7270be6146906b276605997c7e9a3", size = 115190 }, +] + +[[package]] +name = "ruff" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/d6/a2373f3ba7180ddb44420d2a9d1f1510e1a4d162b3d27282bedcb09c8da9/ruff-0.8.0.tar.gz", hash = "sha256:a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44", size = 3276537 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/77/e889ee3ce7fd8baa3ed1b77a03b9fb8ec1be68be1418261522fd6a5405e0/ruff-0.8.0-py3-none-linux_armv6l.whl", hash = "sha256:fcb1bf2cc6706adae9d79c8d86478677e3bbd4ced796ccad106fd4776d395fea", size = 10518283 }, + { url = "https://files.pythonhosted.org/packages/da/c8/0a47de01edf19fb22f5f9b7964f46a68d0bdff20144d134556ffd1ba9154/ruff-0.8.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:295bb4c02d58ff2ef4378a1870c20af30723013f441c9d1637a008baaf928c8b", size = 10317691 }, + { url = "https://files.pythonhosted.org/packages/41/17/9885e4a0eeae07abd2a4ebabc3246f556719f24efa477ba2739146c4635a/ruff-0.8.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b1f1c76b47c18fa92ee78b60d2d20d7e866c55ee603e7d19c1e991fad933a9a", size = 9940999 }, + { url = "https://files.pythonhosted.org/packages/3e/cd/46b6f7043597eb318b5f5482c8ae8f5491cccce771e85f59d23106f2d179/ruff-0.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb0d4f250a7711b67ad513fde67e8870109e5ce590a801c3722580fe98c33a99", size = 10772437 }, + { url = "https://files.pythonhosted.org/packages/5d/87/afc95aeb8bc78b1d8a3461717a4419c05aa8aa943d4c9cbd441630f85584/ruff-0.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e55cce9aa93c5d0d4e3937e47b169035c7e91c8655b0974e61bb79cf398d49c", size = 10299156 }, + { url = "https://files.pythonhosted.org/packages/65/fa/04c647bb809c4d65e8eae1ed1c654d9481b21dd942e743cd33511687b9f9/ruff-0.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f4cd64916d8e732ce6b87f3f5296a8942d285bbbc161acee7fe561134af64f9", size = 11325819 }, + { url = "https://files.pythonhosted.org/packages/90/26/7dad6e7d833d391a8a1afe4ee70ca6f36c4a297d3cca83ef10e83e9aacf3/ruff-0.8.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c5c1466be2a2ebdf7c5450dd5d980cc87c8ba6976fb82582fea18823da6fa362", size = 12023927 }, + { url = "https://files.pythonhosted.org/packages/24/a0/be5296dda6428ba8a13bda8d09fbc0e14c810b485478733886e61597ae2b/ruff-0.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2dabfd05b96b7b8f2da00d53c514eea842bff83e41e1cceb08ae1966254a51df", size = 11589702 }, + { url = "https://files.pythonhosted.org/packages/26/3f/7602eb11d2886db545834182a9dbe500b8211fcbc9b4064bf9d358bbbbb4/ruff-0.8.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:facebdfe5a5af6b1588a1d26d170635ead6892d0e314477e80256ef4a8470cf3", size = 12782936 }, + { url = "https://files.pythonhosted.org/packages/4c/5d/083181bdec4ec92a431c1291d3fff65eef3ded630a4b55eb735000ef5f3b/ruff-0.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87a8e86bae0dbd749c815211ca11e3a7bd559b9710746c559ed63106d382bd9c", size = 11138488 }, + { url = "https://files.pythonhosted.org/packages/b7/23/c12cdef58413cee2436d6a177aa06f7a366ebbca916cf10820706f632459/ruff-0.8.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e654f0ded7befe2d61eeaf3d3b1e4ef3894469cd664ffa85006c7720f1e4a2", size = 10744474 }, + { url = "https://files.pythonhosted.org/packages/29/61/a12f3b81520083cd7c5caa24ba61bb99fd1060256482eff0ef04cc5ccd1b/ruff-0.8.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:83a55679c4cb449fa527b8497cadf54f076603cc36779b2170b24f704171ce70", size = 10369029 }, + { url = "https://files.pythonhosted.org/packages/08/2a/c013f4f3e4a54596c369cee74c24870ed1d534f31a35504908b1fc97017a/ruff-0.8.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:812e2052121634cf13cd6fddf0c1871d0ead1aad40a1a258753c04c18bb71bbd", size = 10867481 }, + { url = "https://files.pythonhosted.org/packages/d5/f7/685b1e1d42a3e94ceb25eab23c70bdd8c0ab66a43121ef83fe6db5a58756/ruff-0.8.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:780d5d8523c04202184405e60c98d7595bdb498c3c6abba3b6d4cdf2ca2af426", size = 11237117 }, + { url = "https://files.pythonhosted.org/packages/03/20/401132c0908e8837625e3b7e32df9962e7cd681a4df1e16a10e2a5b4ecda/ruff-0.8.0-py3-none-win32.whl", hash = "sha256:5fdb6efecc3eb60bba5819679466471fd7d13c53487df7248d6e27146e985468", size = 8783511 }, + { url = "https://files.pythonhosted.org/packages/1d/5c/4d800fca7854f62ad77f2c0d99b4b585f03e2d87a6ec1ecea85543a14a3c/ruff-0.8.0-py3-none-win_amd64.whl", hash = "sha256:582891c57b96228d146725975fbb942e1f30a0c4ba19722e692ca3eb25cc9b4f", size = 9559876 }, + { url = "https://files.pythonhosted.org/packages/5b/bc/cc8a6a5ca4960b226dc15dd8fb511dd11f2014ff89d325c0b9b9faa9871f/ruff-0.8.0-py3-none-win_arm64.whl", hash = "sha256:ba93e6294e9a737cd726b74b09a6972e36bb511f9a102f1d9a7e1ce94dd206a6", size = 8939733 }, +] + +[[package]] +name = "shellingham" +version = "1.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755 }, +] + +[[package]] +name = "six" +version = "1.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", size = 34041 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254", size = 11053 }, +] + +[[package]] +name = "slotscheck" +version = "0.19.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4b/57/6fcb8df11e7c76eb87b23bfa931408e47f051c6161749c531b4060a45516/slotscheck-0.19.1.tar.gz", hash = "sha256:6146b7747f8db335a00a66b782f86011b74b995f61746dc5b36a9e77d5326013", size = 16050 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/da/32/bd569256267f80b76b87d21a09795741a175778b954bee1d7b1a89852b6f/slotscheck-0.19.1-py3-none-any.whl", hash = "sha256:bff9926f8d6408ea21b6c6bbaa4389cea1682962e73ee4f30084b6d2b89260ee", size = 16995 }, +] + +[[package]] +name = "sort-all" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "tokenize-rt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/40/be/1325e717294bb01a69c9255ba397056b990abb2e03365554b5850a8483b3/sort_all-1.3.0.tar.gz", hash = "sha256:41fd883a4dcba38fef30e4dfc2c8ecf75dc6f450baa6c8bb2e6d30c7189fc148", size = 4946 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/65/dc790a4bf84e0b695a9b1d2a217bad7c88fa31d76fa3569b8daec75f2bc2/sort_all-1.3.0-py3-none-any.whl", hash = "sha256:1e452564993c1084a85b0d4600d00e638492d2fd9db7443c38627e9899f8e06a", size = 4711 }, +] + +[[package]] +name = "termcolor" +version = "2.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/37/72/88311445fd44c455c7d553e61f95412cf89054308a1aa2434ab835075fc5/termcolor-2.5.0.tar.gz", hash = "sha256:998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f", size = 13057 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/be/df630c387a0a054815d60be6a97eb4e8f17385d5d6fe660e1c02750062b4/termcolor-2.5.0-py3-none-any.whl", hash = "sha256:37b17b5fc1e604945c2642c872a3764b5d547a48009871aea3edd3afa180afb8", size = 7755 }, +] + +[[package]] +name = "tokenize-rt" +version = "6.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6b/0a/5854d8ced8c1e00193d1353d13db82d7f813f99bd5dcb776ce3e2a4c0d19/tokenize_rt-6.1.0.tar.gz", hash = "sha256:e8ee836616c0877ab7c7b54776d2fefcc3bde714449a206762425ae114b53c86", size = 5506 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/87/ba/576aac29b10dfa49a6ce650001d1bb31f81e734660555eaf144bfe5b8995/tokenize_rt-6.1.0-py2.py3-none-any.whl", hash = "sha256:d706141cdec4aa5f358945abe36b911b8cbdc844545da99e811250c0cee9b6fc", size = 6015 }, +] + +[[package]] +name = "tomli" +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", size = 17175 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/ca/75707e6efa2b37c77dadb324ae7d9571cb424e61ea73fad7c56c2d14527f/tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249", size = 131077 }, + { url = "https://files.pythonhosted.org/packages/c7/16/51ae563a8615d472fdbffc43a3f3d46588c264ac4f024f63f01283becfbb/tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6", size = 123429 }, + { url = "https://files.pythonhosted.org/packages/f1/dd/4f6cd1e7b160041db83c694abc78e100473c15d54620083dbd5aae7b990e/tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a", size = 226067 }, + { url = "https://files.pythonhosted.org/packages/a9/6b/c54ede5dc70d648cc6361eaf429304b02f2871a345bbdd51e993d6cdf550/tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee", size = 236030 }, + { url = "https://files.pythonhosted.org/packages/1f/47/999514fa49cfaf7a92c805a86c3c43f4215621855d151b61c602abb38091/tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e", size = 240898 }, + { url = "https://files.pythonhosted.org/packages/73/41/0a01279a7ae09ee1573b423318e7934674ce06eb33f50936655071d81a24/tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4", size = 229894 }, + { url = "https://files.pythonhosted.org/packages/55/18/5d8bc5b0a0362311ce4d18830a5d28943667599a60d20118074ea1b01bb7/tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106", size = 245319 }, + { url = "https://files.pythonhosted.org/packages/92/a3/7ade0576d17f3cdf5ff44d61390d4b3febb8a9fc2b480c75c47ea048c646/tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8", size = 238273 }, + { url = "https://files.pythonhosted.org/packages/72/6f/fa64ef058ac1446a1e51110c375339b3ec6be245af9d14c87c4a6412dd32/tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff", size = 98310 }, + { url = "https://files.pythonhosted.org/packages/6a/1c/4a2dcde4a51b81be3530565e92eda625d94dafb46dbeb15069df4caffc34/tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b", size = 108309 }, + { url = "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", size = 132762 }, + { url = "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", size = 123453 }, + { url = "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", size = 233486 }, + { url = "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", size = 242349 }, + { url = "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", size = 252159 }, + { url = "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", size = 237243 }, + { url = "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", size = 259645 }, + { url = "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", size = 244584 }, + { url = "https://files.pythonhosted.org/packages/1c/9a/47c0449b98e6e7d1be6cbac02f93dd79003234ddc4aaab6ba07a9a7482e2/tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98", size = 98875 }, + { url = "https://files.pythonhosted.org/packages/ef/60/9b9638f081c6f1261e2688bd487625cd1e660d0a85bd469e91d8db969734/tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4", size = 109418 }, + { url = "https://files.pythonhosted.org/packages/04/90/2ee5f2e0362cb8a0b6499dc44f4d7d48f8fff06d28ba46e6f1eaa61a1388/tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7", size = 132708 }, + { url = "https://files.pythonhosted.org/packages/c0/ec/46b4108816de6b385141f082ba99e315501ccd0a2ea23db4a100dd3990ea/tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c", size = 123582 }, + { url = "https://files.pythonhosted.org/packages/a0/bd/b470466d0137b37b68d24556c38a0cc819e8febe392d5b199dcd7f578365/tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13", size = 232543 }, + { url = "https://files.pythonhosted.org/packages/d9/e5/82e80ff3b751373f7cead2815bcbe2d51c895b3c990686741a8e56ec42ab/tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281", size = 241691 }, + { url = "https://files.pythonhosted.org/packages/05/7e/2a110bc2713557d6a1bfb06af23dd01e7dde52b6ee7dadc589868f9abfac/tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272", size = 251170 }, + { url = "https://files.pythonhosted.org/packages/64/7b/22d713946efe00e0adbcdfd6d1aa119ae03fd0b60ebed51ebb3fa9f5a2e5/tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140", size = 236530 }, + { url = "https://files.pythonhosted.org/packages/38/31/3a76f67da4b0cf37b742ca76beaf819dca0ebef26d78fc794a576e08accf/tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2", size = 258666 }, + { url = "https://files.pythonhosted.org/packages/07/10/5af1293da642aded87e8a988753945d0cf7e00a9452d3911dd3bb354c9e2/tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744", size = 243954 }, + { url = "https://files.pythonhosted.org/packages/5b/b9/1ed31d167be802da0fc95020d04cd27b7d7065cc6fbefdd2f9186f60d7bd/tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec", size = 98724 }, + { url = "https://files.pythonhosted.org/packages/c7/32/b0963458706accd9afcfeb867c0f9175a741bf7b19cd424230714d722198/tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69", size = 109383 }, + { url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257 }, +] + +[[package]] +name = "tomli-w" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d4/19/b65f1a088ee23e37cdea415b357843eca8b1422a7b11a9eee6e35d4ec273/tomli_w-1.1.0.tar.gz", hash = "sha256:49e847a3a304d516a169a601184932ef0f6b61623fe680f836a2aa7128ed0d33", size = 6929 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c4/ac/ce90573ba446a9bbe65838ded066a805234d159b4446ae9f8ec5bbd36cbd/tomli_w-1.1.0-py3-none-any.whl", hash = "sha256:1403179c78193e3184bfaade390ddbd071cba48a32a2e62ba11aae47490c63f7", size = 6440 }, +] + +[[package]] +name = "tomlkit" +version = "0.13.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b1/09/a439bec5888f00a54b8b9f05fa94d7f901d6735ef4e55dcec9bc37b5d8fa/tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79", size = 192885 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/b6/a447b5e4ec71e13871be01ba81f5dfc9d0af7e473da256ff46bc0e24026f/tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde", size = 37955 }, +] + +[[package]] +name = "typer" +version = "0.13.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "rich" }, + { name = "shellingham" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/76/41/49ead3ad3310545e767bcb917c759b026ca9eada5d5c150c2fb6fc555568/typer-0.13.1.tar.gz", hash = "sha256:9d444cb96cc268ce6f8b94e13b4335084cef4c079998a9f4851a90229a3bd25c", size = 98631 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/69/e90a0b4d0c16e095901679216c8ecdc728110c7c54e7b5f43a623bc4c789/typer-0.13.1-py3-none-any.whl", hash = "sha256:5b59580fd925e89463a29d363e0a43245ec02765bde9fb77d39e5d0f29dd7157", size = 44723 }, +] + +[[package]] +name = "typing-extensions" +version = "4.12.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }, +] + +[[package]] +name = "urllib3" +version = "2.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9", size = 300677 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac", size = 126338 }, +] + +[[package]] +name = "uv" +version = "0.5.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/46/95/ba000f161640015c9f2ecc2681f38eb161b8edac600a0451b36e4ad15aa4/uv-0.5.5.tar.gz", hash = "sha256:7f8db4bdf7eaef6be271457c4b2a167f41ad115434944a09f5034018a29b4093", size = 2324705 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/91/ac61feea1b11e4dc342a4fd174f311b628a04ec3b4614a24676c4d214bd1/uv-0.5.5-py3-none-linux_armv6l.whl", hash = "sha256:d091e88a9c2c830169c3ccf95fd972759e0ab629dacc2d5eff525e5ba3583904", size = 13887911 }, + { url = "https://files.pythonhosted.org/packages/84/18/461af22fd1f80f86548013639ab345810dbf35aa44dff1732c6faf311a48/uv-0.5.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f0bfc7ced2fe0c85b3070dfa219072a1406133e18aab2f2fe10b6455ede0f8b2", size = 13900075 }, + { url = "https://files.pythonhosted.org/packages/68/5f/7a236ad48f81c580691f9e5f28dd47289a9819f18410f12ee3c621791efd/uv-0.5.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:553901e95cb5a4da1da19e288c29c5f886793f981750400e5cef48e3031b970b", size = 12869530 }, + { url = "https://files.pythonhosted.org/packages/94/d6/d6f441fd041fb4883332b999481896e28502b51681bcb786a001fb1e4a50/uv-0.5.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:a4f0c7647187044056dc6f6f5d31b01f445d8695eb7d2f442b29fd5c9216a56f", size = 13158009 }, + { url = "https://files.pythonhosted.org/packages/9b/3d/cc1e44e14266bbdb71eb020d14454f4f24f72fcc2eb84a52bf809e030918/uv-0.5.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:34e894c922ba29a59bbe812a458a7095a575f76b87dfc362e0c3f4f650d6f631", size = 13676515 }, + { url = "https://files.pythonhosted.org/packages/10/5f/b81ed7ab715687a790b9b06a6f4e2781d7f7222840eead0392c3ef6f80ea/uv-0.5.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5569798fc8eaad58fbb4fb70ced8f09ebe607fbbfb95fa42c559f57bbe0cabd", size = 14245499 }, + { url = "https://files.pythonhosted.org/packages/f7/e1/ce5a88bc5ed61ee310a8e0acc3fa3032280bb2d49514fd48b801bb36f96f/uv-0.5.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:59d53cce11718ce5d5367afc8c93ebcfc5e1cddfa4a44aedbf08d08d9b738381", size = 14920230 }, + { url = "https://files.pythonhosted.org/packages/03/84/6fa2deb5bed9dab815cb7f57e14885ecf8de22249b992f9c4ea5dd042c28/uv-0.5.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dee9517ebba13d07d8f139c439c5ff63e438d31ebda4d7eb0af8d0f0cc6a181", size = 14701845 }, + { url = "https://files.pythonhosted.org/packages/59/b2/7078d52a73c1e13d984c22fae1888993e5cd3f40cea029ab2666d79d92a7/uv-0.5.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:29286cd6b9f8e040d02894a67c6b6304811ea393ca9dfade109e93cf4b3b842c", size = 18963098 }, + { url = "https://files.pythonhosted.org/packages/b9/89/a91d927574ce2103d22b7beab319468d915a1d04757cf82b6eaf79b56a10/uv-0.5.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f7f04ae5a5430873d8610d8ea0a5d35df92e60bf701f80b3cf24857e0ac5e72", size = 14442788 }, + { url = "https://files.pythonhosted.org/packages/46/3d/2c5a9d362771aeef13c2ba1c9b1267b469e11331b874486f03f6c6fc5eb1/uv-0.5.5-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:5a47345ccafc0105b2f0cc22fcb0bb05be4d0e60df67f5beea28069b0bb372c8", size = 13394955 }, + { url = "https://files.pythonhosted.org/packages/cf/92/8d646385401472e7358cdf0fc86015edc9bf9132c9b79d7e2a11c300dd84/uv-0.5.5-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:b55d507bfe2bd2330c41680e4b0077972381f40975a59b53007254196abc4477", size = 13639522 }, + { url = "https://files.pythonhosted.org/packages/da/23/5e00b71f9c8b9c16f0947bf84b71265bafdf24947d2e271a657da00a0c6a/uv-0.5.5-py3-none-musllinux_1_1_i686.whl", hash = "sha256:365715e7247c2cd8ef661e8f96927b181248f689c07e48b076c9dbc78a4a0877", size = 13957451 }, + { url = "https://files.pythonhosted.org/packages/02/38/0c624a8d89416fa6c849c6670066c74f420aa898eafdf7cefd3adf77d686/uv-0.5.5-py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:0314a4b9a25bf00afe4e5472c338c8c6bd34688c23d63ce1ad35462cf087b492", size = 15840287 }, + { url = "https://files.pythonhosted.org/packages/a8/bd/1a81700d2555be504f0b1ff82f86d666384805e354c8eec2fdf7558d0cf9/uv-0.5.5-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:f4e9ddcffc29f009f692cda699912b02f6a12089d741b71d2fcd0b181eb71c5d", size = 14560282 }, + { url = "https://files.pythonhosted.org/packages/cd/71/c0b137c62a5a8ab5ecc0a8f505b77e5a05d5b94fd9da7560a247dac000f3/uv-0.5.5-py3-none-win32.whl", hash = "sha256:9af7018430da1f0960eee1592c820c343e2619f2d71f66c3be62da330826c537", size = 13810875 }, + { url = "https://files.pythonhosted.org/packages/e3/d8/56dbbe07aba3cf561fff52b8ed75ce7b694a0710ab676fae4cd7fbf1bdae/uv-0.5.5-py3-none-win_amd64.whl", hash = "sha256:69e15f24493d86c3a2da3764891e35a033ceda09404c1f9b386671d509db95f3", size = 15604848 }, +] + +[[package]] +name = "virtualenv" +version = "20.28.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "distlib" }, + { name = "filelock" }, + { name = "platformdirs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bf/75/53316a5a8050069228a2f6d11f32046cfa94fbb6cc3f08703f59b873de2e/virtualenv-20.28.0.tar.gz", hash = "sha256:2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa", size = 7650368 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/f9/0919cf6f1432a8c4baa62511f8f8da8225432d22e83e3476f5be1a1edc6e/virtualenv-20.28.0-py3-none-any.whl", hash = "sha256:23eae1b4516ecd610481eda647f3a7c09aea295055337331bb4e6892ecce47b0", size = 4276702 }, +] + +[[package]] +name = "watchdog" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393 }, + { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392 }, + { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019 }, + { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471 }, + { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449 }, + { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054 }, + { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480 }, + { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451 }, + { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057 }, + { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079 }, + { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076 }, + { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077 }, + { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077 }, + { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078 }, + { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065 }, + { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070 }, + { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067 }, +] + +[[package]] +name = "yarl" +version = "1.18.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "multidict" }, + { name = "propcache" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5e/4b/53db4ecad4d54535aff3dfda1f00d6363d79455f62b11b8ca97b82746bd2/yarl-1.18.0.tar.gz", hash = "sha256:20d95535e7d833889982bfe7cc321b7f63bf8879788fee982c76ae2b24cfb715", size = 180098 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/06/45/6ad7135d1c4ad3a6a49e2c37dc78a1805a7871879c03c3495d64c9605d49/yarl-1.18.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b8e8c516dc4e1a51d86ac975b0350735007e554c962281c432eaa5822aa9765c", size = 141283 }, + { url = "https://files.pythonhosted.org/packages/45/6d/24b70ae33107d6eba303ed0ebfdf1164fe2219656e7594ca58628ebc0f1d/yarl-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2e6b4466714a73f5251d84b471475850954f1fa6acce4d3f404da1d55d644c34", size = 94082 }, + { url = "https://files.pythonhosted.org/packages/8a/0e/da720989be11b662ca847ace58f468b52310a9b03e52ac62c144755f9d75/yarl-1.18.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c893f8c1a6d48b25961e00922724732d00b39de8bb0b451307482dc87bddcd74", size = 92017 }, + { url = "https://files.pythonhosted.org/packages/f5/76/e5c91681fa54658943cb88673fb19b3355c3a8ae911a33a2621b6320990d/yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13aaf2bdbc8c86ddce48626b15f4987f22e80d898818d735b20bd58f17292ee8", size = 340359 }, + { url = "https://files.pythonhosted.org/packages/cf/77/02cf72f09dea20980dea4ebe40dfb2c24916b864aec869a19f715428e0f0/yarl-1.18.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd21c0128e301851de51bc607b0a6da50e82dc34e9601f4b508d08cc89ee7929", size = 356336 }, + { url = "https://files.pythonhosted.org/packages/17/66/83a88d04e4fc243dd26109f3e3d6412f67819ab1142dadbce49706ef4df4/yarl-1.18.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:205de377bd23365cd85562c9c6c33844050a93661640fda38e0567d2826b50df", size = 353730 }, + { url = "https://files.pythonhosted.org/packages/76/77/0b205a532d22756ab250ab21924d362f910a23d641c82faec1c4ad7f6077/yarl-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ed69af4fe2a0949b1ea1d012bf065c77b4c7822bad4737f17807af2adb15a73c", size = 343882 }, + { url = "https://files.pythonhosted.org/packages/0b/47/2081ddce3da6096889c3947bdc21907d0fa15939909b10219254fe116841/yarl-1.18.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e1c18890091aa3cc8a77967943476b729dc2016f4cfe11e45d89b12519d4a93", size = 335873 }, + { url = "https://files.pythonhosted.org/packages/25/3c/437304394494e757ae927c9a81bacc4bcdf7351a1d4e811d95b02cb6dbae/yarl-1.18.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:91b8fb9427e33f83ca2ba9501221ffaac1ecf0407f758c4d2f283c523da185ee", size = 347725 }, + { url = "https://files.pythonhosted.org/packages/c6/fb/fa6c642bc052fbe6370ed5da765579650510157dea354fe9e8177c3bc34a/yarl-1.18.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:536a7a8a53b75b2e98ff96edb2dfb91a26b81c4fed82782035767db5a465be46", size = 346161 }, + { url = "https://files.pythonhosted.org/packages/b0/09/8c0cf68a0fcfe3b060c9e5857bb35735bc72a4cf4075043632c636d007e9/yarl-1.18.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a64619a9c47c25582190af38e9eb382279ad42e1f06034f14d794670796016c0", size = 349924 }, + { url = "https://files.pythonhosted.org/packages/bf/4b/1efe10fd51e2cedf53195d688fa270efbcd64a015c61d029d49c20bf0af7/yarl-1.18.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c73a6bbc97ba1b5a0c3c992ae93d721c395bdbb120492759b94cc1ac71bc6350", size = 361865 }, + { url = "https://files.pythonhosted.org/packages/0b/1b/2b5efd6df06bf938f7e154dee8e2ab22d148f3311a92bf4da642aaaf2fc5/yarl-1.18.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a173401d7821a2a81c7b47d4e7d5c4021375a1441af0c58611c1957445055056", size = 366030 }, + { url = "https://files.pythonhosted.org/packages/f8/db/786a5684f79278e62271038a698f56a51960f9e643be5d3eff82712f0b1c/yarl-1.18.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7520e799b1f84e095cce919bd6c23c9d49472deeef25fe1ef960b04cca51c3fc", size = 358902 }, + { url = "https://files.pythonhosted.org/packages/91/2f/437d0de062f1a3e3cb17573971b3832232443241133580c2ba3da5001d06/yarl-1.18.0-cp311-cp311-win32.whl", hash = "sha256:c4cb992d8090d5ae5f7afa6754d7211c578be0c45f54d3d94f7781c495d56716", size = 84138 }, + { url = "https://files.pythonhosted.org/packages/9d/85/035719a9266bce85ecde820aa3f8c46f3b18c3d7ba9ff51367b2fa4ae2a2/yarl-1.18.0-cp311-cp311-win_amd64.whl", hash = "sha256:52c136f348605974c9b1c878addd6b7a60e3bf2245833e370862009b86fa4689", size = 90765 }, + { url = "https://files.pythonhosted.org/packages/23/36/c579b80a5c76c0d41c8e08baddb3e6940dfc20569db579a5691392c52afa/yarl-1.18.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1ece25e2251c28bab737bdf0519c88189b3dd9492dc086a1d77336d940c28ced", size = 142376 }, + { url = "https://files.pythonhosted.org/packages/0c/5f/e247dc7c0607a0c505fea6c839721844bee55686dfb183c7d7b8ef8a9cb1/yarl-1.18.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:454902dc1830d935c90b5b53c863ba2a98dcde0fbaa31ca2ed1ad33b2a7171c6", size = 94692 }, + { url = "https://files.pythonhosted.org/packages/eb/e1/3081b578a6f21961711b9a1c49c2947abb3b0d0dd9537378fb06777ce8ee/yarl-1.18.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:01be8688fc211dc237e628fcc209dda412d35de7642453059a0553747018d075", size = 92527 }, + { url = "https://files.pythonhosted.org/packages/2f/fa/d9e1b9fbafa4cc82cd3980b5314741b33c2fe16308d725449a23aed32021/yarl-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d26f1fa9fa2167bb238f6f4b20218eb4e88dd3ef21bb8f97439fa6b5313e30d", size = 332096 }, + { url = "https://files.pythonhosted.org/packages/93/b6/dd27165114317875838e216214fb86338dc63d2e50855a8f2a12de2a7fe5/yarl-1.18.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b234a4a9248a9f000b7a5dfe84b8cb6210ee5120ae70eb72a4dcbdb4c528f72f", size = 342047 }, + { url = "https://files.pythonhosted.org/packages/fc/9f/bad434b5279ae7a356844e14dc771c3d29eb928140bbc01621af811c8a27/yarl-1.18.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe94d1de77c4cd8caff1bd5480e22342dbd54c93929f5943495d9c1e8abe9f42", size = 341712 }, + { url = "https://files.pythonhosted.org/packages/9a/9f/63864f43d131ba8c8cdf1bde5dd3f02f0eff8a7c883a5d7fad32f204fda5/yarl-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b4c90c5363c6b0a54188122b61edb919c2cd1119684999d08cd5e538813a28e", size = 336654 }, + { url = "https://files.pythonhosted.org/packages/20/30/b4542bbd9be73de155213207eec019f6fe6495885f7dd59aa1ff705a041b/yarl-1.18.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a98ecadc5a241c9ba06de08127ee4796e1009555efd791bac514207862b43d", size = 325484 }, + { url = "https://files.pythonhosted.org/packages/69/bc/e2a9808ec26989cf0d1b98fe7b3cc45c1c6506b5ea4fe43ece5991f28f34/yarl-1.18.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9106025c7f261f9f5144f9aa7681d43867eed06349a7cfb297a1bc804de2f0d1", size = 344213 }, + { url = "https://files.pythonhosted.org/packages/e2/17/0ee5a68886aca1a8071b0d24a1e1c0fd9970dead2ef2d5e26e027fb7ce88/yarl-1.18.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f275ede6199d0f1ed4ea5d55a7b7573ccd40d97aee7808559e1298fe6efc8dbd", size = 340517 }, + { url = "https://files.pythonhosted.org/packages/fd/db/1fe4ef38ee852bff5ec8f5367d718b3a7dac7520f344b8e50306f68a2940/yarl-1.18.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f7edeb1dcc7f50a2c8e08b9dc13a413903b7817e72273f00878cb70e766bdb3b", size = 346234 }, + { url = "https://files.pythonhosted.org/packages/b4/ee/5e5bccdb821eb9949ba66abb4d19e3299eee00282e37b42f65236120e892/yarl-1.18.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c083f6dd6951b86e484ebfc9c3524b49bcaa9c420cb4b2a78ef9f7a512bfcc85", size = 359625 }, + { url = "https://files.pythonhosted.org/packages/3f/43/95a64d9e7ab4aa1c34fc5ea0edb35b581bc6ad33fd960a8ae34c2040b319/yarl-1.18.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:80741ec5b471fbdfb997821b2842c59660a1c930ceb42f8a84ba8ca0f25a66aa", size = 364239 }, + { url = "https://files.pythonhosted.org/packages/40/19/09ce976c624c9d3cc898f0be5035ddef0c0759d85b2313321cfe77b69915/yarl-1.18.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b1a3297b9cad594e1ff0c040d2881d7d3a74124a3c73e00c3c71526a1234a9f7", size = 357599 }, + { url = "https://files.pythonhosted.org/packages/7d/35/6f33fd29791af2ec161aebe8abe63e788c2b74a6c7e8f29c92e5f5e96849/yarl-1.18.0-cp312-cp312-win32.whl", hash = "sha256:cd6ab7d6776c186f544f893b45ee0c883542b35e8a493db74665d2e594d3ca75", size = 83832 }, + { url = "https://files.pythonhosted.org/packages/4e/8e/cdb40ef98597be107de67b11e2f1f23f911e0f1416b938885d17a338e304/yarl-1.18.0-cp312-cp312-win_amd64.whl", hash = "sha256:039c299a0864d1f43c3e31570045635034ea7021db41bf4842693a72aca8df3a", size = 90132 }, + { url = "https://files.pythonhosted.org/packages/2b/77/2196b657c66f97adaef0244e9e015f30eac0df59c31ad540f79ce328feed/yarl-1.18.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6fb64dd45453225f57d82c4764818d7a205ee31ce193e9f0086e493916bd4f72", size = 140512 }, + { url = "https://files.pythonhosted.org/packages/0e/d8/2bb6e26fddba5c01bad284e4571178c651b97e8e06318efcaa16e07eb9fd/yarl-1.18.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:3adaaf9c6b1b4fc258584f4443f24d775a2086aee82d1387e48a8b4f3d6aecf6", size = 93875 }, + { url = "https://files.pythonhosted.org/packages/54/e4/99fbb884dd9f814fb0037dc1783766bb9edcd57b32a76f3ec5ac5c5772d7/yarl-1.18.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:da206d1ec78438a563c5429ab808a2b23ad7bc025c8adbf08540dde202be37d5", size = 91705 }, + { url = "https://files.pythonhosted.org/packages/3b/a2/5bd86eca9449e6b15d3b08005cf4e58e3da972240c2bee427b358c311549/yarl-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:576d258b21c1db4c6449b1c572c75d03f16a482eb380be8003682bdbe7db2f28", size = 333325 }, + { url = "https://files.pythonhosted.org/packages/94/50/a218da5f159cd985685bc72c500bb1a7fd2d60035d2339b8a9d9e1f99194/yarl-1.18.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c60e547c0a375c4bfcdd60eef82e7e0e8698bf84c239d715f5c1278a73050393", size = 344121 }, + { url = "https://files.pythonhosted.org/packages/a4/e3/830ae465811198b4b5ebecd674b5b3dca4d222af2155eb2144bfe190bbb8/yarl-1.18.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e3818eabaefb90adeb5e0f62f047310079d426387991106d4fbf3519eec7d90a", size = 345163 }, + { url = "https://files.pythonhosted.org/packages/7a/74/05c4326877ca541eee77b1ef74b7ac8081343d3957af8f9291ca6eca6fec/yarl-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5f72421246c21af6a92fbc8c13b6d4c5427dfd949049b937c3b731f2f9076bd", size = 339130 }, + { url = "https://files.pythonhosted.org/packages/29/42/842f35aa1dae25d132119ee92185e8c75d8b9b7c83346506bd31e9fa217f/yarl-1.18.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fa7d37f2ada0f42e0723632993ed422f2a679af0e200874d9d861720a54f53e", size = 326418 }, + { url = "https://files.pythonhosted.org/packages/f9/ed/65c0514f2d1e8b92a61f564c914381d078766cab38b5fbde355b3b3af1fb/yarl-1.18.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:42ba84e2ac26a3f252715f8ec17e6fdc0cbf95b9617c5367579fafcd7fba50eb", size = 345204 }, + { url = "https://files.pythonhosted.org/packages/23/31/351f64f0530c372fa01160f38330f44478e7bf3092f5ce2bfcb91605561d/yarl-1.18.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:6a49ad0102c0f0ba839628d0bf45973c86ce7b590cdedf7540d5b1833ddc6f00", size = 341652 }, + { url = "https://files.pythonhosted.org/packages/49/aa/0c6e666c218d567727c1d040d01575685e7f9b18052fd68a59c9f61fe5d9/yarl-1.18.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:96404e8d5e1bbe36bdaa84ef89dc36f0e75939e060ca5cd45451aba01db02902", size = 347257 }, + { url = "https://files.pythonhosted.org/packages/36/0b/33a093b0e13bb8cd0f27301779661ff325270b6644929001f8f33307357d/yarl-1.18.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a0509475d714df8f6d498935b3f307cd122c4ca76f7d426c7e1bb791bcd87eda", size = 359735 }, + { url = "https://files.pythonhosted.org/packages/a8/92/dcc0b37c48632e71ffc2b5f8b0509347a0bde55ab5862ff755dce9dd56c4/yarl-1.18.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:1ff116f0285b5c8b3b9a2680aeca29a858b3b9e0402fc79fd850b32c2bcb9f8b", size = 365982 }, + { url = "https://files.pythonhosted.org/packages/0e/39/30e2a24a7a6c628dccb13eb6c4a03db5f6cd1eb2c6cda56a61ddef764c11/yarl-1.18.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e2580c1d7e66e6d29d6e11855e3b1c6381971e0edd9a5066e6c14d79bc8967af", size = 360128 }, + { url = "https://files.pythonhosted.org/packages/76/13/12b65dca23b1fb8ae44269a4d24048fd32ac90b445c985b0a46fdfa30cfe/yarl-1.18.0-cp313-cp313-win32.whl", hash = "sha256:14408cc4d34e202caba7b5ac9cc84700e3421a9e2d1b157d744d101b061a4a88", size = 309888 }, + { url = "https://files.pythonhosted.org/packages/f6/60/478d3d41a4bf0b9e7dca74d870d114e775d1ff7156b7d1e0e9972e8f97fd/yarl-1.18.0-cp313-cp313-win_amd64.whl", hash = "sha256:1db1537e9cb846eb0ff206eac667f627794be8b71368c1ab3207ec7b6f8c5afc", size = 315459 }, + { url = "https://files.pythonhosted.org/packages/30/9c/3f7ab894a37b1520291247cbc9ea6756228d098dae5b37eec848d404a204/yarl-1.18.0-py3-none-any.whl", hash = "sha256:dbf53db46f7cf176ee01d8d98c39381440776fcda13779d269a8ba664f69bec0", size = 44840 }, +] From 8c34dc3632ae67c003d730044670ebd60d174a6a Mon Sep 17 00:00:00 2001 From: "always-on-duty[bot]" <120557446+always-on-duty[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:41:55 +0000 Subject: [PATCH 03/10] Resync piped --- .github/workflows/freeze-for-pr.yml | 2 +- .github/workflows/lint.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/freeze-for-pr.yml b/.github/workflows/freeze-for-pr.yml index 5c96be16f..9cd77a19e 100644 --- a/.github/workflows/freeze-for-pr.yml +++ b/.github/workflows/freeze-for-pr.yml @@ -8,7 +8,7 @@ on: pull_request: branches: - master - paths: ["piped", "pyproject.toml", "requirements.in", "dev-requirements/*.in", "!dev-requirements/constraints.in"] + paths: ["piped", "pyproject.toml"] jobs: freeze-pr-dep-changes: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bc44c29d4..39332f531 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,8 +33,8 @@ jobs: - name: Check spelling run: nox -s spell-check - - name: Lint with flake8 - run: nox -s flake8 + - name: Lint with Ruff + run: nox -s lint - name: Check slotting run: nox -s slot-check From bb9cdfdfdb83dcd235379e43930328e1360850e7 Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Thu, 28 Nov 2024 00:16:54 +0000 Subject: [PATCH 04/10] Update Piped --- piped | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piped b/piped index 470915fd5..44fca44a3 160000 --- a/piped +++ b/piped @@ -1 +1 @@ -Subproject commit 470915fd5650218b67d8e7b22b3873efd4227660 +Subproject commit 44fca44a3d85ae2ea96b679ca7335ed5eab659b7 From b9430af9f56c1c481f3e9e21fd327c2be8416f1b Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Sat, 30 Nov 2024 18:24:02 +0000 Subject: [PATCH 05/10] Linting fix --- docs_src/usage.py | 17 +- examples/__init__.py | 1 - examples/checks.py | 4 +- examples/config.py | 1 - examples/error_handling.py | 1 - examples/impls.py | 5 +- examples/injection.py | 6 +- examples/message_commands.py | 1 - examples/protos.py | 1 - examples/run_gateway.py | 1 - examples/run_rest.py | 3 +- examples/slash_commands.py | 1 - noxfile.py | 1 - pyproject.toml | 41 +- tanjun/__init__.py | 1 - tanjun/_internal/__init__.py | 27 +- tanjun/_internal/cache.py | 7 +- tanjun/_internal/localisation.py | 30 +- tanjun/abc.py | 7 +- tanjun/annotations.py | 39 +- tanjun/checks.py | 10 +- tanjun/clients.py | 128 ++-- tanjun/commands/__init__.py | 1 - tanjun/commands/base.py | 5 +- tanjun/commands/menu.py | 28 +- tanjun/commands/message.py | 23 +- tanjun/commands/slash.py | 133 ++-- tanjun/components.py | 36 +- tanjun/context/__init__.py | 1 - tanjun/context/autocomplete.py | 13 +- tanjun/context/base.py | 8 +- tanjun/context/menu.py | 21 +- tanjun/context/message.py | 27 +- tanjun/context/slash.py | 87 ++- tanjun/conversion.py | 89 ++- tanjun/dependencies/__init__.py | 3 +- tanjun/dependencies/async_cache.py | 3 +- tanjun/dependencies/callbacks.py | 15 +- tanjun/dependencies/data.py | 11 +- tanjun/dependencies/limiters.py | 95 +-- tanjun/dependencies/locales.py | 5 +- tanjun/dependencies/owners.py | 6 +- tanjun/dependencies/reloaders.py | 33 +- tanjun/errors.py | 16 +- tanjun/hooks.py | 3 +- tanjun/injecting.py | 4 +- tanjun/parsing.py | 62 +- tanjun/permissions.py | 12 +- tanjun/schedules.py | 47 +- tanjun/utilities.py | 1 - tests/__init__.py | 1 - tests/commands/__init__.py | 1 - tests/commands/test_base.py | 25 +- tests/commands/test_menu.py | 91 ++- tests/commands/test_message.py | 149 ++-- tests/commands/test_slash.py | 691 ++++++++++-------- tests/context/__init__.py | 1 - tests/context/test_autocomplete.py | 79 +-- tests/context/test_base.py | 53 +- tests/context/test_menu.py | 53 +- tests/context/test_message.py | 85 +-- tests/context/test_slash.py | 244 +++---- tests/dependencies/__init__.py | 1 - tests/dependencies/test___init__.py | 3 +- tests/dependencies/test_callbacks.py | 13 +- tests/dependencies/test_data.py | 31 +- tests/dependencies/test_limiters.py | 433 ++++++------ tests/dependencies/test_locales.py | 47 +- tests/dependencies/test_owners.py | 35 +- tests/dependencies/test_reloaders.py | 25 +- tests/test__internal/__init__.py | 1 - tests/test__internal/test_cache.py | 41 +- tests/test__internal/test_init.py | 25 +- tests/test_annotations.py | 490 +++++++------ tests/test_annotations_future_annotations.py | 256 +++---- tests/test_checks.py | 409 +++++------ tests/test_clients.py | 697 ++++++++++--------- tests/test_clients_future_annotations.py | 23 +- tests/test_components.py | 293 ++++---- tests/test_components_future_annotations.py | 29 +- tests/test_conversion.py | 261 +++---- tests/test_errors.py | 39 +- tests/test_hooks.py | 65 +- tests/test_injecting.py | 5 +- tests/test_parsing.py | 13 +- tests/test_permissions.py | 41 +- tests/test_schedules.py | 228 +++--- tests/test_utilities.py | 3 +- 88 files changed, 3220 insertions(+), 2881 deletions(-) diff --git a/docs_src/usage.py b/docs_src/usage.py index 885ad3096..edb4dde7a 100644 --- a/docs_src/usage.py +++ b/docs_src/usage.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2023 by Faster Speeding Lucina@lmbyrne.dev # @@ -129,16 +128,16 @@ def message_command_group_example() -> None: # prefixes=["!"] @tanjun.as_message_command_group("groupy") - async def groupy_group(ctx: tanjun.abc.MessageContext): ... + async def groupy_group(ctx: tanjun.abc.MessageContext) -> None: ... @groupy_group.as_sub_command("sus drink") - async def sus_drink_command(ctx: tanjun.abc.MessageContext): ... + async def sus_drink_command(ctx: tanjun.abc.MessageContext) -> None: ... @groupy_group.as_sub_group("tour") - async def tour_group(ctx: tanjun.abc.MessageContext): ... + async def tour_group(ctx: tanjun.abc.MessageContext) -> None: ... @tour_group.as_sub_command("de france") - async def de_france_command(ctx: tanjun.abc.MessageContext): ... + async def de_france_command(ctx: tanjun.abc.MessageContext) -> None: ... def context_menu_example(component: tanjun.Component) -> None: @@ -286,20 +285,22 @@ def using_checks_example() -> None: @component.with_check async def db_check(ctx: tanjun.abc.Context, db: alluka.Injected[Db]) -> bool: if (await db.get_user(ctx.author.id)).banned: - raise tanjun.CommandError("You are banned from using this bot") + error_message = "You are banned from using this bot" + raise tanjun.CommandError(error_message) return False @tanjun.with_owner_check(follow_wrapped=True) @tanjun.as_message_command("name") @tanjun.as_slash_command("name", "description") - async def owner_only_command(ctx: tanjun.abc.Context): ... + async def owner_only_command(ctx: tanjun.abc.Context) -> None: ... def custom_check_example() -> None: def check(ctx: tanjun.abc.Context) -> bool: if ctx.author.discriminator % 2: - raise tanjun.CommandError("You are not one of the chosen ones") + error_message = "You are not one of the chosen ones" + raise tanjun.CommandError(error_message) return True diff --git a/examples/__init__.py b/examples/__init__.py index 0d1ed3f44..593479c8a 100644 --- a/examples/__init__.py +++ b/examples/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/examples/checks.py b/examples/checks.py index 69a064f1a..dd7d5e900 100644 --- a/examples/checks.py +++ b/examples/checks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # @@ -52,7 +51,8 @@ async def slash_check( # If they don't then we raise a special error which will be caught # by the command handler and displayed to the user. - raise tanjun.CommandError("You cannot use this command until you have setup an account") + error_message = "You cannot use this command until you have setup an account" + raise tanjun.CommandError(error_message) # It's worth noting that since this check takes `MessageContext` it is diff --git a/examples/config.py b/examples/config.py index edc8de263..1966bf21e 100644 --- a/examples/config.py +++ b/examples/config.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/examples/error_handling.py b/examples/error_handling.py index ab651c708..b3339695e 100644 --- a/examples/error_handling.py +++ b/examples/error_handling.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/examples/impls.py b/examples/impls.py index 9f96940de..d591359c6 100644 --- a/examples/impls.py +++ b/examples/impls.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # @@ -24,7 +23,9 @@ class DatabaseImpl: def __init__(self) -> None: self._conn: typing.Any | None = None - async def connect(self, config: examples.config.ExampleConfig = tanjun.inject(type=examples.config.ExampleConfig)): + async def connect( + self, config: examples.config.ExampleConfig = tanjun.inject(type=examples.config.ExampleConfig) + ) -> None: self._conn = await connect_to_database(password=config.database_password, url=config.database_url) async def get_guild_info(self, guild_id: int) -> protos.GuildConfig | None: diff --git a/examples/injection.py b/examples/injection.py index f02f3da20..96428e6f5 100644 --- a/examples/injection.py +++ b/examples/injection.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # @@ -28,7 +27,7 @@ async def guild_command( # The implementation for this is provided with Client.set_type_dependency. ctx: tanjun.abc.MessageContext, database: protos.DatabaseProto = tanjun.inject(type=protos.DatabaseProto), -): +) -> None: assert ctx.guild_id is not None # This is checked by the "with_guild_check" guild_info = await database.get_guild_info(ctx.guild_id) @@ -54,7 +53,8 @@ async def user( if not user: # CommandError's message will be sent as a response message. - raise tanjun.CommandError("No information stored for you") + error_message = "No information stored for you" + raise tanjun.CommandError(error_message) ... # TODO: implement response diff --git a/examples/message_commands.py b/examples/message_commands.py index fc98a16a5..b1c1095dd 100644 --- a/examples/message_commands.py +++ b/examples/message_commands.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/examples/protos.py b/examples/protos.py index 99688dd37..8e744996a 100644 --- a/examples/protos.py +++ b/examples/protos.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/examples/run_gateway.py b/examples/run_gateway.py index 448710bac..bbdcd2207 100644 --- a/examples/run_gateway.py +++ b/examples/run_gateway.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/examples/run_rest.py b/examples/run_rest.py index 8e146d9aa..59cfff0c3 100644 --- a/examples/run_rest.py +++ b/examples/run_rest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # @@ -47,7 +46,7 @@ async def run() -> None: bot.run() -def main(): +def main() -> None: asyncio.run(run()) diff --git a/examples/slash_commands.py b/examples/slash_commands.py index ec44ba45b..47f3fa1a7 100644 --- a/examples/slash_commands.py +++ b/examples/slash_commands.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Tanjun Examples - A collection of examples for Tanjun. # Written in 2021 by Faster Speeding Lucina@lmbyrne.dev # diff --git a/noxfile.py b/noxfile.py index 14e418df6..ae6daaad1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/pyproject.toml b/pyproject.toml index 938a36ca0..1142c9919 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,6 +114,7 @@ ignore = [ "COM812", # Trailing comma missing (incompatible with black) "FIX002", # Line contains TODO, consider resolving the issue "I001", # [*] Import block is un-sorted or un-formatted + "PYI041", # Use `float` instead of `int | float` "S101", # Use of `assert` detected "SIM108", # Use ternary operator `` instead of `if`-`else`-block "TD002", # Missing author in TODO; try: `# TODO(): ...` or `# TODO @: ...` @@ -141,8 +142,43 @@ ignore = [ "D102", # Missing docstring in public method "D103", # Missing docstring in public function "D104", # Missing docstring in public package + "FBT001", # Boolean-typed positional argument in function definition + "PGH003", # Use specific rule codes when ignoring type issues "PLR2004", # Magic value used in comparison, consider replacing `` with a constant variable - "SLF001", # Private member accessed: `_injector` + "SLF001", # Private member accessed: `` +] +"tests/test_annotations_future_annotations.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "PLW0603", # Using the global statement to update `` is discouraged + "UP007", # [*] Use `X | Y` for type annotations +] +"tests/test_annotations.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "UP007", # [*] Use `X | Y` for type annotations +] +"tests/test_clients_future_annotations.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "PLW0603", # Using the global statement to update `` is discouraged + "UP007", # [*] Use `X | Y` for type annotations +] +"tests/test_clients.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "UP007", # [*] Use `X | Y` for type annotations +] +"tests/test_components_future_annotations.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "PGH003", # Use specific rule codes when ignoring type issues + "PLW0603", # Using the global statement to update `` is discouraged + "UP007", # [*] Use `X | Y` for type annotations +] +"tests/test_components.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable + "PGH003", # Use specific rule codes when ignoring type issues + "UP007", # [*] Use `X | Y` for type annotations +] +"tests/test_schedules.py" = [ + "DTZ001", # `datetime.datetime()` called without a `tzinfo` argument + "DTZ005", # `datetime.datetime.now()` called without a `tz` argument ] [tool.ruff.lint.mccabe] @@ -264,3 +300,6 @@ tanjun.clients:(_LoaderDescriptor|_UnloaderDescriptor) | tanjun.dependencies.reloaders:(_PathLoader|_ScanResult) | .*Proto """ + +[tool.uv] +reinstall-package = ["hikari-tanjun"] diff --git a/tanjun/__init__.py b/tanjun/__init__.py index 4fb7139f7..963b46cdf 100644 --- a/tanjun/__init__.py +++ b/tanjun/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tanjun/_internal/__init__.py b/tanjun/_internal/__init__.py index 125c7d970..146e58fde 100644 --- a/tanjun/_internal/__init__.py +++ b/tanjun/_internal/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -47,10 +46,10 @@ import hikari -from .. import errors +from tanjun import errors if typing.TYPE_CHECKING: - from .. import abc as tanjun + from tanjun import abc as tanjun _T = typing.TypeVar("_T") _P = typing.ParamSpec("_P") @@ -228,14 +227,17 @@ def infer_listener_types( try: signature = inspect.Signature.from_callable(callback, eval_str=True) except ValueError: # Callback has no signature - raise ValueError("Missing event type") from None + error_message = "Missing event type" + raise ValueError(error_message) from None parameter = next(iter(signature.parameters.values()), None) if not parameter or parameter.kind not in _POSITIONAL_TYPES: - raise ValueError("Missing positional event argument") from None + error_message = "Missing positional event argument" + raise ValueError(error_message) from None if parameter.annotation is parameter.empty: - raise ValueError("Missing event argument annotation") from None + error_message = "Missing event argument annotation" + raise ValueError(error_message) from None event_types: list[type[hikari.Event]] = [] @@ -248,7 +250,8 @@ def infer_listener_types( pass if not event_types: - raise TypeError(f"No valid event types found in the signature of {callback}") from None + error_message = f"No valid event types found in the signature of {callback}" + raise TypeError(error_message) from None return event_types @@ -411,7 +414,8 @@ def parse_channel_types(*channel_types: type[hikari.PartialChannel] | int) -> li return list(dict.fromkeys(types_iter)) except KeyError as exc: - raise ValueError(f"Unknown channel type {exc.args[0]}") from exc + error_message = f"Unknown channel type {exc.args[0]}" + raise ValueError(error_message) from exc _CHANNEL_TYPE_REPS: dict[hikari.ChannelType, str] = { @@ -456,8 +460,8 @@ def cmp_command( if cmd.name_localizations != other.name_localizations: return False - if isinstance(cmd, (hikari.SlashCommand, hikari.api.SlashCommandBuilder)): - assert isinstance(other, (hikari.SlashCommand, hikari.api.SlashCommandBuilder)) + if isinstance(cmd, hikari.SlashCommand | hikari.api.SlashCommandBuilder): + assert isinstance(other, hikari.SlashCommand | hikari.api.SlashCommandBuilder) if cmd.description != other.description or cmd.description_localizations != other.description_localizations: return False @@ -536,7 +540,8 @@ def add(self, command: tanjun.MessageCommand[typing.Any], /) -> bool: if self.is_strict: if any(" " in name for name in command.names): - raise ValueError("Command name cannot contain spaces in a strict collection") + error_message = "Command name cannot contain spaces in a strict collection" + raise ValueError(error_message) names = list(filter(None, command.names)) insensitive_names = [name.casefold() for name in command.names] diff --git a/tanjun/_internal/cache.py b/tanjun/_internal/cache.py index 1672107bb..89631a029 100644 --- a/tanjun/_internal/cache.py +++ b/tanjun/_internal/cache.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -37,10 +36,10 @@ import hikari -from ..dependencies import async_cache +from tanjun.dependencies import async_cache if typing.TYPE_CHECKING: - from .. import abc as tanjun + from tanjun import abc as tanjun _ChannelCacheT = async_cache.SfCache[hikari.PermissibleGuildChannel] _ThreadCacheT = async_cache.SfCache[hikari.GuildThreadChannel] @@ -77,7 +76,7 @@ async def get_perm_channel(client: tanjun.Client, channel_id: hikari.Snowflake, thread_cache = client.injector.get_type_dependency(_ThreadCacheT, default=None) if thread_cache: # noqa: SIM102 # Has to be nested cause of pyright bug: - if thread := await thread_cache.get(channel_id, default=None): # noqa: SIM102 + if thread := await thread_cache.get(channel_id, default=None): # Has to be nested cause of pyright bug. if client.cache and (channel := client.cache.get_guild_channel(thread.parent_id)): return channel diff --git a/tanjun/_internal/localisation.py b/tanjun/_internal/localisation.py index d2738c304..69a7ae3a0 100644 --- a/tanjun/_internal/localisation.py +++ b/tanjun/_internal/localisation.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -37,9 +36,9 @@ import hikari -from .. import _internal -from .. import abc as tanjun -from .. import dependencies +from tanjun import _internal +from tanjun import abc as tanjun +from tanjun import dependencies if typing.TYPE_CHECKING: from collections import abc as collections @@ -49,7 +48,7 @@ class MaybeLocalised: """Class used for handling name and description localisation.""" - __slots__ = ("default_value", "_field_name", "id", "localised_values") + __slots__ = ("_field_name", "default_value", "id", "localised_values") def __init__( self, field_name: str, field: str | collections.Mapping[str, str] | collections.Iterable[tuple[str, str]], / @@ -92,7 +91,8 @@ def __init__( entry = next(iter(self.localised_values.values()), None) if entry is None: - raise RuntimeError(f"No default {field_name} given") + error_message = f"No default {field_name} given" + raise RuntimeError(error_message) self.default_value = entry @@ -157,12 +157,14 @@ def assert_matches( """ for value in self._values(): if not match(value): - raise ValueError( + error_message = ( f"Invalid {self._field_name} provided, {value!r} doesn't match the required regex `{pattern}`" ) + raise ValueError(error_message) if lower_only and value.lower() != value: - raise ValueError(f"Invalid {self._field_name} provided, {value!r} must be lowercase") + error_message = f"Invalid {self._field_name} provided, {value!r} must be lowercase" + raise ValueError(error_message) return self @@ -186,14 +188,16 @@ def assert_length(self, min_length: int, max_length: int, /) -> Self: real_max_len = lengths[-1] if real_max_len > max_length: - raise ValueError( + error_message = ( f"{self._field_name.capitalize()} must be less than or equal to {max_length} characters in length" ) + raise ValueError(error_message) if real_min_len < min_length: - raise ValueError( + error_message = ( f"{self._field_name.capitalize()} must be greater than or equal to {min_length} characters in length" ) + raise ValueError(error_message) return self @@ -251,12 +255,14 @@ def to_localise_id( """ if field_name: if field_type == "name" or field_type == "description": - raise RuntimeError(f"Field_name must not be provided for {field_type} fields") + error_message = f"Field_name must not be provided for {field_type} fields" + raise RuntimeError(error_message) return f"{command_type}:{command_name}:{field_type}:{field_name}" if field_type != "name" and field_type != "description": - raise RuntimeError(f"Field_name must be provided for {field_type} fields") + error_message = f"Field_name must be provided for {field_type} fields" + raise RuntimeError(error_message) return f"{command_type}:{command_name}:{field_type}" diff --git a/tanjun/abc.py b/tanjun/abc.py index 7a5f437f5..29063b2b6 100644 --- a/tanjun/abc.py +++ b/tanjun/abc.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -4475,19 +4474,19 @@ def iter_commands(self) -> collections.Iterator[ExecutableCommand[Context]]: @typing.overload @abc.abstractmethod def iter_menu_commands( - self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.MESSAGE] # noqa: A002 + self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.MESSAGE] ) -> collections.Iterator[MenuCommand[typing.Any, typing.Literal[hikari.CommandType.MESSAGE]]]: ... @typing.overload @abc.abstractmethod def iter_menu_commands( - self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.USER] # noqa: A002 + self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.USER] ) -> collections.Iterator[MenuCommand[typing.Any, typing.Literal[hikari.CommandType.USER]]]: ... @typing.overload @abc.abstractmethod def iter_menu_commands( - self, *, global_only: bool = False, type: hikari.CommandType | None = None # noqa: A002 + self, *, global_only: bool = False, type: hikari.CommandType | None = None ) -> collections.Iterator[MenuCommand[typing.Any, typing.Any]]: ... @abc.abstractmethod diff --git a/tanjun/annotations.py b/tanjun/annotations.py index 7bdf59862..bc83acc47 100644 --- a/tanjun/annotations.py +++ b/tanjun/annotations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -247,7 +246,6 @@ async def command( import abc import dataclasses import datetime -import enum import inspect import itertools import operator @@ -266,6 +264,7 @@ async def command( from .commands import slash if typing.TYPE_CHECKING: + import enum from typing import Self _T = typing.TypeVar("_T") @@ -376,11 +375,11 @@ class _Field(_ConfigIdentifier): "_empty_value", "_is_greedy", "_is_positional", + "_max_length", + "_max_value", "_message_names", "_min_length", - "_max_length", "_min_value", - "_max_value", "_option_type", "_slash_name", "_snowflake_converter", @@ -1461,7 +1460,8 @@ def __getitem__(cls, enum_: type[_EnumT], /) -> type[_EnumT]: converter = None else: - raise TypeError("Enum must be a subclass of str, float or int") + error_message = "Enum must be a subclass of str, float or int" + raise TypeError(error_message) enum_onverter = _EnumConverter(enum_) # TODO: do we want to wrap the convert callback to give better failed parse messages? @@ -1890,7 +1890,7 @@ async def command( specified and ignores any specified step. """ - __slots__ = ("_min_length", "_max_length") + __slots__ = ("_max_length", "_min_length") @typing.overload def __init__(self, max_length: int, /) -> None: ... @@ -2296,9 +2296,10 @@ def _ensure_value(name: str, type_: type[_T], value: typing.Any | None, /) -> _T if value is None or isinstance(value, type_): return value - raise TypeError( + error_message = ( f"{name.capitalize()} value of type {type(value).__name__} is not valid for a {type_.__name__} argument" ) + raise TypeError(error_message) def _ensure_values( @@ -2309,9 +2310,10 @@ def _ensure_values( for value in mapping.values(): if not isinstance(value, type_): - raise TypeError( + error_message = ( f"{name.capitalize()} of type {type(value).__name__} is not valid for a {type_.__name__} argument" ) + raise TypeError(error_message) return typing.cast("collections.Mapping[str, _T]", mapping) @@ -2351,11 +2353,11 @@ class _ArgConfig: "is_positional", "key", "main_message_name", - "min_length", "max_length", - "min_value", "max_value", "message_names", + "min_length", + "min_value", "option_type", "range_or_slice", "slash_name", @@ -2390,9 +2392,10 @@ def __init__(self, key: str, default: typing.Any, /, *, description: str | None) def set_option_type(self, option_type: typing.Any, /) -> None: if self.option_type is not None and option_type != self.option_type: - raise RuntimeError( + error_message = ( f"Conflicting option types of {self.option_type} and {option_type} found for {self.key!r} parameter" ) + raise RuntimeError(error_message) self.option_type = option_type @@ -2404,7 +2407,7 @@ def from_annotation(self, annotation: typing.Any, /) -> Self: elif not self.description and isinstance(arg, str): self.description = arg - elif isinstance(arg, (range, slice)): + elif isinstance(arg, range | slice): self.range_or_slice = arg return self @@ -2450,7 +2453,8 @@ def add_to_msg_cmds(self, commands: collections.Sequence[message.MessageCommand[ converters = (conversion.ToChannel(allowed_types=self.channel_types or None),) elif not self.has_natural_default: - raise RuntimeError(f"{self.option_type!r} is not supported for message commands") + error_message = f"{self.option_type!r} is not supported for message commands" + raise RuntimeError(error_message) else: # If there is a real default then this should just be left to always default @@ -2463,7 +2467,8 @@ def add_to_msg_cmds(self, commands: collections.Sequence[message.MessageCommand[ for command in commands: if command.parser: if not isinstance(command.parser, parsing.AbstractOptionParser): - raise TypeError("Expected parser to be an instance of tanjun.parsing.AbstractOptionParser") + error_message = "Expected parser to be an instance of tanjun.parsing.AbstractOptionParser" + raise TypeError(error_message) parser = command.parser @@ -2484,7 +2489,8 @@ def add_to_msg_cmds(self, commands: collections.Sequence[message.MessageCommand[ ) elif self.default is tanjun.NO_DEFAULT: - raise ValueError(f"Flag argument {self.key!r} must have a default") + error_message = f"Flag argument {self.key!r} must have a default" + raise ValueError(error_message) else: parser.add_option( @@ -2506,7 +2512,8 @@ def add_to_slash_cmds(self, commands: collections.Sequence[slash.SlashCommand[ty option_adder = self.SLASH_OPTION_ADDER[self.option_type] for command in commands: if not self.description: - raise ValueError(f"Missing description for argument {self.key!r}") + error_message = f"Missing description for argument {self.key!r}" + raise ValueError(error_message) option_adder(self, command, self.description) diff --git a/tanjun/checks.py b/tanjun/checks.py index 1d6a2eb3d..625dc04ce 100644 --- a/tanjun/checks.py +++ b/tanjun/checks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -56,7 +55,6 @@ import typing -import alluka import hikari from . import _internal @@ -70,6 +68,8 @@ if typing.TYPE_CHECKING: from collections import abc as collections + import alluka + _ContextT_contra = typing.TypeVar("_ContextT_contra", bound=tanjun.Context, contravariant=True) class _AnyCallback(typing.Protocol[_ContextT_contra]): @@ -102,7 +102,7 @@ def _optional_kwargs( class _Check: - __slots__ = ("_error", "_error_message", "_halt_execution", "_localise_id", "__weakref__") + __slots__ = ("__weakref__", "_error", "_error_message", "_halt_execution", "_localise_id") def __init__( self, @@ -1002,13 +1002,13 @@ def with_check( class _AllChecks(typing.Generic[_ContextT]): - __slots__ = ("_checks", "__weakref__") + __slots__ = ("__weakref__", "_checks") def __init__(self, checks: list[tanjun.CheckSig[_ContextT]]) -> None: self._checks = checks async def __call__(self, ctx: _ContextT, /) -> bool: - for check in self._checks: # noqa: SIM111 + for check in self._checks: if not await ctx.call_with_async_di(check, ctx): return False diff --git a/tanjun/clients.py b/tanjun/clients.py index ccdd76a37..34c797e75 100644 --- a/tanjun/clients.py +++ b/tanjun/clients.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -179,7 +178,8 @@ def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> None: def load(self, client: tanjun.Client, /) -> bool: if self._must_be_std: if not isinstance(client, Client): - raise TypeError("This loader requires instances of the standard Client implementation") + error_message = "This loader requires instances of the standard Client implementation" + raise TypeError(error_message) self._callback(client) @@ -219,7 +219,8 @@ def load(self, _: tanjun.Client, /) -> bool: def unload(self, client: tanjun.Client, /) -> bool: if self._must_be_std: if not isinstance(client, Client): - raise TypeError("This unloader requires instances of the standard Client implementation") + error_message = "This unloader requires instances of the standard Client implementation" + raise TypeError(error_message) self._callback(client) @@ -458,7 +459,7 @@ async def on_parser_error(ctx: tanjun.Context, error: errors.ParserError, /) -> class _StartDeclarer: - __slots__ = ("client", "command_ids", "guild_id", "message_ids", "user_ids", "__weakref__") + __slots__ = ("__weakref__", "client", "command_ids", "guild_id", "message_ids", "user_ids") def __init__( self, @@ -535,13 +536,9 @@ class Client(tanjun.Client): "_events", "_grab_mention_prefix", "_hooks", + "_injector", "_interaction_accepts", "_is_case_sensitive", - "_menu_hooks", - "_menu_not_found", - "_slash_hooks", - "_slash_not_found", - "_injector", "_is_closing", "_listeners", "_loop", @@ -549,6 +546,8 @@ class Client(tanjun.Client): "_make_menu_context", "_make_message_context", "_make_slash_context", + "_menu_hooks", + "_menu_not_found", "_message_accepts", "_message_hooks", "_metadata", @@ -559,6 +558,8 @@ class Client(tanjun.Client): "_rest", "_server", "_shards", + "_slash_hooks", + "_slash_not_found", "_tasks", "_voice", ) @@ -770,7 +771,8 @@ def __init__( if event_managed: if not events: - raise ValueError("Client cannot be event managed without an event manager") + error_message = "Client cannot be event managed without an event manager" + raise ValueError(error_message) events.subscribe(hikari.StartingEvent, self._on_starting) events.subscribe(hikari.StoppingEvent, self._on_stopping) @@ -831,10 +833,11 @@ def _schedule_startup_registers( declare_global_commands = declare_global_commands or set_global_commands if isinstance(declare_global_commands, collections.Sequence): if command_ids and len(declare_global_commands) > 1: - raise ValueError( + error_message = ( "Cannot provide specific command_ids while automatically " "declaring commands marked as 'global' in multiple-guilds on startup" ) + raise ValueError(error_message) for guild in declare_global_commands: _LOGGER.info("Registering startup command declarer for %s guild", guild) @@ -860,7 +863,8 @@ def _schedule_startup_registers( ) elif command_ids: - raise ValueError("Cannot pass command IDs when not declaring global commands") + error_message = "Cannot pass command IDs when not declaring global commands" + raise ValueError(error_message) else: self.add_client_callback( @@ -1493,13 +1497,16 @@ async def declare_application_commands( ) if message_count > 5: - raise ValueError("You can only declare up to 5 top level message context menus in a guild or globally") + error_message = "You can only declare up to 5 top level message context menus in a guild or globally" + raise ValueError(error_message) if slash_count > 100: - raise ValueError("You can only declare up to 100 top level slash commands in a guild or globally") + error_message = "You can only declare up to 100 top level slash commands in a guild or globally" + raise ValueError(error_message) if user_count > 5: - raise ValueError("You can only declare up to 5 top level message context menus in a guild or globally") + error_message = "You can only declare up to 5 top level message context menus in a guild or globally" + raise ValueError(error_message) application = application or self._cached_application_id or await self.fetch_rest_application_id() target_type = "global" if guild is hikari.UNDEFINED else f"guild {int(guild)}" @@ -1704,7 +1711,8 @@ def set_interaction_accepts(self, accepts: InteractionAcceptsEnum, /) -> Self: If called while the client is running. """ if self._loop: - raise RuntimeError("Cannot change this config while the client is running") + error_message = "Cannot change this config while the client is running" + raise RuntimeError(error_message) self._interaction_accepts = accepts return self @@ -1727,10 +1735,12 @@ def set_message_accepts(self, accepts: MessageAcceptsEnum, /) -> Self: when the client doesn't have a linked event manager. """ if accepts.get_event_type() and not self._events: - raise ValueError("Cannot set accepts level on a client with no event manager") + error_message = "Cannot set accepts level on a client with no event manager" + raise ValueError(error_message) if self._loop: - raise RuntimeError("Cannot change this config while the client is running") + error_message = "Cannot change this config while the client is running" + raise RuntimeError(error_message) self._message_accepts = accepts return self @@ -1956,7 +1966,8 @@ def add_component(self, component: tanjun.Component, /) -> Self: If the component's name is already registered. """ if component.name in self._components: - raise ValueError(f"A component named {component.name!r} is already registered.") + error_message = f"A component named {component.name!r} is already registered." + raise ValueError(error_message) component.bind_client(self) self._components[component.name] = component @@ -1977,7 +1988,8 @@ def remove_component(self, component: tanjun.Component, /) -> Self: # <>. stored_component = self._components.get(component.name) if not stored_component or stored_component != component: - raise ValueError(f"The component {component!r} is not registered.") + error_message = f"The component {component!r} is not registered." + raise ValueError(error_message) del self._components[component.name] @@ -2209,17 +2221,17 @@ def iter_commands(self) -> collections.Iterator[tanjun.ExecutableCommand[tanjun. @typing.overload def iter_menu_commands( - self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.MESSAGE] # noqa: A002 + self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.MESSAGE] ) -> collections.Iterator[tanjun.MenuCommand[typing.Any, typing.Literal[hikari.CommandType.MESSAGE]]]: ... @typing.overload def iter_menu_commands( - self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.USER] # noqa: A002 + self, *, global_only: bool = False, type: typing.Literal[hikari.CommandType.USER] ) -> collections.Iterator[tanjun.MenuCommand[typing.Any, typing.Literal[hikari.CommandType.USER]]]: ... @typing.overload def iter_menu_commands( - self, *, global_only: bool = False, type: hikari.CommandType | None = None # noqa: A002. + self, *, global_only: bool = False, type: hikari.CommandType | None = None ) -> collections.Iterator[tanjun.MenuCommand[typing.Any, typing.Any]]: ... def iter_menu_commands( @@ -2231,7 +2243,8 @@ def iter_menu_commands( if type: if type not in _MENU_TYPES: - raise ValueError("Command type filter must be USER or MESSAGE") + error_message = "Command type filter must be USER or MESSAGE" + raise ValueError(error_message) return filter(lambda c: c.type == type, self.iter_menu_commands(global_only=global_only, type=None)) @@ -2284,7 +2297,8 @@ async def close(self, *, deregister_listeners: bool = True) -> None: If the client isn't running. """ if not self._loop: - raise RuntimeError("Client isn't active") + error_message = "Client isn't active" + raise RuntimeError(error_message) if self._is_closing: event = asyncio.Event() @@ -2334,7 +2348,8 @@ async def open(self, *, register_listeners: bool = True) -> None: If the client is already active. """ if self._loop: - raise RuntimeError("Client is already alive") + error_message = "Client is already alive" + raise RuntimeError(error_message) self._loop = asyncio.get_running_loop() self._is_closing = False @@ -2532,7 +2547,8 @@ def _call_loaders(self, module_path: str | pathlib.Path, loaders: list[tanjun.Cl found = True if not found: - raise errors.ModuleMissingLoaders(f"Didn't find any loaders in {module_path}", module_path) + error_message = f"Didn't find any loaders in {module_path}" + raise errors.ModuleMissingLoaders(error_message, module_path) def _call_unloaders(self, module_path: str | pathlib.Path, loaders: list[tanjun.ClientLoader], /) -> None: found = False @@ -2541,14 +2557,16 @@ def _call_unloaders(self, module_path: str | pathlib.Path, loaders: list[tanjun. found = True if not found: - raise errors.ModuleMissingUnloaders(f"Didn't find any unloaders in {module_path}", module_path) + error_message = f"Didn't find any unloaders in {module_path}" + raise errors.ModuleMissingUnloaders(error_message, module_path) def _load_module( self, module_path: str | pathlib.Path, / ) -> collections.Generator[collections.Callable[[], types.ModuleType], types.ModuleType, None]: if isinstance(module_path, str): if module_path in self._modules: - raise errors.ModuleStateConflict(f"module {module_path} already loaded", module_path) + error_message = f"module {module_path} already loaded" + raise errors.ModuleStateConflict(error_message, module_path) _LOGGER.info("Loading from %s", module_path) module = yield _LoadModule(module_path) @@ -2560,7 +2578,8 @@ def _load_module( else: if module_path in self._path_modules: - raise errors.ModuleStateConflict(f"Module at {module_path} already loaded", module_path) + error_message = f"Module at {module_path} already loaded" + raise errors.ModuleStateConflict(error_message, module_path) _LOGGER.info("Loading from %s", module_path) module = yield _LoadModule(module_path) @@ -2586,7 +2605,8 @@ def load_modules(self, *modules: str | pathlib.Path) -> Self: except StopIteration: pass else: - raise RuntimeError("Generator didn't finish") + error_message = "Generator didn't finish" + raise RuntimeError(error_message) return self @@ -2607,7 +2627,8 @@ async def load_modules_async(self, *modules: str | pathlib.Path) -> None: except StopIteration: pass else: - raise RuntimeError("Generator didn't finish") + error_message = "Generator didn't finish" + raise RuntimeError(error_message) def unload_modules(self, *modules: str | pathlib.Path) -> Self: # <>. @@ -2621,7 +2642,8 @@ def unload_modules(self, *modules: str | pathlib.Path) -> Self: module = modules_dict.get(module_path) if not module: - raise errors.ModuleStateConflict(f"Module {module_path!s} not loaded", module_path) + error_message = f"Module {module_path!s} not loaded" + raise errors.ModuleStateConflict(error_message, module_path) _LOGGER.info("Unloading from %s", module_path) with _WrapLoadError(errors.FailedModuleUnload, module_path): @@ -2645,7 +2667,8 @@ def _reload_module( modules_dict = self._path_modules if not old_module: - raise errors.ModuleStateConflict(f"Module {module_path} not loaded", module_path) + error_message = f"Module {module_path} not loaded" + raise errors.ModuleStateConflict(error_message, module_path) load_module = load_module or _ReloadModule(old_module) # If this is None then it's a Python path. _LOGGER.info("Reloading %s", module_path) @@ -2654,7 +2677,8 @@ def _reload_module( # We assert that the old module has unloaders early to avoid unnecessarily # importing the new module. if not any(loader.has_unload for loader in old_loaders): - raise errors.ModuleMissingUnloaders(f"Didn't find any unloaders in old {module_path}", module_path) + error_message = f"Didn't find any unloaders in old {module_path}" + raise errors.ModuleMissingUnloaders(error_message, module_path) module = yield load_module @@ -2663,7 +2687,8 @@ def _reload_module( # We assert that the new module has loaders early to avoid unnecessarily # unloading then rolling back when we know it's going to fail to load. if not any(loader.has_load for loader in loaders): - raise errors.ModuleMissingLoaders(f"Didn't find any loaders in new {module_path}", module_path) + error_message = f"Didn't find any loaders in new {module_path}" + raise errors.ModuleMissingLoaders(error_message, module_path) with _WrapLoadError(errors.FailedModuleUnload, module_path): # This will never raise MissingLoaders as we assert this earlier @@ -2694,7 +2719,8 @@ def reload_modules(self, *modules: str | pathlib.Path) -> Self: except StopIteration: pass else: - raise RuntimeError("Generator didn't finish") + error_message = "Generator didn't finish" + raise RuntimeError(error_message) return self @@ -2717,7 +2743,8 @@ async def reload_modules_async(self, *modules: str | pathlib.Path) -> None: pass else: - raise RuntimeError("Generator didn't finish") + error_message = "Generator didn't finish" + raise RuntimeError(error_message) def set_type_dependency(self, type_: type[_T], value: _T, /) -> Self: # <>. @@ -2882,7 +2909,8 @@ async def on_gateway_command_create(self, interaction: hikari.CommandInteraction hooks = self._get_menu_hooks() else: - raise RuntimeError(f"Unknown command type {interaction.command_type}") + error_message = f"Unknown command type {interaction.command_type}" + raise RuntimeError(error_message) if self._auto_defer_after is not None: ctx.start_defer_timer(self._auto_defer_after) @@ -2890,7 +2918,7 @@ async def on_gateway_command_create(self, interaction: hikari.CommandInteraction try: if not await self.check(ctx): await _mark_not_found_event(ctx) - return + return None for component in self._components.values(): # This is set on each iteration to ensure that any component @@ -2918,9 +2946,10 @@ async def on_gateway_command_create(self, interaction: hikari.CommandInteraction await exc.send(ctx) finally: ctx.cancel_defer() - return + return None await _mark_not_found_event(ctx) + return None async def on_interaction_create_event(self, event: hikari.InteractionCreateEvent, /) -> None: """Handle a gateway interaction create event. @@ -2936,13 +2965,15 @@ async def on_interaction_create_event(self, event: hikari.InteractionCreateEvent if self._interaction_accepts & InteractionAcceptsEnum.COMMANDS: assert isinstance(event.interaction, hikari.CommandInteraction) return await self.on_gateway_command_create(event.interaction) + return None - elif ( + if ( event.interaction.type is hikari.InteractionType.AUTOCOMPLETE and self._interaction_accepts & InteractionAcceptsEnum.AUTOCOMPLETE ): assert isinstance(event.interaction, hikari.AutocompleteInteraction) return await self.on_gateway_autocomplete_create(event.interaction) + return None async def on_autocomplete_interaction_request( self, interaction: hikari.AutocompleteInteraction, / @@ -2970,7 +3001,8 @@ async def on_autocomplete_interaction_request( self._add_task(task) return await future - raise RuntimeError(f"Autocomplete not found for {interaction!r}") + error_message = f"Autocomplete not found for {interaction!r}" + raise RuntimeError(error_message) async def on_command_interaction_request( self, interaction: hikari.CommandInteraction, / @@ -3017,7 +3049,8 @@ async def on_command_interaction_request( hooks = self._get_menu_hooks() else: - raise RuntimeError(f"Unknown command type {interaction.command_type}") + error_message = f"Unknown command type {interaction.command_type}" + raise RuntimeError(error_message) if self._auto_defer_after is not None: ctx.start_defer_timer(self._auto_defer_after) @@ -3108,7 +3141,7 @@ def _get_loaders(module: types.ModuleType, module_path: str | pathlib.Path, /) - iterator = ( member for name, member in inspect.getmembers(module) - if not name.startswith("_") or name.startswith("__") and name.endswith("__") + if not name.startswith("_") or (name.startswith("__") and name.endswith("__")) ) return [value for value in iterator if isinstance(value, tanjun.ClientLoader)] @@ -3120,7 +3153,8 @@ def _get_path_module(module_path: pathlib.Path, /) -> types.ModuleType: # https://github.com/python/typeshed/issues/2793 if not spec or not isinstance(spec.loader, importlib.abc.Loader): - raise ModuleNotFoundError(f"Module not found at {module_path}", name=module_name, path=str(module_path)) + error_message = f"Module not found at {module_path}" + raise ModuleNotFoundError(error_message, name=module_name, path=str(module_path)) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) @@ -3144,7 +3178,7 @@ def __exit__( if ( exc and isinstance(exc, Exception) - and not isinstance(exc, (errors.ModuleMissingLoaders, errors.ModuleMissingUnloaders)) + and not isinstance(exc, errors.ModuleMissingLoaders | errors.ModuleMissingUnloaders) ): raise self._error(*self._args, **self._kwargs) from exc diff --git a/tanjun/commands/__init__.py b/tanjun/commands/__init__.py index ca138f731..42c4f703c 100644 --- a/tanjun/commands/__init__.py +++ b/tanjun/commands/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tanjun/commands/base.py b/tanjun/commands/base.py index e9a28f23f..db2d2e973 100644 --- a/tanjun/commands/base.py +++ b/tanjun/commands/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -36,8 +35,8 @@ import copy import typing -from .. import abc as tanjun -from .. import components +from tanjun import abc as tanjun +from tanjun import components if typing.TYPE_CHECKING: from collections import abc as collections diff --git a/tanjun/commands/menu.py b/tanjun/commands/menu.py index 33f985817..709ece29f 100644 --- a/tanjun/commands/menu.py +++ b/tanjun/commands/menu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -37,12 +36,13 @@ import hikari -from .. import _internal -from .. import abc as tanjun -from .. import components -from .. import errors -from .. import hooks as hooks_ -from .._internal import localisation +from tanjun import _internal +from tanjun import abc as tanjun +from tanjun import components +from tanjun import errors +from tanjun import hooks as hooks_ +from tanjun._internal import localisation + from . import base if typing.TYPE_CHECKING: @@ -170,7 +170,7 @@ async def message_command(self, ctx: tanjun.abc.MenuContext, message: hikari.Mes def decorator( callback: _CallbackishT[_MessageCallbackSigT], / ) -> MenuCommand[_MessageCallbackSigT, typing.Literal[hikari.CommandType.MESSAGE]]: - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): wrapped_command = callback # Cast needed cause of a pyright bug callback = typing.cast("_MessageCallbackSigT", callback.callback) @@ -297,7 +297,7 @@ async def user_command( def decorator( callback: _CallbackishT[_UserCallbackSigT], / ) -> MenuCommand[_UserCallbackSigT, typing.Literal[hikari.CommandType.USER]]: - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): wrapped_command = callback # Cast needed cause of a pyright bug callback = typing.cast("_UserCallbackSigT", callback.callback) @@ -514,9 +514,10 @@ def __init__( names = localisation.MaybeLocalised("name", name).assert_length(1, 32) if type_ not in _VALID_TYPES: - raise ValueError("Command type must be message or user") + error_message = "Command type must be message or user" + raise ValueError(error_message) - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): # Cast needed cause of a pyright bug callback = typing.cast("_UserCallbackSigT", callback.callback) @@ -627,7 +628,8 @@ def build(self, *, component: tanjun.Component | None = None) -> hikari.api.Cont def set_tracked_command(self, command: hikari.PartialCommand, /) -> Self: # <>. if not isinstance(command, hikari.ContextMenuCommand): - raise TypeError("Command must be a ContextMenuCommand") + error_message = "Command must be a ContextMenuCommand" + raise TypeError(error_message) self._tracked_command = command return self @@ -695,7 +697,7 @@ async def execute( await ctx.mark_not_found() except Exception as exc: - if await own_hooks.trigger_error(ctx, exc, hooks=hooks) <= 0: # noqa: ASYNC120 + if await own_hooks.trigger_error(ctx, exc, hooks=hooks) <= 0: raise else: diff --git a/tanjun/commands/message.py b/tanjun/commands/message.py index 1b6fcc642..336b58857 100644 --- a/tanjun/commands/message.py +++ b/tanjun/commands/message.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -36,11 +35,12 @@ import copy import typing -from .. import _internal -from .. import abc as tanjun -from .. import components -from .. import errors -from .. import hooks as hooks_ +from tanjun import _internal +from tanjun import abc as tanjun +from tanjun import components +from tanjun import errors +from tanjun import hooks as hooks_ + from . import base if typing.TYPE_CHECKING: @@ -100,7 +100,7 @@ def as_message_command(name: str, /, *names: str, validate_arg_keys: bool = True """ def decorator(callback: _CallbackishT[_MessageCallbackSigT], /) -> MessageCommand[_MessageCallbackSigT]: - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): wrapped_command = callback # Cast needed cause of pyright bug. callback = typing.cast("_MessageCallbackSigT", callback.callback) @@ -157,7 +157,7 @@ def as_message_command_group( """ def decorator(callback: _CallbackishT[_MessageCallbackSigT], /) -> MessageCommandGroup[_MessageCallbackSigT]: - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): wrapped_command = callback # Cast needed cause of pyright bug callback = typing.cast("_MessageCallbackSigT", callback.callback) @@ -228,7 +228,7 @@ def __init__( Whether to validate that option keys match the command callback's signature. """ super().__init__() - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): # Cast needed cause of pyright bug. callback = typing.cast("_MessageCallbackSigT", callback.callback) @@ -349,7 +349,7 @@ async def execute( raise except Exception as exc: - if await own_hooks.trigger_error(ctx, exc, hooks=hooks) <= 0: # noqa: ASYNC120 + if await own_hooks.trigger_error(ctx, exc, hooks=hooks) <= 0: raise else: @@ -580,7 +580,8 @@ async def execute( ) -> None: # <>. if ctx.message.content is None: - raise ValueError("Cannot execute a command with a content-less message") + error_message = "Cannot execute a command with a content-less message" + raise ValueError(error_message) if self._hooks: if hooks is None: diff --git a/tanjun/commands/slash.py b/tanjun/commands/slash.py index 2c20462d0..9c8a3dd9c 100644 --- a/tanjun/commands/slash.py +++ b/tanjun/commands/slash.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -59,13 +58,14 @@ import hikari import typing_extensions -from .. import _internal -from .. import abc as tanjun -from .. import components -from .. import conversion -from .. import errors -from .. import hooks as hooks_ -from .._internal import localisation +from tanjun import _internal +from tanjun import abc as tanjun +from tanjun import components +from tanjun import conversion +from tanjun import errors +from tanjun import hooks as hooks_ +from tanjun._internal import localisation + from . import base if typing.TYPE_CHECKING: @@ -240,7 +240,7 @@ async def help_me_command(ctx: tanjun.abc.SlashContext) -> None: * If the command name doesn't fit Discord's requirements. * If the command name has uppercase characters. * If the description is over 100 characters long. - """ # noqa: E501 + """ return SlashCommandGroup( name, description, @@ -366,10 +366,10 @@ async def ping_command(self, ctx: tanjun.abc.SlashContext) -> None: * If the command name doesn't fit Discord's requirements. * If the command name has uppercase characters. * If the description is over 100 characters long. - """ # noqa: D202, E501 + """ def decorator(callback: _CallbackishT[_SlashCallbackSigT], /) -> SlashCommand[_SlashCallbackSigT]: - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): wrapped_command = callback # Cast needed cause of a pyright bug callback = typing.cast("_SlashCallbackSigT", callback.callback) @@ -825,7 +825,8 @@ async def convert(self, ctx: tanjun.SlashContext, value: typing.Any, /) -> typin except ValueError as exc: exceptions.append(exc) - raise errors.ConversionError(f"Couldn't convert {self.type} '{self.name}'", self.name, errors=exceptions) + error_message = f"Couldn't convert {self.type} '{self.name}'" + raise errors.ConversionError(error_message, self.name, errors=exceptions) class _SlashCommandBuilder(hikari.impl.SlashCommandBuilder): @@ -1012,7 +1013,8 @@ def type(self) -> typing.Literal[hikari.CommandType.SLASH]: def set_tracked_command(self, command: hikari.PartialCommand, /) -> Self: # <>. if not isinstance(command, hikari.SlashCommand): - raise TypeError("The tracked command must be a slash command") + error_message = "The tracked command must be a slash command" + raise TypeError(error_message) self._tracked_command = command return self @@ -1136,7 +1138,7 @@ def __init__( * If the command name doesn't fit Discord's requirements. * If the command name has uppercase characters. * If the description is over 100 characters long. - """ # noqa: E501 + """ super().__init__( name, description, @@ -1241,13 +1243,16 @@ def add_command(self, command: tanjun.BaseSlashCommand, /) -> Self: Object of this group to enable chained calls. """ if self._parent and isinstance(command, tanjun.SlashCommandGroup): - raise ValueError("Cannot add a slash command group to a nested slash command group") + error_message = "Cannot add a slash command group to a nested slash command group" + raise ValueError(error_message) if len(self._commands) == 25: - raise ValueError("Cannot add more than 25 commands to a slash command group") + error_message = "Cannot add more than 25 commands to a slash command group" + raise ValueError(error_message) if command.name in self._commands: - raise ValueError(f"Command with name {command.name!r} already exists in this group") + error_message = f"Command with name {command.name!r} already exists in this group" + raise ValueError(error_message) command.set_parent(self) self._commands[command.name] = command @@ -1315,7 +1320,7 @@ def as_sub_command( * If the command name doesn't fit Discord's requirements. * If the command name has uppercase characters. * If the description is over 100 characters long. - """ # noqa: D202, E501 + """ def decorator(callback: _CallbackishT[_SlashCallbackSigT], /) -> SlashCommand[_SlashCallbackSigT]: cmd = as_slash_command( @@ -1373,7 +1378,7 @@ def make_sub_group( * If the command name doesn't fit Discord's requirements. * If the command name has uppercase characters. * If the description is over 100 characters long. - """ # noqa: E501 + """ return self.with_command(slash_command_group(name, description, default_to_ephemeral=default_to_ephemeral)) def remove_command(self, command: tanjun.BaseSlashCommand, /) -> Self: @@ -1424,7 +1429,8 @@ async def execute( option = option.options[0] else: - raise RuntimeError("Missing sub-command option") + error_message = "Missing sub-command option" + raise RuntimeError(error_message) if command := self._commands.get(option.name): if command.defaults_to_ephemeral is not None: @@ -1446,11 +1452,13 @@ async def execute_autocomplete( option = option.options[0] else: - raise RuntimeError("Missing sub-command option") + error_message = "Missing sub-command option" + raise RuntimeError(error_message) command = self._commands.get(option.name) if not command: - raise RuntimeError(f"Sub-command '{option.name}' no found") + error_message = f"Sub-command '{option.name}' no found" + raise RuntimeError(error_message) await command.execute_autocomplete(ctx, option=option) @@ -1460,10 +1468,12 @@ def _assert_in_range(name: str, value: int | None, min_value: int, max_value: in return if value < min_value: - raise ValueError(f"`{name}` must be greater than or equal to {min_value}") + error_message = f"`{name}` must be greater than or equal to {min_value}" + raise ValueError(error_message) if value > max_value: - raise ValueError(f"`{name}` must be less than or equal to {max_value}") + error_message = f"`{name}` must be less than or equal to {max_value}" + raise ValueError(error_message) class SlashCommand(BaseSlashCommand, tanjun.SlashCommand[_SlashCallbackSigT]): @@ -1613,7 +1623,7 @@ def __init__( * If the command name doesn't fit Discord's requirements. * If the command name has uppercase characters. * If the description is over 100 characters long. - """ # noqa: E501 + """ super().__init__( name, description, @@ -1623,7 +1633,7 @@ def __init__( is_global=is_global, nsfw=nsfw, ) - if isinstance(callback, (tanjun.MenuCommand, tanjun.MessageCommand, tanjun.SlashCommand)): + if isinstance(callback, tanjun.MenuCommand | tanjun.MessageCommand | tanjun.SlashCommand): # Cast needed cause of a pyright bug callback = typing.cast("_SlashCallbackSigT", callback.callback) @@ -1739,20 +1749,24 @@ def _add_option( descriptions.assert_length(1, 100) if len(self._builder.options) == 25: - raise ValueError("Slash commands cannot have more than 25 options") + error_message = "Slash commands cannot have more than 25 options" + raise ValueError(error_message) if min_value is not None and max_value is not None and min_value > max_value: - raise ValueError("`min_value` cannot be greater than `max_value`") + error_message = "`min_value` cannot be greater than `max_value`" + raise ValueError(error_message) if min_length is not None and max_length is not None and min_length > max_length: - raise ValueError("`min_length` cannot be greater than `max_length`") + error_message = "`min_length` cannot be greater than `max_length`" + raise ValueError(error_message) _assert_in_range("min_length", min_length, 0, 6000) _assert_in_range("max_length", max_length, 1, 6000) key = key or names.default_value if self._arg_names is not None and key not in self._arg_names: - raise ValueError(f"{key!r} is not a valid keyword argument for {self._callback}") + error_message = f"{key!r} is not a valid keyword argument for {self._callback}" + raise ValueError(error_message) type_ = hikari.OptionType(type_) if isinstance(converters, collections.Sequence): @@ -1794,7 +1808,8 @@ def _add_option( actual_choices.append(choice) if actual_choices and len(actual_choices) > 25: - raise ValueError("Slash command options cannot have more than 25 choices") + error_message = "Slash command options cannot have more than 25 choices" + raise ValueError(error_message) required = default is tanjun.NO_DEFAULT self._builder.add_option( @@ -1888,7 +1903,7 @@ def add_attachment_option( * If the command already has 25 options. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2052,7 +2067,7 @@ def add_str_option( * If `min_length` is greater than `max_length`. * If `min_length` is less than `0` or greater than `6000`. * If `max_length` is less than `1` or greater than `6000`. - """ # noqa: E501 + """ if choices is None or isinstance(choices, collections.Mapping): actual_choices: collections.Mapping[str, str] | list[hikari.CommandChoice] | None = choices @@ -2231,7 +2246,7 @@ def add_int_option( * If `min_value` is greater than `max_value`. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ names = localisation.MaybeLocalised("name", name) descriptions = localisation.MaybeLocalised("description", description) self._add_option( @@ -2395,7 +2410,7 @@ def add_float_option( * If `min_value` is greater than `max_value`. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ names = localisation.MaybeLocalised("name", name) descriptions = localisation.MaybeLocalised("description", description) self._add_option( @@ -2476,7 +2491,7 @@ def add_bool_option( * If the command already has 25 options. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2550,7 +2565,7 @@ def add_user_option( * If the command already has 25 options. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2620,7 +2635,7 @@ def add_member_option( * If the command already has 25 options. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2697,7 +2712,7 @@ def add_channel_option( * If an invalid type is passed in `types`. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2765,7 +2780,7 @@ def add_role_option( * If the command already has 25 options. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2836,7 +2851,7 @@ def add_mentionable_option( * If the command already has 25 options. * If `name` isn't valid for this command's callback when `validate_arg_keys` is [True][]. - """ # noqa: E501 + """ return self._add_option( localisation.MaybeLocalised("name", name), localisation.MaybeLocalised("description", description), @@ -2881,10 +2896,12 @@ def set_float_autocomplete(self, name: str, callback: tanjun.AutocompleteSig[flo option = self._builder.get_option(name) if not option: - raise KeyError("Option not found") + error_message = "Option not found" + raise KeyError(error_message) if option.type is not hikari.OptionType.FLOAT: - raise TypeError("Option is not a float option") + error_message = "Option is not a float option" + raise TypeError(error_message) if callback: option.autocomplete = True @@ -2967,10 +2984,12 @@ def set_int_autocomplete(self, name: str, callback: tanjun.AutocompleteSig[int], option = self._builder.get_option(name) if not option: - raise KeyError("Option not found") + error_message = "Option not found" + raise KeyError(error_message) if option.type is not hikari.OptionType.INTEGER: - raise TypeError("Option is not a int option") + error_message = "Option is not a int option" + raise TypeError(error_message) option.autocomplete = True self._int_autocompletes[name] = callback @@ -3045,10 +3064,12 @@ def set_str_autocomplete(self, name: str, callback: tanjun.AutocompleteSig[str], option = self._builder.get_option(name) if not option: - raise KeyError("Option not found") + error_message = "Option not found" + raise KeyError(error_message) if option.type is not hikari.OptionType.STRING: - raise TypeError("Option is not a str option") + error_message = "Option is not a str option" + raise TypeError(error_message) option.autocomplete = True self._str_autocompletes[name] = callback @@ -3095,20 +3116,20 @@ async def _process_args(self, ctx: tanjun.SlashContext, /) -> collections.Mappin for tracked_option in self._tracked_options.values(): if not (option := ctx.options.get(tracked_option.name)): if tracked_option.default is tanjun.NO_DEFAULT: - raise RuntimeError( # TODO: ConversionError? + error_message = ( f"Required option {tracked_option.name} is missing data, are you sure your commands" " are up to date?" ) + raise RuntimeError(error_message) # TODO: ConversionError? - elif tracked_option.default is not tanjun.NO_PASS: + if tracked_option.default is not tanjun.NO_PASS: keyword_args[tracked_option.key] = tracked_option.default elif option.type is hikari.OptionType.USER: member: hikari.InteractionMember | None = None if tracked_option.is_only_member and not (member := option.resolve_to_member(default=None)): - raise errors.ConversionError( - f"Couldn't find member for provided user: {option.value}", tracked_option.name - ) + error_message = f"Couldn't find member for provided user: {option.value}" + raise errors.ConversionError(error_message, tracked_option.name) keyword_args[tracked_option.key] = member or option.resolve_to_user() @@ -3172,7 +3193,7 @@ async def execute( await ctx.mark_not_found() except Exception as exc: - if await own_hooks.trigger_error(ctx, exc, hooks=hooks) <= 0: # noqa: ASYNC120 + if await own_hooks.trigger_error(ctx, exc, hooks=hooks) <= 0: raise else: @@ -3194,10 +3215,12 @@ async def execute_autocomplete( callback = self._int_autocompletes.get(ctx.focused.name) else: - raise NotImplementedError(f"Autocomplete isn't implemented for '{ctx.focused.type}' option yet.") + error_message = f"Autocomplete isn't implemented for '{ctx.focused.type}' option yet." + raise NotImplementedError(error_message) if not callback: - raise RuntimeError(f"No autocomplete callback found for '{ctx.focused.name}' option") + error_message = f"No autocomplete callback found for '{ctx.focused.name}' option" + raise RuntimeError(error_message) await ctx.call_with_async_di(callback, ctx, ctx.focused.value) diff --git a/tanjun/components.py b/tanjun/components.py index 231439cd5..f5ab81f3b 100644 --- a/tanjun/components.py +++ b/tanjun/components.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -388,16 +387,18 @@ def load_from_scope( """ if scope is None: if not (stack := inspect.currentframe()) or not stack.f_back: - raise RuntimeError( + error_message = ( "Stackframe introspection is not supported in this runtime. Please explicitly pass `scope`." ) + raise RuntimeError(error_message) values_iter = _filter_scope(stack.f_back.f_locals) if include_globals: values_iter = itertools.chain(values_iter, _filter_scope(stack.f_back.f_globals)) elif include_globals: - raise ValueError("Cannot specify include_globals as True when scope is passed") + error_message = "Cannot specify include_globals as True when scope is passed" + raise ValueError(error_message) else: values_iter = _filter_scope(scope) @@ -773,10 +774,11 @@ def add_command(self, command: tanjun.ExecutableCommand[typing.Any], /) -> Self: self.add_menu_command(command) else: - raise TypeError( + error_message = ( "Unexpected object passed, expected a MenuCommand, " f"MessageCommand or BaseSlashCommand but got {type(command)}" ) + raise TypeError(error_message) return self @@ -803,9 +805,10 @@ def remove_command(self, command: tanjun.ExecutableCommand[typing.Any], /) -> Se self.remove_menu_command(command) else: - raise TypeError( + error_message = ( f"Unexpected object passed, expected a MessageCommand or BaseSlashCommand but got {type(command)}" ) + raise TypeError(error_message) return self @@ -879,7 +882,8 @@ def remove_menu_command(self, command: tanjun.MenuCommand[typing.Any, typing.Any try: del self._menu_commands[(command.type, command.name)] except KeyError: - raise ValueError(f"Command {command.name} not found") from None + error_message = f"Command {command.name} not found" + raise ValueError(error_message) from None return self @@ -913,7 +917,8 @@ def remove_slash_command(self, command: tanjun.BaseSlashCommand, /) -> Self: try: del self._slash_commands[command.name] except KeyError: - raise ValueError(f"Command {command.name} not found") from None + error_message = f"Command {command.name} not found" + raise ValueError(error_message) from None return self @@ -1117,7 +1122,8 @@ def with_on_open(self, callback: _OnCallbackSigT, /) -> _OnCallbackSigT: def bind_client(self, client: tanjun.Client, /) -> Self: # <>. if self._client: - raise RuntimeError("Client already set") + error_message = "Client already set" + raise RuntimeError(error_message) self._client = client for message_command in self._message_commands.commands: @@ -1139,7 +1145,8 @@ def bind_client(self, client: tanjun.Client, /) -> Self: def unbind_client(self, client: tanjun.Client, /) -> Self: # <>. if not self._client or self._client != client: - raise RuntimeError("Component isn't bound to this client") + error_message = "Component isn't bound to this client" + raise RuntimeError(error_message) for event, listeners in self._listeners.items(): for listener in listeners: @@ -1162,7 +1169,7 @@ def unbind_client(self, client: tanjun.Client, /) -> Self: async def _check_context(self, ctx: tanjun.Context, /) -> bool: return await _internal.gather_checks(ctx, self._checks) - async def _check_message_context( # noqa: ASYNC900 # Async generator without `@asynccontextmanager` not allowed. + async def _check_message_context( self, ctx: tanjun.MessageContext, / ) -> collections.AsyncIterator[tuple[str, tanjun.MessageCommand[typing.Any]]]: ctx.set_component(self) @@ -1370,7 +1377,8 @@ async def my_schedule(): async def close(self, *, unbind: bool = False) -> None: # <>. if not self._loop: - raise RuntimeError("Component isn't active") + error_message = "Component isn't active" + raise RuntimeError(error_message) assert self._client @@ -1383,10 +1391,12 @@ async def close(self, *, unbind: bool = False) -> None: async def open(self) -> None: # <>. if self._loop: - raise RuntimeError("Component is already active") + error_message = "Component is already active" + raise RuntimeError(error_message) if not self._client: - raise RuntimeError("Client isn't bound yet") + error_message = "Client isn't bound yet" + raise RuntimeError(error_message) self._loop = asyncio.get_running_loop() await asyncio.gather(*(self._client.injector.call_with_async_di(callback) for callback in self._on_open)) diff --git a/tanjun/context/__init__.py b/tanjun/context/__init__.py index cf241449f..e6357608b 100644 --- a/tanjun/context/__init__.py +++ b/tanjun/context/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tanjun/context/autocomplete.py b/tanjun/context/autocomplete.py index c3eaee4da..3944e7103 100644 --- a/tanjun/context/autocomplete.py +++ b/tanjun/context/autocomplete.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -40,8 +39,8 @@ import hikari from hikari import snowflakes -from .. import _internal -from .. import abc as tanjun +from tanjun import _internal +from tanjun import abc as tanjun if typing.TYPE_CHECKING: import asyncio @@ -54,7 +53,7 @@ class AutocompleteContext(alluka.BasicContext, tanjun.AutocompleteContext): """Standard implementation of an autocomplete context.""" - __slots__ = ("_tanjun_client", "_command_name", "_focused", "_future", "_has_responded", "_interaction", "_options") + __slots__ = ("_command_name", "_focused", "_future", "_has_responded", "_interaction", "_options", "_tanjun_client") def __init__( self, @@ -217,11 +216,13 @@ async def set_choices( ) -> None: # <>. if self._has_responded: - raise RuntimeError("Cannot set choices after responding") + error_message = "Cannot set choices after responding" + raise RuntimeError(error_message) choices = dict(choices, **kwargs) if len(choices) > 25: - raise ValueError("Cannot set more than 25 choices") + error_message = "Cannot set more than 25 choices" + raise ValueError(error_message) self._has_responded = True choice_objects = [ diff --git a/tanjun/context/base.py b/tanjun/context/base.py index 0d845f4e2..62785169e 100644 --- a/tanjun/context/base.py +++ b/tanjun/context/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -39,7 +38,7 @@ import hikari from hikari import snowflakes -from .. import abc as tanjun +from tanjun import abc as tanjun if typing.TYPE_CHECKING: from typing import Self @@ -48,7 +47,7 @@ class BaseContext(alluka.BasicContext, tanjun.Context): """Base class for the standard command context implementations.""" - __slots__ = ("_tanjun_client", "_component", "_final") + __slots__ = ("_component", "_final", "_tanjun_client") def __init__(self, client: tanjun.Client, /) -> None: super().__init__(client.injector) @@ -113,7 +112,8 @@ def voice(self) -> hikari.api.VoiceComponent | None: def _assert_not_final(self) -> None: if self._final: - raise TypeError("Cannot modify a finalised context") + error_message = "Cannot modify a finalised context" + raise TypeError(error_message) def finalise(self) -> Self: """Finalise the context, dis-allowing any further modifications. diff --git a/tanjun/context/menu.py b/tanjun/context/menu.py index d8051f350..b03e5be4d 100644 --- a/tanjun/context/menu.py +++ b/tanjun/context/menu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -37,8 +36,9 @@ import hikari -from .. import _internal -from .. import abc as tanjun +from tanjun import _internal +from tanjun import abc as tanjun + from . import slash if typing.TYPE_CHECKING: @@ -110,7 +110,8 @@ def target_id(self) -> hikari.Snowflake: mapping = self._interaction.resolved.users or self._interaction.resolved.messages if not mapping: - raise RuntimeError("Unknown menu type") + error_message = "Unknown menu type" + raise RuntimeError(error_message) return next(iter(mapping.keys())) @@ -125,7 +126,8 @@ def target(self) -> hikari.InteractionMember | hikari.User | hikari.Message: ) if not mapping: - raise RuntimeError("Unknown menu type") + error_message = "Unknown menu type" + raise RuntimeError(error_message) return next(iter(mapping.values())) @@ -177,9 +179,11 @@ def resolve_to_member( if default is not _internal.DEFAULT: return default - raise LookupError("User isn't in the current guild") + error_message = "User isn't in the current guild" + raise LookupError(error_message) - raise TypeError("Cannot resolve message menu context to a user") + error_message = "Cannot resolve message menu context to a user" + raise TypeError(error_message) def resolve_to_message(self) -> hikari.Message: # <>. @@ -187,7 +191,8 @@ def resolve_to_message(self) -> hikari.Message: if self._interaction.resolved.messages: return next(iter(self._interaction.resolved.messages.values())) - raise TypeError("Cannot resolve user menu context to a message") + error_message = "Cannot resolve user menu context to a message" + raise TypeError(error_message) def resolve_to_user(self) -> hikari.User | hikari.Member: # <>. diff --git a/tanjun/context/message.py b/tanjun/context/message.py index 751438919..ad838b7e8 100644 --- a/tanjun/context/message.py +++ b/tanjun/context/message.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -40,7 +39,8 @@ import hikari -from .. import abc as tanjun +from tanjun import abc as tanjun + from . import base if typing.TYPE_CHECKING: @@ -63,9 +63,9 @@ class MessageContext(base.BaseContext, tanjun.MessageContext): "_content", "_initial_response_id", "_last_response_id", + "_message", "_register_task", "_response_lock", - "_message", "_triggering_name", "_triggering_prefix", ) @@ -98,7 +98,8 @@ def __init__( The prefix that triggered this context. """ if message.content is None: - raise ValueError("Cannot spawn context with a content-less message.") + error_message = "Cannot spawn context with a content-less message." + raise ValueError(error_message) super().__init__(client) self._command: tanjun.MessageCommand[typing.Any] | None = None @@ -222,14 +223,16 @@ def set_triggering_prefix(self, triggering_prefix: str, /) -> Self: async def delete_initial_response(self) -> None: # <>. if self._initial_response_id is None: - raise LookupError("Context has no initial response") + error_message = "Context has no initial response" + raise LookupError(error_message) await self._tanjun_client.rest.delete_message(self._message.channel_id, self._initial_response_id) async def delete_last_response(self) -> None: # <>. if self._last_response_id is None: - raise LookupError("Context has no previous responses") + error_message = "Context has no previous responses" + raise LookupError(error_message) await self._tanjun_client.rest.delete_message(self._message.channel_id, self._last_response_id) @@ -251,7 +254,8 @@ async def edit_initial_response( # <>. delete_after = _delete_after_to_float(delete_after) if delete_after is not None else None if self._initial_response_id is None: - raise LookupError("Context has no initial response") + error_message = "Context has no initial response" + raise LookupError(error_message) message = await self.rest.edit_message( self._message.channel_id, @@ -290,7 +294,8 @@ async def edit_last_response( # <>. delete_after = _delete_after_to_float(delete_after) if delete_after is not None else None if self._last_response_id is None: - raise LookupError("Context has no previous tracked response") + error_message = "Context has no previous tracked response" + raise LookupError(error_message) message = await self.rest.edit_message( self._message.channel_id, @@ -317,14 +322,16 @@ async def fetch_initial_response(self) -> hikari.Message: if self._initial_response_id is not None: return await self.client.rest.fetch_message(self._message.channel_id, self._initial_response_id) - raise LookupError("No initial response found for this context") + error_message = "No initial response found for this context" + raise LookupError(error_message) async def fetch_last_response(self) -> hikari.Message: # <>. if self._last_response_id is not None: return await self.client.rest.fetch_message(self._message.channel_id, self._last_response_id) - raise LookupError("No responses found for this context") + error_message = "No responses found for this context" + raise LookupError(error_message) @staticmethod async def _delete_after(delete_after: float, message: hikari.Message, /) -> None: diff --git a/tanjun/context/slash.py b/tanjun/context/slash.py index 84549104e..7cb3d6d65 100644 --- a/tanjun/context/slash.py +++ b/tanjun/context/slash.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -41,8 +40,9 @@ import hikari -from .. import _internal -from .. import abc as tanjun +from tanjun import _internal +from tanjun import abc as tanjun + from . import base if typing.TYPE_CHECKING: @@ -82,7 +82,7 @@ class SlashOption(tanjun.SlashOption): __slots__ = ("_option", "_resolved") - def __init__(self, resolved: hikari.ResolvedOptionData | None, option: hikari.CommandInteractionOption, /): + def __init__(self, resolved: hikari.ResolvedOptionData | None, option: hikari.CommandInteractionOption, /) -> None: """Initialise a slash option. Parameters @@ -93,7 +93,8 @@ def __init__(self, resolved: hikari.ResolvedOptionData | None, option: hikari.Co The raw interaction option. """ if option.value is None: - raise ValueError("Cannot build a slash option with a value-less API representation") + error_message = "Cannot build a slash option with a value-less API representation" + raise ValueError(error_message) self._option = option self._resolved = resolved @@ -123,7 +124,8 @@ def boolean(self) -> bool: if self.type is hikari.OptionType.BOOLEAN: return bool(self._option.value) - raise TypeError("Option is not a boolean") + error_message = "Option is not a boolean" + raise TypeError(error_message) def float(self) -> float: # <>. @@ -131,7 +133,8 @@ def float(self) -> float: assert self._option.value is not None return float(self._option.value) - raise TypeError("Option is not a float") + error_message = "Option is not a float" + raise TypeError(error_message) def integer(self) -> int: # <>. @@ -139,7 +142,8 @@ def integer(self) -> int: assert self._option.value is not None return int(self._option.value) - raise TypeError("Option is not an integer") + error_message = "Option is not an integer" + raise TypeError(error_message) def snowflake(self) -> hikari.Snowflake: # <>. @@ -147,14 +151,16 @@ def snowflake(self) -> hikari.Snowflake: assert self._option.value is not None return hikari.Snowflake(self._option.value) - raise TypeError("Option is not a unique resource") + error_message = "Option is not a unique resource" + raise TypeError(error_message) def string(self) -> str: # <>. if self.type is hikari.OptionType.STRING: return str(self._option.value) - raise TypeError("Option is not a string") + error_message = "Option is not a string" + raise TypeError(error_message) def resolve_value( self, @@ -175,7 +181,8 @@ def resolve_value( if self._option.type is hikari.OptionType.MENTIONABLE: return self.resolve_to_mentionable() - raise TypeError(f"Option type {self._option.type} isn't resolvable") + error_message = f"Option type {self._option.type} isn't resolvable" + raise TypeError(error_message) def resolve_to_attachment(self) -> hikari.Attachment: # <>. @@ -184,7 +191,8 @@ def resolve_to_attachment(self) -> hikari.Attachment: assert self._resolved return self._resolved.attachments[hikari.Snowflake(self._option.value)] - raise TypeError(f"Cannot resolve non-attachment type {self._option.type} to an attachment") + error_message = f"Cannot resolve non-attachment type {self._option.type} to an attachment" + raise TypeError(error_message) def resolve_to_channel(self) -> hikari.InteractionChannel: # <>. @@ -194,7 +202,8 @@ def resolve_to_channel(self) -> hikari.InteractionChannel: assert self._resolved return self._resolved.channels[hikari.Snowflake(self._option.value)] - raise TypeError(f"Cannot resolve non-channel option type {self._option.type} to a channel") + error_message = f"Cannot resolve non-channel option type {self._option.type} to a channel" + raise TypeError(error_message) @typing.overload def resolve_to_member(self) -> hikari.InteractionMember: ... @@ -216,7 +225,8 @@ def resolve_to_member( if default is not _internal.DEFAULT: return default - raise LookupError("User isn't in the current guild") from None + error_message = "User isn't in the current guild" + raise LookupError(error_message) from None if self._option.type is hikari.OptionType.MENTIONABLE: assert self._option.value is not None @@ -229,9 +239,11 @@ def resolve_to_member( if default is not _internal.DEFAULT: return default - raise LookupError("User isn't in the current guild") + error_message = "User isn't in the current guild" + raise LookupError(error_message) - raise TypeError(f"Cannot resolve non-user option type {self._option.type} to a member") + error_message = f"Cannot resolve non-user option type {self._option.type} to a member" + raise TypeError(error_message) def resolve_to_mentionable(self) -> hikari.Role | hikari.User | hikari.Member: # <>. @@ -250,7 +262,8 @@ def resolve_to_mentionable(self) -> hikari.Role | hikari.User | hikari.Member: if self._option.type is hikari.OptionType.ROLE: return self.resolve_to_role() - raise TypeError(f"Cannot resolve non-mentionable option type {self._option.type} to a mentionable entity.") + error_message = f"Cannot resolve non-mentionable option type {self._option.type} to a mentionable entity." + raise TypeError(error_message) def resolve_to_role(self) -> hikari.Role: # <>. @@ -264,7 +277,8 @@ def resolve_to_role(self) -> hikari.Role: if role: return role - raise TypeError(f"Cannot resolve non-role option type {self._option.type} to a role") + error_message = f"Cannot resolve non-role option type {self._option.type} to a role" + raise TypeError(error_message) def resolve_to_user(self) -> hikari.User | hikari.Member: # <>. @@ -280,7 +294,8 @@ def resolve_to_user(self) -> hikari.User | hikari.Member: if result := self._resolved.members.get(user_id) or self._resolved.users.get(user_id): return result - raise TypeError(f"Cannot resolve non-user option type {self._option.type} to a user") + error_message = f"Cannot resolve non-user option type {self._option.type} to a user" + raise TypeError(error_message) class AppCommandContext(base.BaseContext, tanjun.AppCommandContext): @@ -425,7 +440,8 @@ def start_defer_timer(self, count_down: int | float, /) -> Self: """ self._assert_not_final() if self._defer_task: - raise RuntimeError("Defer timer already set") + error_message = "Defer timer already set" + raise RuntimeError(error_message) self._defer_task = asyncio.create_task(self._auto_defer(count_down)) return self @@ -453,7 +469,8 @@ async def defer( if in_defer_task: return - raise RuntimeError("Context has already been responded to") + error_message = "Context has already been responded to" + raise RuntimeError(error_message) self._has_been_deferred = True if self._response_future: @@ -466,11 +483,10 @@ async def defer( def _validate_delete_after(self, delete_after: float | int | datetime.timedelta, /) -> float: delete_after = _delete_after_to_float(delete_after) - time_left = ( - _INTERACTION_LIFETIME - (datetime.datetime.now(tz=datetime.timezone.utc) - self.created_at) - ).total_seconds() + time_left = (_INTERACTION_LIFETIME - (datetime.datetime.now(tz=datetime.UTC) - self.created_at)).total_seconds() if delete_after + 10 > time_left: - raise ValueError("This interaction will have expired before delete_after is reached") + error_message = "This interaction will have expired before delete_after is reached" + raise ValueError(error_message) return delete_after @@ -590,12 +606,14 @@ async def _create_initial_response( ) -> None: delete_after = self._validate_delete_after(delete_after) if delete_after is not None else None if self._has_responded: - raise RuntimeError("Initial response has already been created") + error_message = "Initial response has already been created" + raise RuntimeError(error_message) if self._has_been_deferred: - raise RuntimeError( + error_message = ( "edit_initial_response must be used to set the initial response after a context has been deferred" ) + raise RuntimeError(error_message) self.cancel_defer() if not self._response_future: @@ -696,7 +714,8 @@ async def delete_last_response(self) -> None: self._has_responded = True return - raise LookupError("Context has no last response") + error_message = "Context has no last response" + raise LookupError(error_message) await self._interaction.delete_message(self._last_response_id) @@ -788,7 +807,8 @@ async def edit_last_response( role_mentions=role_mentions, ) - raise LookupError("Context has no previous responses") + error_message = "Context has no previous responses" + raise LookupError(error_message) async def fetch_initial_response(self) -> hikari.Message: # <>. @@ -802,7 +822,8 @@ async def fetch_last_response(self) -> hikari.Message: if self._has_responded: return await self.fetch_initial_response() - raise LookupError("Context has no previous known responses") + error_message = "Context has no previous known responses" + raise LookupError(error_message) async def create_modal_response( self, @@ -816,7 +837,8 @@ async def create_modal_response( # <>. async with self._response_lock: if self._has_responded or self._has_been_deferred: - raise RuntimeError("Initial response has already been created") + error_message = "Initial response has already been created" + raise RuntimeError(error_message) if self._response_future: components, _ = _to_list(component, components, None, hikari.api.ComponentBuilder, "component") @@ -947,7 +969,8 @@ def _to_list( /, ) -> tuple[hikari.UndefinedOr[list[_T]], hikari.UndefinedOr[_OtherT]]: if singular is not hikari.UNDEFINED and plural is not hikari.UNDEFINED: - raise ValueError(f"Only one of {name} or {name}s may be passed") + error_message = f"Only one of {name} or {name}s may be passed" + raise ValueError(error_message) if singular is not hikari.UNDEFINED: return [singular], other diff --git a/tanjun/conversion.py b/tanjun/conversion.py index e22477624..ec18e7175 100644 --- a/tanjun/conversion.py +++ b/tanjun/conversion.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -82,7 +81,6 @@ import urllib.parse as urlparse from collections import abc as collections -import alluka import hikari import typing_extensions @@ -91,6 +89,8 @@ from .dependencies import async_cache if typing.TYPE_CHECKING: + import alluka + from . import parsing _PartialChannelT = typing.TypeVar("_PartialChannelT", bound=hikari.PartialChannel) @@ -182,7 +182,7 @@ def check_client(self, client: tanjun.Client, parent_name: str, /) -> None: parent_name The name of the converter's parent, used for warning messages. """ - enabled_components = client.cache and client.cache.settings.components or hikari.api.CacheComponents.NONE + enabled_components = (client.cache and client.cache.settings.components) or hikari.api.CacheComponents.NONE enabled_intents = client.shards.intents if client.shards else hikari.Intents.NONE missing_components = hikari.api.CacheComponents.NONE needed_intents = hikari.Intents.NONE @@ -322,9 +322,10 @@ def requires_cache(self) -> bool: def _assert_type(self, channel: _PartialChannelT, /) -> _PartialChannelT: if self._allowed_types is not None and channel.type not in self._allowed_types: - raise ValueError( + error_message = ( f"Only the following channel types are allowed for this argument: {self._allowed_types_repr}" ) + raise ValueError(error_message) return channel @@ -385,7 +386,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find channel") + error_message = "Couldn't find channel" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToChannel instead") @@ -439,7 +441,8 @@ async def __call__( return await cache.get(emoji_id) except async_cache.EntryNotFound: - raise ValueError("Couldn't find emoji") from None + error_message = "Couldn't find emoji" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -451,7 +454,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find emoji") + error_message = "Couldn't find emoji" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToEmoji") @@ -494,7 +498,8 @@ async def __call__( return await cache.get(guild_id) except async_cache.EntryNotFound: - raise ValueError("Couldn't find guild") from None + error_message = "Couldn't find guild" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -505,7 +510,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find guild") + error_message = "Couldn't find guild" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToGuild") @@ -544,7 +550,8 @@ async def __call__( return await cache.get(argument) except async_cache.EntryNotFound: - raise ValueError("Couldn't find invite") from None + error_message = "Couldn't find invite" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -554,7 +561,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find invite") + error_message = "Couldn't find invite" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToInvite") @@ -603,7 +611,8 @@ async def __call__( if invite := await cache.get(argument, default=None): return invite - raise ValueError("Couldn't find invite") + error_message = "Couldn't find invite" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToInviteWithMetadata") @@ -643,7 +652,8 @@ async def __call__( cache: alluka.Injected[_MemberCacheT | None] = None, ) -> hikari.Member: if ctx.guild_id is None: - raise ValueError("Cannot get a member from a DM channel") + error_message = "Cannot get a member from a DM channel" + raise ValueError(error_message) try: user_id = parse_user_id(argument, message="No valid user mention or ID found") @@ -665,7 +675,8 @@ async def __call__( return await cache.get_from_guild(ctx.guild_id, user_id) except async_cache.EntryNotFound: - raise ValueError("Couldn't find member in this guild") from None + error_message = "Couldn't find member in this guild" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -676,7 +687,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find member in this guild") + error_message = "Couldn't find member in this guild" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToMember") @@ -724,7 +736,8 @@ async def __call__( cache: alluka.Injected[_PresenceCacheT | None] = None, ) -> hikari.MemberPresence: if ctx.guild_id is None: - raise ValueError("Cannot get a presence from a DM channel") + error_message = "Cannot get a presence from a DM channel" + raise ValueError(error_message) user_id = parse_user_id(argument, message="No valid member mention or ID found") if ctx.cache and (presence := ctx.cache.get_presence(ctx.guild_id, user_id)): @@ -735,7 +748,8 @@ async def __call__( if presence := await cache.get_from_guild(ctx.guild_id, user_id, default=None): return presence - raise ValueError("Couldn't find presence in current guild") + error_message = "Couldn't find presence in current guild" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToPresence") @@ -777,7 +791,8 @@ async def __call__( return await cache.get(role_id) except async_cache.EntryNotFound: - raise ValueError("Couldn't find role") from None + error_message = "Couldn't find role" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -787,7 +802,8 @@ async def __call__( if role.id == role_id: return role - raise ValueError("Couldn't find role") + error_message = "Couldn't find role" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToRole") @@ -831,7 +847,8 @@ async def __call__( return await cache.get(user_id) except async_cache.EntryNotFound: - raise ValueError("Couldn't find user") from None + error_message = "Couldn't find user" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -842,7 +859,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find user") + error_message = "Couldn't find user" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToUser") @@ -891,7 +909,8 @@ async def __call__( return await cache.get(message_id) except async_cache.EntryNotFound: - raise ValueError("Couldn't find message") from None + error_message = "Couldn't find message" + raise ValueError(error_message) from None except async_cache.CacheMissError: pass @@ -902,7 +921,8 @@ async def __call__( except hikari.NotFoundError: pass - raise ValueError("Couldn't find message") + error_message = "Couldn't find message" + raise ValueError(error_message) _VoiceStateCacheT = async_cache.SfGuildBound[hikari.VoiceState] @@ -944,7 +964,8 @@ async def __call__( cache: alluka.Injected[_VoiceStateCacheT | None] = None, ) -> hikari.VoiceState: if ctx.guild_id is None: - raise ValueError("Cannot get a voice state from a DM channel") + error_message = "Cannot get a voice state from a DM channel" + raise ValueError(error_message) user_id = parse_user_id(argument, message="No valid user mention or ID found") @@ -956,7 +977,8 @@ async def __call__( if state := await cache.get_from_guild(ctx.guild_id, user_id, default=None): return state - raise ValueError("Voice state couldn't be found for current guild") + error_message = "Voice state couldn't be found for current guild" + raise ValueError(error_message) @typing_extensions.deprecated("Use ToVoiceState") @@ -1404,7 +1426,8 @@ def to_datetime(value: str, /) -> datetime.datetime: timestamp = int(next(_DATETIME_REGEX.finditer(value)).groups()[0]) except StopIteration: - raise ValueError("Not a valid datetime") from None + error_message = "Not a valid datetime" + raise ValueError(error_message) from None return datetime.datetime.fromtimestamp(timestamp, tz=datetime.UTC) @@ -1456,10 +1479,12 @@ def from_datetime(value: datetime.datetime | datetime.timedelta, /, *, style: st return from_datetime(datetime.datetime.now(tz=datetime.UTC) + value, style="R") if style not in _VALID_DATETIME_STYLES: - raise ValueError(f"Invalid style: {style}") + error_message = f"Invalid style: {style}" + raise ValueError(error_message) if value.tzinfo is None: - raise ValueError("Cannot convert naive datetimes, please specify a timezone.") + error_message = "Cannot convert naive datetimes, please specify a timezone." + raise ValueError(error_message) return f"" @@ -1502,7 +1527,8 @@ def to_bool(value: str, /) -> bool: if value in _NO_VALUES: return False - raise ValueError(f"Invalid bool value `{value}`") + error_message = f"Invalid bool value `{value}`" + raise ValueError(error_message) def to_color(argument: _SnowflakeIsh, /) -> hikari.Color: @@ -1518,7 +1544,8 @@ def to_color(argument: _SnowflakeIsh, /) -> hikari.Color: if len(values) == 1: return hikari.Color.of(values[0]) - raise ValueError("Not a valid color representation") # noqa: TC004 + error_message = "Not a valid color representation" + raise ValueError(error_message) return hikari.Color.of(argument) @@ -1535,7 +1562,7 @@ def to_color(argument: _SnowflakeIsh, /) -> hikari.Color: } -def override_type(cls: parsing.ConverterSig[typing.Any], /) -> parsing.ConverterSig[typing.Any]: # noqa: D103 +def override_type(cls: parsing.ConverterSig[typing.Any], /) -> parsing.ConverterSig[typing.Any]: return _TYPE_OVERRIDES.get(cls, cls) diff --git a/tanjun/dependencies/__init__.py b/tanjun/dependencies/__init__.py index 544d91659..4ead4c0f0 100644 --- a/tanjun/dependencies/__init__.py +++ b/tanjun/dependencies/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -126,7 +125,7 @@ from .reloaders import HotReloader if typing.TYPE_CHECKING: - from .. import abc as _tanjun + from tanjun import abc as _tanjun def set_standard_dependencies(client: _tanjun.Client, /) -> None: diff --git a/tanjun/dependencies/async_cache.py b/tanjun/dependencies/async_cache.py index 6b4507994..d70ce4d30 100644 --- a/tanjun/dependencies/async_cache.py +++ b/tanjun/dependencies/async_cache.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -78,7 +77,7 @@ import hikari -from .. import errors +from tanjun import errors if typing.TYPE_CHECKING: _DefaultT = typing.TypeVar("_DefaultT") diff --git a/tanjun/dependencies/callbacks.py b/tanjun/dependencies/callbacks.py index 26ed0c271..8ec664144 100644 --- a/tanjun/dependencies/callbacks.py +++ b/tanjun/dependencies/callbacks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -33,11 +32,16 @@ __all__: list[str] = ["fetch_my_user"] -import alluka +from typing import TYPE_CHECKING + import hikari -from .. import abc as tanjun # noqa: TC002 -from . import async_cache # noqa: TC002 +if TYPE_CHECKING: + import alluka + + from tanjun import abc as tanjun + + from . import async_cache async def fetch_my_user( @@ -76,6 +80,7 @@ async def fetch_my_user( return user if client.rest.token_type is not hikari.TokenType.BOT: - raise RuntimeError("Cannot fetch current user with a REST client that's bound to a client credentials token") + error_message = "Cannot fetch current user with a REST client that's bound to a client credentials token" + raise RuntimeError(error_message) return await client.rest.fetch_my_user() diff --git a/tanjun/dependencies/data.py b/tanjun/dependencies/data.py index 2c34bedca..1ba42b075 100644 --- a/tanjun/dependencies/data.py +++ b/tanjun/dependencies/data.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -40,7 +39,7 @@ import alluka -from .. import abc as tanjun +from tanjun import abc as tanjun if typing.TYPE_CHECKING: import contextlib @@ -102,7 +101,8 @@ def set_value(self, value: _T, /) -> Self: If the constant has already been set. """ if self._value is not None: - raise RuntimeError("Constant value already set.") + error_message = "Constant value already set." + raise RuntimeError(error_message) self._value = value self._lock = None @@ -221,7 +221,7 @@ async def resolve_app( class _CacheCallback(typing.Generic[_T]): - __slots__ = ("_callback", "_expire_after", "_last_called", "_lock", "_result", "__weakref__") + __slots__ = ("__weakref__", "_callback", "_expire_after", "_last_called", "_lock", "_result") def __init__( self, callback: alluka.abc.CallbackSig[_T], /, *, expire_after: int | float | datetime.timedelta | None @@ -238,7 +238,8 @@ def __init__( expire_after = float(expire_after) if expire_after is not None and expire_after <= 0: - raise ValueError("expire_after must be more than 0 seconds") + error_message = "expire_after must be more than 0 seconds" + raise ValueError(error_message) self._expire_after = expire_after diff --git a/tanjun/dependencies/limiters.py b/tanjun/dependencies/limiters.py index 485a57be7..7ff85c071 100644 --- a/tanjun/dependencies/limiters.py +++ b/tanjun/dependencies/limiters.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -60,16 +59,16 @@ import logging import typing -import alluka import hikari import typing_extensions -from .. import _internal -from .. import abc as tanjun -from .. import conversion -from .. import errors -from .. import hooks -from .._internal import localisation +from tanjun import _internal +from tanjun import abc as tanjun +from tanjun import conversion +from tanjun import errors +from tanjun import hooks +from tanjun._internal import localisation + from . import async_cache from . import locales from . import owners @@ -80,6 +79,8 @@ from collections import abc as collections from typing import Self + import alluka + _CommandT = typing.TypeVar("_CommandT", bound=tanjun.ExecutableCommand[typing.Any]) _InnerResourceSig = collections.Callable[[], "_InnerResourceT"] @@ -231,7 +232,8 @@ def __init__( async def __aenter__(self) -> None: if self._acquired: - raise RuntimeError("Already acquired") + error_message = "Already acquired" + raise RuntimeError(error_message) self._acquired = True try: @@ -245,7 +247,8 @@ async def __aexit__( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_traceback: types.TracebackType | None ) -> None: if not self._acquired: - raise RuntimeError("Not acquired") + error_message = "Not acquired" + raise RuntimeError(error_message) try: await self._manager.release(self._bucket_id, self._ctx) @@ -353,7 +356,8 @@ def __init__( async def __aenter__(self) -> None: if self._acquired: - raise RuntimeError("Already acquired") + error_message = "Already acquired" + raise RuntimeError(error_message) self._acquired = True try: @@ -361,13 +365,14 @@ async def __aenter__(self) -> None: except ResourceDepleted: self._acquired = False - raise self._error() from None # noqa: R102 + raise self._error() from None async def __aexit__( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_traceback: types.TracebackType | None ) -> None: if not self._acquired: - raise RuntimeError("Not acquired") + error_message = "Not acquired" + raise RuntimeError(error_message) self._acquired = False await asyncio.shield(self._limiter.release(self._bucket_id, self._ctx)) @@ -481,11 +486,12 @@ async def _get_ctx_target(ctx: tanjun.Context, type_: BucketResource, /) -> hika if type_ is BucketResource.GUILD: return ctx.guild_id or ctx.channel_id - raise ValueError(f"Unexpected type {type_!s}") + error_message = f"Unexpected type {type_!s}" + raise ValueError(error_message) def _now() -> datetime.datetime: - return datetime.datetime.now(tz=datetime.timezone.utc) + return datetime.datetime.now(tz=datetime.UTC) class _Cooldown: @@ -801,11 +807,12 @@ async def try_acquire(self, bucket_id: str, ctx: tanjun.Context) -> None: # internally de-duplicate this. key = (bucket_id, ctx) if key in self._acquiring_ctxs: - return + return None resource = await bucket.into_inner(ctx) # increment will raise if it the bucket is exhausted self._acquiring_ctxs[key] = resource.check().increment(ctx) + return None @typing_extensions.deprecated("Use .acquire or .try_acquire and .release to manage cooldowns") async def check_cooldown( @@ -822,10 +829,8 @@ async def check_cooldown( await self.release(bucket_id, ctx) else: - resource = ( - self._acquiring_ctxs.get((bucket_id, ctx)) - or (bucket := self._buckets.get(bucket_id)) - and (resource := await bucket.into_inner(ctx)) + resource = self._acquiring_ctxs.get((bucket_id, ctx)) or ( + (bucket := self._buckets.get(bucket_id)) and (resource := await bucket.into_inner(ctx)) ) if not resource: return None # MyPy compat @@ -844,7 +849,7 @@ async def release(self, bucket_id: str, ctx: tanjun.Context, /) -> None: if resource := self._acquiring_ctxs.pop((bucket_id, ctx), None): resource.unlock(ctx) - return + return None raise ResourceNotTracked @@ -857,7 +862,8 @@ def close(self) -> None: If the cooldown manager is not running. """ if not self._gc_task: - raise RuntimeError("Cooldown manager is not active") + error_message = "Cooldown manager is not active" + raise RuntimeError(error_message) self._gc_task.cancel() self._gc_task = None @@ -872,7 +878,8 @@ def open(self, *, _loop: asyncio.AbstractEventLoop | None = None) -> None: If called in a thread with no running event loop. """ if self._gc_task: - raise RuntimeError("Cooldown manager is already running") + error_message = "Cooldown manager is already running" + raise RuntimeError(error_message) self._gc_task = (_loop or asyncio.get_running_loop()).create_task(self._gc()) @@ -942,10 +949,12 @@ def set_bucket( reset_after = datetime.timedelta(seconds=reset_after) if reset_after <= datetime.timedelta(): - raise ValueError("reset_after must be greater than 0 seconds") + error_message = "reset_after must be greater than 0 seconds" + raise ValueError(error_message) if limit <= 0: - raise ValueError("limit must be greater than 0") + error_message = "limit must be greater than 0" + raise ValueError(error_message) self._buckets[bucket_id] = _to_bucket( BucketResource(resource), _MakeCooldown(limit=limit, reset_after=reset_after) @@ -1012,7 +1021,7 @@ class CooldownPreExecution: instead and incrementing the bucket's use counter. """ - __slots__ = ("_bucket_id", "_error", "_error_message", "_owners_exempt", "_unknown_message", "__weakref__") + __slots__ = ("__weakref__", "_bucket_id", "_error", "_error_message", "_owners_exempt", "_unknown_message") def __init__( self, @@ -1144,7 +1153,7 @@ def localise( class CooldownPostExecution: """Post-execution hook used to manager a command's cooldown.""" - __slots__ = ("_bucket_id", "__weakref__") + __slots__ = ("__weakref__", "_bucket_id") def __init__(self, bucket_id: str, /) -> None: self._bucket_id = bucket_id @@ -1301,10 +1310,7 @@ def acquire(self) -> bool: return True # A limit of -1 means unlimited so we don't need to keep count. - if self.limit == -1: - return True - - return False + return self.limit == -1 def release(self, _: str, __: tanjun.Context, /) -> None: if self.counter > 0: @@ -1315,7 +1321,8 @@ def release(self, _: str, __: tanjun.Context, /) -> None: if self.limit == -1: return - raise RuntimeError("Cannot release a limit that has not been acquired, this should never happen") + error_message = "Cannot release a limit that has not been acquired, this should never happen" + raise RuntimeError(error_message) def has_expired(self) -> bool: # Expiration doesn't actually matter for cases where the limit is -1. @@ -1433,7 +1440,8 @@ def close(self) -> None: If the concurrency manager is not running. """ if not self._gc_task: - raise RuntimeError("Concurrency manager is not active") + error_message = "Concurrency manager is not active" + raise RuntimeError(error_message) self._gc_task.cancel() self._gc_task = None @@ -1448,7 +1456,8 @@ def open(self, *, _loop: asyncio.AbstractEventLoop | None = None) -> None: If called in a thread with no running event loop. """ if self._gc_task: - raise RuntimeError("Concurrency manager is already running") + error_message = "Concurrency manager is already running" + raise RuntimeError(error_message) self._gc_task = (_loop or asyncio.get_running_loop()).create_task(self._gc()) @@ -1468,14 +1477,14 @@ async def try_acquire(self, bucket_id: str, ctx: tanjun.Context, /) -> None: # internally de-duplicate this. key = (bucket_id, ctx) if key in self._acquiring_ctxs: - return + return None limit = await bucket.into_inner(ctx) if limit.acquire(): self._acquiring_ctxs[key] = limit + return None - else: - raise ResourceDepleted + raise ResourceDepleted async def release(self, bucket_id: str, ctx: tanjun.Context, /) -> None: # <>. @@ -1484,9 +1493,10 @@ async def release(self, bucket_id: str, ctx: tanjun.Context, /) -> None: if limit := self._acquiring_ctxs.pop((bucket_id, ctx), None): limit.release(bucket_id, ctx) + return None - else: - raise ResourceNotTracked("Context is not acquired") + error_message = "Context is not acquired" + raise ResourceNotTracked(error_message) def disable_bucket(self, bucket_id: str, /) -> Self: """Disable a concurrency limit bucket. @@ -1545,7 +1555,8 @@ def set_bucket(self, bucket_id: str, resource: BucketResource, limit: int, /) -> * If limit is less 0 or negative. """ if limit <= 0: - raise ValueError("limit must be greater than 0") + error_message = "limit must be greater than 0" + raise ValueError(error_message) self._buckets[bucket_id] = _to_bucket(BucketResource(resource), lambda: _ConcurrencyLimit(limit)) self._custom_buckets.pop(bucket_id, None) @@ -1606,7 +1617,7 @@ async def release( class ConcurrencyPreExecution: """Pre-execution hook used to acquire a bucket concurrency limiter.""" - __slots__ = ("_bucket_id", "_error", "_error_message", "__weakref__") + __slots__ = ("__weakref__", "_bucket_id", "_error", "_error_message") def __init__( self, @@ -1661,7 +1672,7 @@ async def __call__( class ConcurrencyPostExecution: """Post-execution hook used to release a bucket concurrency limiter.""" - __slots__ = ("_bucket_id", "__weakref__") + __slots__ = ("__weakref__", "_bucket_id") def __init__(self, bucket_id: str, /) -> None: """Initialise a concurrency post-execution hook. diff --git a/tanjun/dependencies/locales.py b/tanjun/dependencies/locales.py index cb1e907f5..b628b6db5 100644 --- a/tanjun/dependencies/locales.py +++ b/tanjun/dependencies/locales.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -39,13 +38,13 @@ import hikari -from .._internal import localisation +from tanjun._internal import localisation if typing.TYPE_CHECKING: from collections import abc as collections from typing import Self - from .. import abc as tanjun + from tanjun import abc as tanjun _CHECK_NAME_PATTERN = re.compile(r"^(?P[^:]+):(?P[^:]+):check:(?P.+)$") diff --git a/tanjun/dependencies/owners.py b/tanjun/dependencies/owners.py index 32b9e7f55..fab2c44b5 100644 --- a/tanjun/dependencies/owners.py +++ b/tanjun/dependencies/owners.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -47,7 +46,7 @@ if typing.TYPE_CHECKING: from collections import abc as collections - from .. import abc as tanjun + from tanjun import abc as tanjun _T = typing.TypeVar("_T") @@ -155,7 +154,8 @@ def __init__( expire_after = float(expire_after) if expire_after <= 0: - raise ValueError("Expire after must be greater than 0 seconds") + error_message = "Expire after must be greater than 0 seconds" + raise ValueError(error_message) self._fallback_to_application = fallback_to_application self._owner_ids = {hikari.Snowflake(id_) for id_ in owners} if owners else set[hikari.Snowflake]() diff --git a/tanjun/dependencies/reloaders.py b/tanjun/dependencies/reloaders.py index 147379e55..9577aba00 100644 --- a/tanjun/dependencies/reloaders.py +++ b/tanjun/dependencies/reloaders.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -42,17 +41,18 @@ import pathlib import typing -import alluka import hikari -from .. import _internal -from .. import abc as tanjun -from .. import errors +from tanjun import _internal +from tanjun import abc as tanjun +from tanjun import errors if typing.TYPE_CHECKING: from collections import abc as collections from typing import Self + import alluka + _BuilderDict = dict[tuple[hikari.CommandType, str], hikari.api.CommandBuilder] _DirectoryEntry = tuple[str, set[str]] | tuple[None, set[pathlib.Path]] @@ -63,7 +63,7 @@ class _PyPathInfo: - __slots__ = ("sys_path", "last_modified_at") + __slots__ = ("last_modified_at", "sys_path") def __init__(self, sys_path: pathlib.Path, /, *, last_modified_at: int = -1) -> None: self.sys_path = sys_path @@ -96,8 +96,8 @@ class HotReloader: "_declared_builders", "_directories", "_interval", - "_py_paths", "_py_path_to_sys_path", + "_py_paths", "_redeclare_cmds_after", "_scheduled_builders", "_sys_paths", @@ -299,7 +299,7 @@ async def _load_module(self, client: tanjun.Client, path: str | pathlib.Path, /) return False except errors.ModuleMissingLoaders: - _LOGGER.error("Cannot load module `%s` with no loaders", path) # noqa: TC400 + _LOGGER.exception("Cannot load module `%s` with no loaders", path) return False except errors.FailedModuleUnload as exc: @@ -423,7 +423,7 @@ async def _declare_commands(self, client: tanjun.Client, builders: _BuilderDict, assert self._redeclare_cmds_after is not None await asyncio.sleep(self._redeclare_cmds_after) - while True: # noqa: ASYNC913 + while True: if not _internal.cmp_all_commands(builders.values(), self._scheduled_builders): builders = self._scheduled_builders try: @@ -475,7 +475,8 @@ def stop(self) -> None: If the hot reloader isn't running. """ if not self._task: - raise RuntimeError("Hot reloader is not running") + error_message = "Hot reloader is not running" + raise RuntimeError(error_message) self._task.cancel() self._task = None @@ -489,7 +490,8 @@ def start(self, client: alluka.Injected[tanjun.Client]) -> None: If the hot reloader is already running. """ if self._task: - raise RuntimeError("Hot reloader has already been started") + error_message = "Hot reloader has already been started" + raise RuntimeError(error_message) self._task = asyncio.create_task(self._loop(client)) @@ -501,7 +503,8 @@ def _to_namespace(namespace: str, path: pathlib.Path, /) -> str: def _add_directory(directory: str | pathlib.Path, namespace: str | None, /) -> tuple[pathlib.Path, _DirectoryEntry]: directory = pathlib.Path(directory) if not directory.exists(): - raise FileNotFoundError(f"{directory} does not exist") + error_message = f"{directory} does not exist" + raise FileNotFoundError(error_message) return directory.resolve(), (namespace, set()) if namespace is None else (namespace, set()) @@ -520,11 +523,13 @@ def _add_modules(paths: tuple[str | pathlib.Path, ...], /) -> tuple[dict[str, _P else: module = importlib.import_module(raw_path) if not module.__file__: - raise RuntimeError(f"{raw_path} has no file") + error_message = f"{raw_path} has no file" + raise RuntimeError(error_message) path = pathlib.Path(module.__file__).resolve() if not path.exists(): - raise FileNotFoundError(f"{path} not found for module {raw_path}") + error_message = f"{path} not found for module {raw_path}" + raise FileNotFoundError(error_message) py_paths[raw_path] = _PyPathInfo(path) diff --git a/tanjun/errors.py b/tanjun/errors.py index d768bbc32..a423dc0f8 100644 --- a/tanjun/errors.py +++ b/tanjun/errors.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -198,19 +197,24 @@ def __init__( * If more than 100 entries are passed for `user_mentions`. """ if attachment and attachments: - raise ValueError("Cannot specify both attachment and attachments") + error_message = "Cannot specify both attachment and attachments" + raise ValueError(error_message) if component and components: - raise ValueError("Cannot specify both component and components") + error_message = "Cannot specify both component and components" + raise ValueError(error_message) if embed and embeds: - raise ValueError("Cannot specify both embed and embeds") + error_message = "Cannot specify both embed and embeds" + raise ValueError(error_message) if isinstance(role_mentions, collections.Sequence) and len(role_mentions) > 100: - raise ValueError("Cannot specify more than 100 role mentions") + error_message = "Cannot specify more than 100 role mentions" + raise ValueError(error_message) if isinstance(user_mentions, collections.Sequence) and len(user_mentions) > 100: - raise ValueError("Cannot specify more than 100 user mentions") + error_message = "Cannot specify more than 100 user mentions" + raise ValueError(error_message) self.attachments = [attachment] if attachment else attachments self.content = content diff --git a/tanjun/hooks.py b/tanjun/hooks.py index aa0d7ec12..500add2e9 100644 --- a/tanjun/hooks.py +++ b/tanjun/hooks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -84,8 +83,8 @@ class Hooks(tanjun.Hooks[_ContextT_contra]): __slots__ = ( "_error_callbacks", "_parser_error_callbacks", - "_pre_execution_callbacks", "_post_execution_callbacks", + "_pre_execution_callbacks", "_success_callbacks", ) diff --git a/tanjun/injecting.py b/tanjun/injecting.py index c4bfb018c..75b06de0f 100644 --- a/tanjun/injecting.py +++ b/tanjun/injecting.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -49,7 +48,6 @@ "injected", ] -import collections.abc as collections import typing import alluka @@ -63,6 +61,8 @@ from alluka.abc import Context as AbstractInjectionContext if typing.TYPE_CHECKING: + import collections.abc as collections + from . import abc as tanjun _T = typing.TypeVar("_T") diff --git a/tanjun/parsing.py b/tanjun/parsing.py index c09841070..a98fc51ec 100644 --- a/tanjun/parsing.py +++ b/tanjun/parsing.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -534,7 +533,8 @@ async def _covert_option_or_empty( if option.empty_value is not tanjun.NO_DEFAULT: return option.empty_value - raise errors.NotEnoughArgumentsError(f"Option '{option.key} cannot be empty.", option.key) + error_message = f"Option '{option.key} cannot be empty." + raise errors.NotEnoughArgumentsError(error_message, option.key) class _SemanticShlex(_ShlexTokenizer): @@ -567,15 +567,15 @@ async def parse(self) -> dict[str, typing.Any]: elif not option.is_multi and (value := next(values_iter, ...)) is not ...: if next(values_iter, ...) is not ...: - raise errors.TooManyArgumentsError( - f"Option `{option.key}` can only take a single value", option.key - ) + error_message = f"Option `{option.key}` can only take a single value" + raise errors.TooManyArgumentsError(error_message, option.key) kwargs[option.key] = await _covert_option_or_empty(self.__ctx, option, value) elif option.default is tanjun.NO_DEFAULT: # If this is reached then no value was found. - raise errors.NotEnoughArgumentsError(f"Missing required option `{option.key}`", option.key) + error_message = f"Missing required option `{option.key}`" + raise errors.NotEnoughArgumentsError(error_message, option.key) elif option.default is not tanjun.NO_PASS: kwargs[option.key] = option.default @@ -593,9 +593,8 @@ async def parse(self) -> dict[str, typing.Any]: elif argument.default is tanjun.NO_DEFAULT: # If this is reached then no value was found. - raise errors.NotEnoughArgumentsError( - f"Missing value for required argument '{argument.key}'", argument.key - ) + error_message = f"Missing value for required argument '{argument.key}'" + raise errors.NotEnoughArgumentsError(error_message, argument.key) elif argument.default is not tanjun.NO_PASS: kwargs[argument.key] = argument.default @@ -615,7 +614,8 @@ def _get_or_set_parser(command: tanjun.MessageCommand[typing.Any], /) -> Abstrac if isinstance(command.parser, AbstractOptionParser): return command.parser - raise TypeError("Expected parser to be an instance of tanjun.parsing.AbstractOptionParser") + error_message = "Expected parser to be an instance of tanjun.parsing.AbstractOptionParser" + raise TypeError(error_message) @typing.overload @@ -1513,10 +1513,10 @@ class Parameter: "_default", "_is_multi", "_key", - "_min_length", "_max_length", - "_min_value", "_max_value", + "_min_length", + "_min_value", ) def __init__( @@ -1545,7 +1545,8 @@ def __init__( self._max_value = max_value if key.startswith("-"): - raise ValueError("parameter key cannot start with `-`") + error_message = "parameter key cannot start with `-`" + raise ValueError(error_message) if isinstance(converters, collections.Iterable): for converter in converters: @@ -1646,22 +1647,24 @@ def bind_component(self, component: tanjun.Component, /) -> None: def _validate(self, value: typing.Any, /) -> None: # asserts value >= self._min_value if self._min_value is not None and self._min_value > value: - raise errors.ConversionError( - f"{self._key!r} must be greater than or equal to {self._min_value!r}", self._key - ) + error_message = f"{self._key!r} must be greater than or equal to {self._min_value!r}" + raise errors.ConversionError(error_message, self._key) # asserts value <= self._max_value if self._max_value is not None and self._max_value < value: - raise errors.ConversionError(f"{self._key!r} must be less than or equal to {self._max_value!r}", self._key) + error_message = f"{self._key!r} must be less than or equal to {self._max_value!r}" + raise errors.ConversionError(error_message, self._key) length: int | None = None # asserts that len(value) >= self._min_length if self._min_length is not None and self._min_length > (length := len(value)): - raise errors.ConversionError(f"{self._key!r} must be longer than {self._min_length - 1}", self._key) + error_message = f"{self._key!r} must be longer than {self._min_length - 1}" + raise errors.ConversionError(error_message, self._key) # asserts that len(value) <= self._max_length if self._max_length is not None and self._max_length < (len(value) if length is None else length): - raise errors.ConversionError(f"{self._key!r} can't be longer than {self._max_length}", self._key) + error_message = f"{self._key!r} can't be longer than {self._max_length}" + raise errors.ConversionError(error_message, self._key) async def convert(self, ctx: tanjun.Context, value: str, /) -> typing.Any: """Convert the given value to the type of this parameter.""" @@ -1682,7 +1685,8 @@ async def convert(self, ctx: tanjun.Context, value: str, /) -> typing.Any: return result parameter_type = "option" if isinstance(self, Option) else "argument" - raise errors.ConversionError(f"Couldn't convert {parameter_type} '{self._key}'", self._key, errors=sources) + error_message = f"Couldn't convert {parameter_type} '{self._key}'" + raise errors.ConversionError(error_message, self._key, errors=sources) def copy(self) -> Self: """Copy the parameter. @@ -1764,7 +1768,8 @@ def __init__( Whether this argument can be passed multiple times. """ if greedy and multi: - raise ValueError("Argument cannot be both greed and multi.") + error_message = "Argument cannot be both greed and multi." + raise ValueError(error_message) self._is_greedy = greedy super().__init__( @@ -1865,7 +1870,8 @@ def __init__( If this option can be provided multiple times. """ if not name.startswith("-") or not all(n.startswith("-") for n in names): - raise ValueError("All option names must start with `-`") + error_message = "All option names must start with `-`" + raise ValueError(error_message) self._empty_value = empty_value self._names: list[str] = [name, *names] @@ -1931,7 +1937,8 @@ def copy(self) -> Self: def _assert_key(self, key: str, /) -> None: for callback_name, names in self._callback_arg_names: if key not in names: - raise ValueError(f"{key!r} is not a valid keyword argument for {callback_name}") + error_message = f"{key!r} is not a valid keyword argument for {callback_name}" + raise ValueError(error_message) @typing.overload def add_argument( @@ -2040,7 +2047,8 @@ def add_argument( for argument_ in self._arguments: if argument_.is_multi or argument_.is_greedy: - raise ValueError("Multi or greedy argument must be the last argument") + error_message = "Multi or greedy argument must be the last argument" + raise ValueError(error_message) self._arguments.append(argument) return self @@ -2191,7 +2199,8 @@ def validate_arg_keys(self, callback_name: str, names: collections.Container[str for parameter in itertools.chain(self._options, self._arguments): if parameter.key not in names: - raise ValueError(f"{parameter.key!r} is not a valid keyword argument for {callback_name}") + error_message = f"{parameter.key!r} is not a valid keyword argument for {callback_name}" + raise ValueError(error_message) def with_parser(command: _CommandT, /) -> _CommandT: @@ -2223,6 +2232,7 @@ async def hi(ctx: tanjun.MessageContext, arg: int) -> None: If the command already has a parser set. """ if command.parser: - raise ValueError("Command already has a parser set") + error_message = "Command already has a parser set" + raise ValueError(error_message) return command.set_parser(ShlexParser()) diff --git a/tanjun/permissions.py b/tanjun/permissions.py index 952fd5f7f..d2b6b7e2c 100644 --- a/tanjun/permissions.py +++ b/tanjun/permissions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -139,7 +138,8 @@ def calculate_permissions( guild channel. """ if member.guild_id != guild.id: - raise ValueError("Member object isn't from the provided guild") + error_message = "Member object isn't from the provided guild" + raise ValueError(error_message) # Guild owners are implicitly admins. if guild.owner_id == member.user.id: @@ -228,7 +228,7 @@ async def fetch_permissions( if guild.owner_id == member.user.id: return ALL_PERMISSIONS - roles = roles or client.cache and client.cache.get_roles_view_for_guild(member.guild_id) + roles = roles or (client.cache and client.cache.get_roles_view_for_guild(member.guild_id)) if not roles: # noqa: SIM102 # Has to be nested cause of pyright bug. if role_cache := client.get_type_dependency(_GuldRoleCacheT, default=None): @@ -247,7 +247,8 @@ async def fetch_permissions( channel = await _fetch_channel(client, channel) if channel.guild_id != guild.id: - raise ValueError("Channel doesn't match up with the member's guild") + error_message = "Channel doesn't match up with the member's guild" + raise ValueError(error_message) return _calculate_channel_overwrites(channel, member, permissions) @@ -340,7 +341,8 @@ async def fetch_everyone_permissions( break else: - raise RuntimeError("Failed to find guild's @everyone role") + error_message = "Failed to find guild's @everyone role" + raise RuntimeError(error_message) permissions = role.permissions # Admin permission overrides all overwrites and is only applicable to roles. diff --git a/tanjun/schedules.py b/tanjun/schedules.py index d287181fb..4afe048c6 100644 --- a/tanjun/schedules.py +++ b/tanjun/schedules.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -160,7 +159,6 @@ def as_interval( Examples -------- - ```py @component.with_schedule @tanjun.as_interval(datetime.timedelta(minutes=5)) # This will run every 5 minutes @@ -217,8 +215,8 @@ class IntervalSchedule(typing.Generic[_CallbackSigT], components.AbstractCompone "_interval", "_iteration_count", "_max_runs", - "_stop_callback", "_start_callback", + "_stop_callback", "_task", "_tasks", ) @@ -300,7 +298,8 @@ async def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> None: def copy(self) -> Self: # <>. if self._task: - raise RuntimeError("Cannot copy an active schedule") + error_message = "Cannot copy an active schedule" + raise RuntimeError(error_message) inst = copy.copy(self) inst._tasks = [] @@ -405,12 +404,14 @@ async def _on_stop(self, client: alluka.Client, /) -> None: def start(self, client: alluka.Client, /, *, loop: asyncio.AbstractEventLoop | None = None) -> None: # <>. if self._task: - raise RuntimeError("Cannot start an active schedule") + error_message = "Cannot start an active schedule" + raise RuntimeError(error_message) loop = loop or asyncio.get_running_loop() if not loop.is_running(): - raise RuntimeError("Event loop is not running") + error_message = "Event loop is not running" + raise RuntimeError(error_message) self._client = client self._task = loop.create_task(self._loop(client)) @@ -418,7 +419,8 @@ def start(self, client: alluka.Client, /, *, loop: asyncio.AbstractEventLoop | N def force_stop(self) -> None: # <>. if not self._task: - raise RuntimeError("Schedule is not running") + error_message = "Schedule is not running" + raise RuntimeError(error_message) assert self._client client = self._client @@ -434,7 +436,8 @@ def force_stop(self) -> None: async def stop(self) -> None: # <>. if not self._task: - raise RuntimeError("Schedule is not running") + error_message = "Schedule is not running" + raise RuntimeError(error_message) assert self._client client = self._client @@ -573,12 +576,14 @@ def _to_sequence( if isinstance(values, int): if values >= max_ or values < min_: - raise ValueError(f"{name} value must be (inclusively) between {min_} and {max_ - 1}, not {values}") + error_message = f"{name} value must be (inclusively) between {min_} and {max_ - 1}, not {values}" + raise ValueError(error_message) return [values] if isinstance(values, float): - raise TypeError(f"{name} value must be an integer, not a float") + error_message = f"{name} value must be an integer, not a float" + raise TypeError(error_message) if isinstance(values, range): if values.step < 0: @@ -592,14 +597,16 @@ def _to_sequence( else: values = sorted(values) if any(isinstance(value, float) for value in values): - raise TypeError(f"Cannot pass floats for {name}") + error_message = f"Cannot pass floats for {name}" + raise TypeError(error_message) first_entry = values[0] last_entry = values[-1] if last_entry >= max_ or first_entry < min_: - raise ValueError( + error_message = ( f"{name} must be (inclusively) between {min_} and {max_ - 1}, not {first_entry} and {last_entry}" ) + raise ValueError(error_message) return values @@ -812,7 +819,6 @@ def as_time_schedule( Examples -------- - ```py @component.with_schedule @tanjun.as_time_schedule( # This will run every week day at 8:00 and 16:00 UTC. @@ -1047,7 +1053,8 @@ async def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> None: def copy(self) -> Self: # <>. if self._task: - raise RuntimeError("Cannot copy an active schedule") + error_message = "Cannot copy an active schedule" + raise RuntimeError(error_message) inst = copy.copy(self) self._config = copy.copy(self._config) @@ -1099,19 +1106,22 @@ def load_into_component(self, component: tanjun.Component, /) -> None: def start(self, client: alluka.Client, /, *, loop: asyncio.AbstractEventLoop | None = None) -> None: # <>. if self._task: - raise RuntimeError("Schedule is already running") + error_message = "Schedule is already running" + raise RuntimeError(error_message) loop = loop or asyncio.get_running_loop() if not loop.is_running(): - raise RuntimeError("Event loop is not running") + error_message = "Event loop is not running" + raise RuntimeError(error_message) self._task = loop.create_task(self._loop(client)) def force_stop(self) -> None: # <>. if not self._task: - raise RuntimeError("Schedule is not running") + error_message = "Schedule is not running" + raise RuntimeError(error_message) self._task.cancel() self._task = None @@ -1121,7 +1131,8 @@ def force_stop(self) -> None: async def stop(self) -> None: # <>. if not self._task: - raise RuntimeError("Schedule is not running") + error_message = "Schedule is not running" + raise RuntimeError(error_message) self._task.cancel() self._task = None diff --git a/tanjun/utilities.py b/tanjun/utilities.py index 604b866d7..2ee90cfda 100644 --- a/tanjun/utilities.py +++ b/tanjun/utilities.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tests/__init__.py b/tests/__init__.py index 279f959a8..0b621117b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tests/commands/__init__.py b/tests/commands/__init__.py index 279f959a8..0b621117b 100644 --- a/tests/commands/__init__.py +++ b/tests/commands/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tests/commands/test_base.py b/tests/commands/test_base.py index df4790a60..9ee55f804 100644 --- a/tests/commands/test_base.py +++ b/tests/commands/test_base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -75,10 +74,10 @@ def command(self) -> base_command.PartialCommand[typing.Any]: "PartialCommand", (base_command.PartialCommand[typing.Any],), exec_body=lambda body: body.update(fields) )() - def test_metadata_property(self, command: base_command.PartialCommand[typing.Any]): + def test_metadata_property(self, command: base_command.PartialCommand[typing.Any]) -> None: assert command.metadata is command._metadata - def test_copy(self, command: base_command.PartialCommand[typing.Any]): + def test_copy(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check = mock.MagicMock() command._checks = [mock_check] command._hooks = mock.Mock() @@ -93,13 +92,13 @@ def test_copy(self, command: base_command.PartialCommand[typing.Any]): assert new_command._hooks is command._hooks.copy.return_value assert new_command._metadata is mock_metadata.copy.return_value - def test_set_hooks(self, command: base_command.PartialCommand[typing.Any]): + def test_set_hooks(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_hooks = mock.Mock() assert command.set_hooks(mock_hooks) is command assert command.hooks is mock_hooks - def test_set_metadata(self, command: base_command.PartialCommand[typing.Any]): + def test_set_metadata(self, command: base_command.PartialCommand[typing.Any]) -> None: key = mock.Mock() value = mock.Mock() @@ -108,21 +107,21 @@ def test_set_metadata(self, command: base_command.PartialCommand[typing.Any]): assert result is command assert command.metadata[key] is value - def test_add_check(self, command: base_command.PartialCommand[typing.Any]): + def test_add_check(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check = mock.Mock() assert command.add_check(mock_check) is command assert command.checks == [mock_check] - def test_add_check_when_already_present(self, command: base_command.PartialCommand[typing.Any]): + def test_add_check_when_already_present(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check = mock.Mock() assert command.add_check(mock_check).add_check(mock_check) is command assert list(command.checks).count(mock_check) == 1 - def test_add_check_with_multiple_checks(self, command: base_command.PartialCommand[typing.Any]): + def test_add_check_with_multiple_checks(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -131,7 +130,7 @@ def test_add_check_with_multiple_checks(self, command: base_command.PartialComma assert command.checks == [mock_check_2, mock_check_3, mock_check_1] - def test_remove_check(self, command: base_command.PartialCommand[typing.Any]): + def test_remove_check(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check = mock.Mock() command.add_check(mock_check) @@ -140,7 +139,7 @@ def test_remove_check(self, command: base_command.PartialCommand[typing.Any]): assert result is command assert command.checks == [] - def test_with_check(self, command: base_command.PartialCommand[typing.Any]): + def test_with_check(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check = mock.Mock() add_check = mock.Mock() command = stub_class(base_command.PartialCommand, add_check=add_check) @@ -148,7 +147,7 @@ def test_with_check(self, command: base_command.PartialCommand[typing.Any]): assert command.with_check(mock_check) is mock_check add_check.assert_called_once_with(mock_check) - def test_with_check_when_already_present(self, command: base_command.PartialCommand[typing.Any]): + def test_with_check_when_already_present(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_check = mock.Mock() command.add_check(mock_check).with_check(mock_check) @@ -156,10 +155,10 @@ def test_with_check_when_already_present(self, command: base_command.PartialComm assert list(command.checks).count(mock_check) == 1 - def test_bind_client(self, command: base_command.PartialCommand[typing.Any]): + def test_bind_client(self, command: base_command.PartialCommand[typing.Any]) -> None: command.bind_client(mock.Mock()) - def test_bind_component(self, command: base_command.PartialCommand[typing.Any]): + def test_bind_component(self, command: base_command.PartialCommand[typing.Any]) -> None: mock_component = mock.Mock() command.bind_component(mock_component) diff --git a/tests/commands/test_menu.py b/tests/commands/test_menu.py index 2b8949ec1..c80f04d50 100644 --- a/tests/commands/test_menu.py +++ b/tests/commands/test_menu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -44,7 +43,7 @@ from tanjun import _internal -def test_as_message_menu(): +def test_as_message_menu() -> None: mock_callback = mock.Mock() command = tanjun.as_message_menu( @@ -70,7 +69,7 @@ def test_as_message_menu(): assert command.wrapped_command is None -def test_as_message_menu_with_defaults(): +def test_as_message_menu_with_defaults() -> None: mock_callback = mock.Mock() command = tanjun.as_message_menu("yeet")(mock_callback) @@ -101,7 +100,7 @@ def test_as_message_menu_when_wrapping_command( other_command: ( tanjun.SlashCommand[typing.Any] | tanjun.MessageCommand[typing.Any] | tanjun.MenuCommand[typing.Any, typing.Any] ) -): +) -> None: command = tanjun.as_message_menu( "c", always_defer=False, @@ -124,7 +123,7 @@ def test_as_message_menu_when_wrapping_command( assert isinstance(command, tanjun.MenuCommand) -def test_as_user_menu(): +def test_as_user_menu() -> None: mock_callback = mock.Mock() command = tanjun.as_user_menu( @@ -151,7 +150,7 @@ def test_as_user_menu(): assert command.wrapped_command is None -def test_as_user_menu_with_defaults(): +def test_as_user_menu_with_defaults() -> None: mock_callback = mock.Mock() command = tanjun.as_user_menu("you")(mock_callback) @@ -181,7 +180,7 @@ def test_as_user_menu_when_wrapping_command( other_command: ( tanjun.SlashCommand[typing.Any] | tanjun.MessageCommand[typing.Any] | tanjun.MenuCommand[typing.Any, typing.Any] ) -): +) -> None: command = tanjun.as_user_menu( "c", always_defer=True, @@ -205,15 +204,15 @@ def test_as_user_menu_when_wrapping_command( class TestMenuCommand: - def test__init__when_no_names_provided(self): + def test__init__when_no_names_provided(self) -> None: with pytest.raises(RuntimeError, match="No default name given"): tanjun.commands.MenuCommand(mock.AsyncMock(), hikari.CommandType.USER, {"id": "idea"}) - def test__init__when_name_too_long(self): + def test__init__when_name_too_long(self) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): tanjun.commands.MenuCommand(mock.Mock(), hikari.CommandType.MESSAGE, "x" * 33) - def test__init__when_localised_name_too_long(self): + def test__init__when_localised_name_too_long(self) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): tanjun.commands.MenuCommand( mock.Mock(), @@ -221,7 +220,7 @@ def test__init__when_localised_name_too_long(self): {hikari.Locale.BG: "year", hikari.Locale.DA: "y" * 33, hikari.Locale.DE: "ein", "default": "meow"}, ) - def test__init__when_localised_default_name_too_long(self): + def test__init__when_localised_default_name_too_long(self) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): tanjun.commands.MenuCommand( mock.Mock(), @@ -229,11 +228,11 @@ def test__init__when_localised_default_name_too_long(self): {hikari.Locale.BG: "year", hikari.Locale.DE: "ein", "default": "meow" * 9}, ) - def test__init__when_name_too_short(self): + def test__init__when_name_too_short(self) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): tanjun.commands.MenuCommand(mock.Mock(), hikari.CommandType.MESSAGE, "") - def test__init__when_localised_name_too_short(self): + def test__init__when_localised_name_too_short(self) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): tanjun.commands.MenuCommand( mock.Mock(), @@ -241,7 +240,7 @@ def test__init__when_localised_name_too_short(self): {hikari.Locale.BG: "", hikari.Locale.DA: "damn", hikari.Locale.HR: "beep"}, ) - def test__init__when_localised_default_name_too_short(self): + def test__init__when_localised_default_name_too_short(self) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): tanjun.commands.MenuCommand( mock.Mock(), @@ -264,11 +263,11 @@ def test___init___when_command_object( | tanjun.MessageCommand[tanjun.abc.CommandCallbackSig] | tanjun.MenuCommand[typing.Any, typing.Any] ), - ): + ) -> None: assert tanjun.MenuCommand(inner_command, hikari.CommandType.MESSAGE, "woow").callback is inner_command.callback @pytest.mark.asyncio - async def test_call_dunder_method(self): + async def test_call_dunder_method(self) -> None: mock_callback: typing.Any = mock.AsyncMock() command = tanjun.MenuCommand(mock_callback, hikari.CommandType.MESSAGE, "a") @@ -276,13 +275,13 @@ async def test_call_dunder_method(self): mock_callback.assert_awaited_once_with(123, 321, "ea", b=32) - def test_callback_property(self): + def test_callback_property(self) -> None: mock_callback = mock.Mock() command = tanjun.MenuCommand[typing.Any, typing.Any](mock_callback, hikari.CommandType.MESSAGE, "a") assert command.callback is mock_callback - def test_default_member_permissions_property(self): + def test_default_member_permissions_property(self) -> None: mock_callback = mock.Mock() command = tanjun.MenuCommand[typing.Any, typing.Any]( mock_callback, hikari.CommandType.MESSAGE, "a", default_member_permissions=hikari.Permissions(6541231) @@ -290,55 +289,55 @@ def test_default_member_permissions_property(self): assert command.default_member_permissions == 6541231 - def test_defaults_to_ephemeral_property(self): + def test_defaults_to_ephemeral_property(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.MESSAGE, "a", default_to_ephemeral=True ) assert command.defaults_to_ephemeral is True - def test_defaults_to_ephemeral_property_when_unset(self): + def test_defaults_to_ephemeral_property_when_unset(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "a") assert command.defaults_to_ephemeral is None - def test_is_dm_enabled_property(self): + def test_is_dm_enabled_property(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.MESSAGE, "a", dm_enabled=False ) assert command.is_dm_enabled is False - def test_is_global_property(self): + def test_is_global_property(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.MESSAGE, "a", is_global=False ) assert command.is_global is False - def test_is_global_property_when_default(self): + def test_is_global_property_when_default(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "a") assert command.is_global is True - def test_is_nsfw_property(self): + def test_is_nsfw_property(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "a", nsfw=True) assert command.is_nsfw is True - def test_is_nsfw_property_when_default(self): + def test_is_nsfw_property_when_default(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "a") assert command.is_nsfw is False - def test_name_properties(self): + def test_name_properties(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "uwu") assert command.name == "uwu" assert command.name_localisations == {} assert command._names.id is None - def test_name_properties_when_localised(self): + def test_name_properties_when_localised(self) -> None: command = tanjun.MenuCommand( mock.AsyncMock(), hikari.CommandType.USER, @@ -359,7 +358,7 @@ def test_name_properties_when_localised(self): } assert command._names.id == "meow" - def test_name_properties_when_localised_implicit_default(self): + def test_name_properties_when_localised_implicit_default(self) -> None: command = tanjun.MenuCommand( mock.AsyncMock(), hikari.CommandType.MESSAGE, {hikari.Locale.JA: "Rei", hikari.Locale.DE: "Meow"} ) @@ -368,7 +367,7 @@ def test_name_properties_when_localised_implicit_default(self): assert command.name_localisations == {hikari.Locale.JA: "Rei", hikari.Locale.DE: "Meow"} assert command._names.id is None - def test_name_properties_when_dict_without_localisations(self): + def test_name_properties_when_dict_without_localisations(self) -> None: command = tanjun.MenuCommand( mock.AsyncMock(), hikari.CommandType.MESSAGE, {"id": "shinjis_man", "default": "no papa"} ) @@ -377,23 +376,23 @@ def test_name_properties_when_dict_without_localisations(self): assert command.name_localisations == {} assert command._names.id == "shinjis_man" - def test_tracked_command_property(self): + def test_tracked_command_property(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "uwu") assert command.tracked_command is None - def test_tracked_command_id_property(self): + def test_tracked_command_id_property(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "uwu") assert command.tracked_command_id is None @pytest.mark.parametrize("command_type", [hikari.CommandType.MESSAGE, hikari.CommandType.USER]) - def test_type_property(self, command_type: hikari.CommandType): + def test_type_property(self, command_type: hikari.CommandType) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), command_type, "uwu") # type: ignore assert command.type is command_type - def test_build(self): + def test_build(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.USER, "owo") builder = command.build() @@ -406,7 +405,7 @@ def test_build(self): assert builder.is_dm_enabled is hikari.UNDEFINED assert builder.is_nsfw is False - def test_build_when_all_fields_set(self): + def test_build_when_all_fields_set(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.MESSAGE, @@ -430,7 +429,7 @@ def test_build_when_all_fields_set(self): assert builder.is_nsfw is True assert builder.name_localizations == {} - def test_build_with_localised_fields(self): + def test_build_with_localised_fields(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.USER, @@ -446,7 +445,7 @@ def test_build_with_localised_fields(self): hikari.Locale.JA: "Ayanami", } - def test_build_with_localised_fields_and_implicit_default(self): + def test_build_with_localised_fields_and_implicit_default(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.USER, @@ -468,7 +467,7 @@ def test_build_with_localised_fields_and_implicit_default(self): hikari.Locale.JA: "Ayanami", } - def test_build_with_bound_component_field_inheritance(self): + def test_build_with_bound_component_field_inheritance(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.USER, "owo" ).bind_component( @@ -483,7 +482,7 @@ def test_build_with_bound_component_field_inheritance(self): assert builder.default_member_permissions == 65412312 assert builder.is_dm_enabled is True - def test_build_with_passed_component_field_inheritance(self): + def test_build_with_passed_component_field_inheritance(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.USER, "owo" ).bind_component( @@ -502,7 +501,7 @@ def test_build_with_passed_component_field_inheritance(self): assert builder.default_member_permissions == 561234123 assert builder.is_dm_enabled is False - def test_set_tracked_command(self): + def test_set_tracked_command(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "pat") mock_command = mock.Mock(hikari.ContextMenuCommand) @@ -512,7 +511,7 @@ def test_set_tracked_command(self): assert command.tracked_command is mock_command assert command.tracked_command_id is mock_command.id - def test_set_ephemeral_default(self): + def test_set_ephemeral_default(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "pat") result = command.set_ephemeral_default(True) @@ -521,7 +520,7 @@ def test_set_ephemeral_default(self): assert command.defaults_to_ephemeral is True @pytest.mark.asyncio - async def test_check_context(self): + async def test_check_context(self) -> None: mock_callback = mock.Mock() mock_other_callback = mock.Mock() mock_context = mock.Mock() @@ -541,13 +540,13 @@ async def test_check_context(self): mock_context.set_command.assert_has_calls([mock.call(command), mock.call(None)]) @pytest.mark.skip(reason="TODO") - def test_copy(self): ... + def test_copy(self) -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_execute(self): ... + async def test_execute(self) -> None: ... - def test_load_into_component(self): + def test_load_into_component(self) -> None: command = tanjun.MenuCommand[typing.Any, typing.Any](mock.Mock(), hikari.CommandType.MESSAGE, "pat") mock_component = mock.Mock() @@ -555,7 +554,7 @@ def test_load_into_component(self): mock_component.add_menu_command.assert_called_once_with(command) - def test_load_into_component_when_wrapped_command(self): + def test_load_into_component_when_wrapped_command(self) -> None: mock_other_command = mock.Mock() command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.MESSAGE, "pat", _wrapped_command=mock_other_command @@ -567,7 +566,7 @@ def test_load_into_component_when_wrapped_command(self): mock_component.add_menu_command.assert_called_once_with(command) mock_other_command.load_into_component.assert_not_called() - def test_load_into_component_when_wrapped_command_is_loader(self): + def test_load_into_component_when_wrapped_command_is_loader(self) -> None: mock_other_command = mock.Mock(tanjun.components.AbstractComponentLoader) command = tanjun.MenuCommand[typing.Any, typing.Any]( mock.Mock(), hikari.CommandType.MESSAGE, "pat", _wrapped_command=mock_other_command diff --git a/tests/commands/test_message.py b/tests/commands/test_message.py index eb01dde64..1e8c0d986 100644 --- a/tests/commands/test_message.py +++ b/tests/commands/test_message.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -68,7 +67,7 @@ def stub_class( return typing.cast("type[_T]", new_cls)(*args, **kwargs or {}) -def test_as_message_command(): +def test_as_message_command() -> None: mock_callback = mock.Mock() command = tanjun.as_message_command("a", "b")(mock_callback) @@ -90,14 +89,14 @@ def test_as_message_command_when_wrapping_command( other_command: ( tanjun.SlashCommand[typing.Any] | tanjun.MessageCommand[typing.Any] | tanjun.MenuCommand[typing.Any, typing.Any] ) -): +) -> None: command = tanjun.as_message_command("a", "b")(other_command) assert command.wrapped_command is other_command assert command.callback is other_command.callback -def test_as_message_command_group(): +def test_as_message_command_group() -> None: mock_callback = mock.Mock() command = tanjun.as_message_command_group("c", "b", strict=True)(mock_callback) @@ -120,7 +119,7 @@ def test_as_message_command_group_when_wrapping_command( other_command: ( tanjun.SlashCommand[typing.Any] | tanjun.MessageCommand[typing.Any] | tanjun.MenuCommand[typing.Any, typing.Any] ) -): +) -> None: command = tanjun.as_message_command_group("c", "b", strict=True)(other_command) assert command.wrapped_command is other_command @@ -139,14 +138,14 @@ class TestMessageCommand: def test___init___when_command_object( self, inner_command: tanjun.SlashCommand[tanjun.abc.CommandCallbackSig] | tanjun.MenuCommand[typing.Any, typing.Any], - ): + ) -> None: assert tanjun.MessageCommand(inner_command, "woow").callback is inner_command.callback @pytest.mark.skip(reason="TODO") - def test___repr__(self): ... + def test___repr__(self) -> None: ... @pytest.mark.asyncio - async def test___call__(self): + async def test___call__(self) -> None: callback = mock.AsyncMock() command = tanjun.as_message_command(callback, "yee", "nsoosos")(callback) @@ -154,31 +153,31 @@ async def test___call__(self): callback.assert_awaited_once_with(65123, "okokok", a="odoosd", gf=435123) - def test_callback_property(self): + def test_callback_property(self) -> None: mock_callback = mock.Mock() assert tanjun.MessageCommand(mock_callback, "yee", "nsoosos").callback is mock_callback - def test_names_property(self): + def test_names_property(self) -> None: command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc") assert command.names == ["aaaaa", "bbbbb", "ccccc"] - def test_parent_property(self): + def test_parent_property(self) -> None: mock_parent = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc").set_parent(mock_parent) assert command.parent is mock_parent - def test_parser_property(self): + def test_parser_property(self) -> None: mock_parser = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc").set_parser(mock_parser) assert command.parser is mock_parser - def test_set_parser(self): + def test_set_parser(self) -> None: @tanjun.as_message_command("meow") - async def command(ctx: tanjun.abc.MessageContext, name: str, value: int, beep: bool): ... + async def command(ctx: tanjun.abc.MessageContext, name: str, value: int, beep: bool) -> None: ... parser = tanjun.parsing.ShlexParser().validate_arg_keys("other", ["name", "value"]) command.set_parser(parser) @@ -186,7 +185,7 @@ async def command(ctx: tanjun.abc.MessageContext, name: str, value: int, beep: b tanjun.with_option("value", "--value", default=None)(command) tanjun.with_argument("beep")(command) - def test_set_parser_when_no_signature(self): + def test_set_parser_when_no_signature(self) -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -195,9 +194,9 @@ def test_set_parser_when_no_signature(self): tanjun.with_option("meow", "--nyaa", default=123)(command) tanjun.with_argument("meow")(command) - def test_set_parser_when_invalid_argument_key(self): + def test_set_parser_when_invalid_argument_key(self) -> None: @tanjun.as_message_command("meow") - async def meow_command(ctx: tanjun.abc.MessageContext, *args: str, name: str): ... + async def meow_command(ctx: tanjun.abc.MessageContext, *args: str, name: str) -> None: ... parser = tanjun.parsing.ShlexParser().validate_arg_keys("other", ["name", "beep"]) meow_command.set_parser(parser) @@ -205,9 +204,9 @@ async def meow_command(ctx: tanjun.abc.MessageContext, *args: str, name: str): . with pytest.raises(ValueError, match="'beep' is not a valid keyword argument for meow_command"): tanjun.with_argument("beep")(meow_command) - def test_set_parser_when_invalid_option_key(self): + def test_set_parser_when_invalid_option_key(self) -> None: @tanjun.as_message_command("meow") - async def command_name(ctx: tanjun.abc.MessageContext, *args: str, name: str): ... + async def command_name(ctx: tanjun.abc.MessageContext, *args: str, name: str) -> None: ... parser = tanjun.parsing.ShlexParser().validate_arg_keys("other", ["name", "nock"]) command_name.set_parser(parser) @@ -215,41 +214,41 @@ async def command_name(ctx: tanjun.abc.MessageContext, *args: str, name: str): . with pytest.raises(ValueError, match="'nock' is not a valid keyword argument for command_name"): tanjun.with_option("nock", "--nock", default=123)(command_name) - def test_set_parser_when_invalid_key_but_not_validating(self): + def test_set_parser_when_invalid_key_but_not_validating(self) -> None: @tanjun.as_message_command("meow", validate_arg_keys=False) - async def command(ctx: tanjun.abc.MessageContext, name: str): ... + async def command(ctx: tanjun.abc.MessageContext, name: str) -> None: ... tanjun.with_option("meow", "--nyaa", default=123)(command) tanjun.with_argument("meow")(command) - def test_set_parser_when_invalid_argument_key_added_afterwards(self): + def test_set_parser_when_invalid_argument_key_added_afterwards(self) -> None: @tanjun.with_argument("name") @tanjun.as_message_command("meow") - async def next_command(ctx: tanjun.abc.MessageContext, name: str): ... + async def next_command(ctx: tanjun.abc.MessageContext, name: str) -> None: ... with pytest.raises(ValueError, match="'se' is not a valid keyword argument for next_command"): tanjun.with_argument("se")(next_command) - def test_set_parser_when_invalid_option_key_added_afterwards(self): + def test_set_parser_when_invalid_option_key_added_afterwards(self) -> None: @tanjun.with_option("name", "--name", default="") @tanjun.as_message_command("meow") - async def nyaa_command(ctx: tanjun.abc.MessageContext, name: str): ... + async def nyaa_command(ctx: tanjun.abc.MessageContext, name: str) -> None: ... with pytest.raises(ValueError, match="'boop' is not a valid keyword argument for nyaa_command"): tanjun.with_option("boop", "--boop", default=123)(nyaa_command) - def test_set_parser_when_invalid_option_key_added_afterwards_but_not_validating(self): + def test_set_parser_when_invalid_option_key_added_afterwards_but_not_validating(self) -> None: @tanjun.with_argument("blam") @tanjun.with_option("name", "--name", default="") @tanjun.as_message_command("meow", validate_arg_keys=False) - async def command(ctx: tanjun.abc.MessageContext, name: str, blam: int): ... + async def command(ctx: tanjun.abc.MessageContext, name: str, blam: int) -> None: ... tanjun.with_option("boop", "--boop", default=123)(command) tanjun.with_argument("not_a_name")(command) - def test_set_parser_when_argument_key_invalid_for_other_linked_callback(self): + def test_set_parser_when_argument_key_invalid_for_other_linked_callback(self) -> None: @tanjun.as_message_command("name", "description") - async def command(ctx: tanjun.abc.MessageContext, name: str, meow: str, meowed: str): ... + async def command(ctx: tanjun.abc.MessageContext, name: str, meow: str, meowed: str) -> None: ... parser = tanjun.parsing.ShlexParser() parser.validate_arg_keys("test_callback", ["meow", "bye"]) @@ -258,9 +257,9 @@ async def command(ctx: tanjun.abc.MessageContext, name: str, meow: str, meowed: with pytest.raises(ValueError, match="'meowed' is not a valid keyword argument for test_callback"): tanjun.with_argument("meowed")(command) - def test_set_parser_when_option_key_invalid_for_other_linked_callback(self): + def test_set_parser_when_option_key_invalid_for_other_linked_callback(self) -> None: @tanjun.as_message_command("name", "description") - async def command(ctx: tanjun.abc.MessageContext, name: str, eep: str, nyaned: bool): ... + async def command(ctx: tanjun.abc.MessageContext, name: str, eep: str, nyaned: bool) -> None: ... parser = tanjun.parsing.ShlexParser() parser.validate_arg_keys("test_callback", ["eep", "e"]) @@ -269,18 +268,18 @@ async def command(ctx: tanjun.abc.MessageContext, name: str, eep: str, nyaned: b with pytest.raises(ValueError, match="'nyaned' is not a valid keyword argument for test_callback"): tanjun.with_option("nyaned", "--nyaned", default=123)(command) - def test_set_parser_when_existing_argument_not_valid_for_callback(self): + def test_set_parser_when_existing_argument_not_valid_for_callback(self) -> None: @tanjun.as_message_command("name", "description") - async def eep_command(ctx: tanjun.abc.MessageContext, name: str, meow: str, meowed: str): ... + async def eep_command(ctx: tanjun.abc.MessageContext, name: str, meow: str, meowed: str) -> None: ... parser = tanjun.parsing.ShlexParser().add_argument("meow").add_argument("meowed").add_argument("namer") with pytest.raises(ValueError, match="'namer' is not a valid keyword argument for eep_command"): eep_command.set_parser(parser) - def test_set_parser_when_existing_option_not_valid_for_callback(self): + def test_set_parser_when_existing_option_not_valid_for_callback(self) -> None: @tanjun.as_message_command("name", "description") - async def test_command(ctx: tanjun.abc.MessageContext, name: str, eep: str, nyaned: bool): ... + async def test_command(ctx: tanjun.abc.MessageContext, name: str, eep: str, nyaned: bool) -> None: ... parser = ( tanjun.parsing.ShlexParser() @@ -292,7 +291,7 @@ async def test_command(ctx: tanjun.abc.MessageContext, name: str, eep: str, nyan with pytest.raises(ValueError, match="'bang' is not a valid keyword argument for test_command"): test_command.set_parser(parser) - def test_set_parser_when_callback_has_no_name(self): + def test_set_parser_when_callback_has_no_name(self) -> None: class OtherCallback: async def __call__(self, ctx: tanjun.abc.Context, name: str, beep: int) -> None: ... @@ -301,10 +300,10 @@ async def __call__(self, ctx: tanjun.abc.Context, name: str, beep: int) -> None: parser = tanjun.parsing.ShlexParser() tanjun.MessageCommand(other_callback, "name", validate_arg_keys=True).set_parser(parser) - with pytest.raises(ValueError, match=f"'boop' is not a valid keyword argument for {repr(other_callback)}"): + with pytest.raises(ValueError, match=f"'boop' is not a valid keyword argument for {other_callback!r}"): parser.add_argument("boop") - def test_bind_client(self): + def test_bind_client(self) -> None: mock_client = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc") @@ -313,7 +312,7 @@ def test_bind_client(self): bind_client.assert_called_once_with(mock_client) - def test_bind_client_when_has_parser(self): + def test_bind_client_when_has_parser(self) -> None: mock_client = mock.Mock() mock_parser = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc").set_parser(mock_parser) @@ -325,7 +324,7 @@ def test_bind_client_when_has_parser(self): mock_parser.bind_client.assert_called_once_with(mock_client) - def test_bind_component(self): + def test_bind_component(self) -> None: mock_component = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc") @@ -334,7 +333,7 @@ def test_bind_component(self): bind_component.assert_called_once_with(mock_component) - def test_bind_component_when_has_parser(self): + def test_bind_component_when_has_parser(self) -> None: mock_component = mock.Mock() mock_parser = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "aaaaa", "bbbbb", "ccccc").set_parser(mock_parser) @@ -347,10 +346,10 @@ def test_bind_component_when_has_parser(self): mock_parser.bind_component.assert_called_once_with(mock_component) @pytest.mark.skip(reason="TODO") - def test_copy(self): ... + def test_copy(self) -> None: ... @pytest.mark.asyncio - async def test_check_context(self): + async def test_check_context(self) -> None: mock_check = mock.Mock() mock_other_check = mock.Mock() mock_context = mock.Mock() @@ -371,9 +370,9 @@ async def test_check_context(self): @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_execute(self): ... + async def test_execute(self) -> None: ... - def test_load_into_component(self): + def test_load_into_component(self) -> None: mock_component = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "yee", "nsoosos") @@ -381,7 +380,7 @@ def test_load_into_component(self): mock_component.add_message_command.assert_called_once_with(command) - def test_load_into_component_when_wrapped_command_set(self): + def test_load_into_component_when_wrapped_command_set(self) -> None: mock_component = mock.Mock() mock_other_command = mock.Mock() command = tanjun.MessageCommand[typing.Any](mock.Mock(), "yee", "nsoosos") @@ -392,7 +391,7 @@ def test_load_into_component_when_wrapped_command_set(self): mock_component.add_message_command.assert_called_once_with(command) mock_other_command.load_into_component.assert_not_called() - def test_load_into_component_when_wrapped_command_is_loadable(self): + def test_load_into_component_when_wrapped_command_is_loadable(self) -> None: mock_component = mock.Mock() mock_other_command = mock.Mock(tanjun.components.AbstractComponentLoader) command = tanjun.MessageCommand[typing.Any](mock.Mock(), "yee", "nsoosos") @@ -406,18 +405,18 @@ def test_load_into_component_when_wrapped_command_is_loadable(self): class TestMessageCommandGroup: @pytest.mark.skip(reason="TODO") - def test___repr__(self): ... + def test___repr__(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_commands_property(self): ... + def test_commands_property(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_is_strict_property(self): ... + def test_is_strict_property(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_copy(self): ... + def test_copy(self) -> None: ... - def test_add_command(self): + def test_add_command(self) -> None: mock_command = mock.Mock(names=["meow"]) command_group = tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos") @@ -427,7 +426,7 @@ def test_add_command(self): mock_command.set_parent.assert_called_once_with(command_group) assert mock_command in command_group.commands - def test_add_command_when_already_present(self): + def test_add_command_when_already_present(self) -> None: mock_command = mock.Mock(names=["nyaa", "echo"]) command_group = tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos") @@ -436,7 +435,7 @@ def test_add_command_when_already_present(self): assert result is command_group assert list(command_group.commands).count(mock_command) == 1 - def test_add_command_when_strict(self): + def test_add_command_when_strict(self) -> None: mock_command = mock.Mock(names={"a", "b"}) command_group = tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos", strict=True) @@ -446,13 +445,13 @@ def test_add_command_when_strict(self): mock_command.set_parent.assert_called_once_with(command_group) assert mock_command in command_group.commands - def test_add_command_when_strict_and_space_in_any_name(self): + def test_add_command_when_strict_and_space_in_any_name(self) -> None: command_group = tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos", strict=True) with pytest.raises(ValueError, match="Command name cannot contain spaces in a strict collection"): command_group.add_command(mock.Mock(names={"a space", "b"})) - def test_add_command_when_strict_and_conflicts_found(self): + def test_add_command_when_strict_and_conflicts_found(self) -> None: command_group = ( tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos", strict=True) .add_command(mock.Mock(names={"aaa", "b"})) @@ -468,7 +467,7 @@ def test_add_command_when_strict_and_conflicts_found(self): ): command_group.add_command(mock.Mock(names={"aaa", "dsaasd"})) - def test_as_sub_command(self): + def test_as_sub_command(self) -> None: async def mock_callback(ctx: tanjun.abc.Context) -> None: ... other_mock_callback = mock.Mock() @@ -480,7 +479,7 @@ async def mock_callback(ctx: tanjun.abc.Context) -> None: ... assert result.names == ["neco"] assert result._arg_names is not None - def test_as_sub_command_with_optional_args(self): + def test_as_sub_command_with_optional_args(self) -> None: async def mock_callback(ctx: tanjun.abc.Context) -> None: ... command_group = tanjun.MessageCommandGroup(mock_callback, "meow") @@ -490,7 +489,7 @@ async def mock_callback(ctx: tanjun.abc.Context) -> None: ... assert result.names == ["neco", "nyan"] assert result._arg_names is None - def test_as_sub_group(self): + def test_as_sub_group(self) -> None: async def mock_callback(ctx: tanjun.abc.Context) -> None: ... other_mock_callback = mock.Mock() @@ -503,7 +502,7 @@ async def mock_callback(ctx: tanjun.abc.Context) -> None: ... assert result.is_strict is False assert result._arg_names is not None - def test_as_sub_group_with_optional_args(self): + def test_as_sub_group_with_optional_args(self) -> None: async def mock_callback(ctx: tanjun.abc.Context) -> None: ... command_group = tanjun.MessageCommandGroup(mock_callback, "meow") @@ -514,7 +513,7 @@ async def mock_callback(ctx: tanjun.abc.Context) -> None: ... assert result.is_strict is True assert result._arg_names is None - def test_remove_command(self): + def test_remove_command(self) -> None: mock_command = mock.Mock(names=["echo"]) command_group = tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "a", "b").add_command(mock_command) @@ -523,7 +522,7 @@ def test_remove_command(self): assert result is command_group assert mock_command not in command_group.commands - def test_remove_command_when_strict(self): + def test_remove_command_when_strict(self) -> None: mock_command = mock.Mock(names={"abba", "bba", "dadaba"}) mock_other_command = mock.Mock(names={"me", "OwOy"}) command_group = ( @@ -542,7 +541,7 @@ def test_remove_command_when_strict(self): } assert command_group._commands.commands == [mock_other_command] - def test_with_command(self): + def test_with_command(self) -> None: add_command = mock.Mock() command = stub_class( tanjun.MessageCommandGroup[typing.Any], add_command=add_command, args=(mock.Mock(), "a", "b") @@ -554,7 +553,7 @@ def test_with_command(self): assert result is mock_command add_command.assert_called_once_with(mock_command) - def test_bind_client(self): + def test_bind_client(self) -> None: mock_command_1 = mock.Mock(names=["hi"]) mock_command_2 = mock.Mock(names=["bye"]) mock_command_3 = mock.Mock(names=["meow"]) @@ -575,7 +574,7 @@ def test_bind_client(self): mock_command_2.bind_client.assert_called_once_with(mock_client) mock_command_3.bind_client.assert_called_once_with(mock_client) - def test_bind_component(self): + def test_bind_component(self) -> None: mock_command_1 = mock.Mock(names=["hi"]) mock_command_2 = mock.Mock(names=["bye"]) mock_command_3 = mock.Mock(names=["meow"]) @@ -596,7 +595,7 @@ def test_bind_component(self): mock_command_2.bind_component.assert_called_once_with(mock_component) mock_command_3.bind_component.assert_called_once_with(mock_component) - def test_find_command(self): + def test_find_command(self) -> None: mock_command_1 = mock.Mock(names={"i am", "sexy", "jk", "unless"}) mock_command_2 = mock.Mock(names={"i", "owo uwu", "no u"}) command_group = ( @@ -611,7 +610,7 @@ def test_find_command(self): assert results == {("i", mock_command_2), ("i am", mock_command_1)} - def test_find_command_when_strict(self): + def test_find_command_when_strict(self) -> None: mock_command_1 = mock.Mock(names={"ok", "no"}) command_group = ( tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos", strict=True) @@ -624,7 +623,7 @@ def test_find_command_when_strict(self): assert results == [("ok", mock_command_1)] - def test_find_command_when_strict_and_unknown_name(self): + def test_find_command_when_strict_and_unknown_name(self) -> None: command_group = ( tanjun.MessageCommandGroup[typing.Any](mock.Mock(), "yee", "nsoosos", strict=True) .add_command(mock.Mock(names={"ok", "no"})) @@ -637,7 +636,7 @@ def test_find_command_when_strict_and_unknown_name(self): assert results == [] @pytest.mark.asyncio - async def test_execute_no_message_content(self): + async def test_execute_no_message_content(self) -> None: mock_context = mock.Mock() mock_context.message.content = None @@ -649,7 +648,7 @@ async def command_group(ctx: tanjun.abc.MessageContext) -> None: await command_group.execute(mock_context) @pytest.mark.asyncio - async def test_execute(self): + async def test_execute(self) -> None: mock_callback = mock.Mock() mock_command_1 = mock.AsyncMock() mock_command_1.check_context.return_value = False @@ -683,7 +682,7 @@ async def test_execute(self): mock_command_3.execute.assert_not_called() @pytest.mark.asyncio - async def test_execute_no_pass_through_hooks(self): + async def test_execute_no_pass_through_hooks(self) -> None: mock_callback = mock.Mock() mock_command_1 = mock.AsyncMock() mock_command_1.check_context.return_value = False @@ -716,7 +715,7 @@ async def test_execute_no_pass_through_hooks(self): mock_command_3.execute.assert_not_called() @pytest.mark.asyncio - async def test_execute_no_hooks(self): + async def test_execute_no_hooks(self) -> None: mock_callback = mock.Mock() mock_command_1 = mock.AsyncMock() mock_command_1.check_context.return_value = False @@ -746,7 +745,7 @@ async def test_execute_no_hooks(self): mock_command_3.execute.assert_not_called() @pytest.mark.asyncio - async def test_execute_falls_back_to_own_callback(self): + async def test_execute_falls_back_to_own_callback(self) -> None: mock_callback = mock.Mock() mock_command_1 = mock.AsyncMock() mock_command_1.check_context.return_value = False @@ -775,7 +774,7 @@ async def test_execute_falls_back_to_own_callback(self): mock_command_2.execute.assert_not_called() @pytest.mark.asyncio - async def test_execute_falls_back_to_own_callback_no_pass_through_hooks(self): + async def test_execute_falls_back_to_own_callback_no_pass_through_hooks(self) -> None: mock_callback = mock.Mock() mock_command_1 = mock.AsyncMock() mock_command_1.check_context.return_value = False @@ -803,7 +802,7 @@ async def test_execute_falls_back_to_own_callback_no_pass_through_hooks(self): mock_command_2.execute.assert_not_called() @pytest.mark.asyncio - async def test_execute_falls_back_to_own_callback_no_hooks(self): + async def test_execute_falls_back_to_own_callback_no_hooks(self) -> None: mock_callback = mock.Mock() mock_command_1 = mock.AsyncMock() mock_command_1.check_context.return_value = False diff --git a/tests/commands/test_slash.py b/tests/commands/test_slash.py index c9b60b4b0..71ec2099c 100644 --- a/tests/commands/test_slash.py +++ b/tests/commands/test_slash.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -70,7 +69,7 @@ def stub_class( return typing.cast("type[_T]", new_cls)(*args, **kwargs or {}) -def test_slash_command_group(): +def test_slash_command_group() -> None: command = tanjun.slash_command_group( "a_name", "very", @@ -91,7 +90,7 @@ def test_slash_command_group(): assert isinstance(command, tanjun.SlashCommandGroup) -def test_slash_command_group_with_default(): +def test_slash_command_group_with_default() -> None: command = tanjun.slash_command_group("a_name", "very") assert command.tracked_command_id is None @@ -103,7 +102,7 @@ def test_slash_command_group_with_default(): assert isinstance(command, tanjun.SlashCommandGroup) -def test_as_slash_command(): +def test_as_slash_command() -> None: mock_callback = mock.Mock() command = tanjun.as_slash_command( @@ -144,7 +143,7 @@ def test_as_slash_command_when_wrapping_command( other_command: ( tanjun.SlashCommand[typing.Any] | tanjun.MessageCommand[typing.Any] | tanjun.MenuCommand[typing.Any, typing.Any] ) -): +) -> None: command = tanjun.as_slash_command( "a_very", "cool name", @@ -171,7 +170,7 @@ def test_as_slash_command_when_wrapping_command( assert isinstance(command, tanjun.SlashCommand) -def test_as_slash_command_with_defaults(): +def test_as_slash_command_with_defaults() -> None: mock_callback = mock.Mock() command = tanjun.as_slash_command("a_very", "cool name")(mock_callback) @@ -186,7 +185,7 @@ def test_as_slash_command_with_defaults(): assert isinstance(command, tanjun.SlashCommand) -def test_with_attachment_slash_option(): +def test_with_attachment_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_attachment_slash_option( @@ -199,7 +198,7 @@ def test_with_attachment_slash_option(): ) -def test_with_attachment_slash_option_with_defaults(): +def test_with_attachment_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_attachment_slash_option("meow", "nyaa")(mock_command) @@ -210,7 +209,7 @@ def test_with_attachment_slash_option_with_defaults(): ) -def test_with_str_slash_option(): +def test_with_str_slash_option() -> None: mock_autocomplete = mock.Mock() mock_command = mock.MagicMock() mock_converter = mock.Mock() @@ -244,7 +243,7 @@ def test_with_str_slash_option(): ) -def test_with_str_slash_option_with_defaults(): +def test_with_str_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_str_slash_option("a_name", "a_value")(mock_command) @@ -265,7 +264,7 @@ def test_with_str_slash_option_with_defaults(): ) -def test_with_int_slash_option(): +def test_with_int_slash_option() -> None: mock_autocomplete = mock.Mock() mock_command = mock.MagicMock() mock_converter = mock.Mock() @@ -299,7 +298,7 @@ def test_with_int_slash_option(): ) -def test_with_int_slash_option_with_defaults(): +def test_with_int_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_int_slash_option("im_con", "con man")(mock_command) @@ -320,7 +319,7 @@ def test_with_int_slash_option_with_defaults(): ) -def test_with_float_slash_option(): +def test_with_float_slash_option() -> None: mock_autocomplete = mock.Mock() mock_command = mock.MagicMock() mock_converter = mock.Mock() @@ -356,7 +355,7 @@ def test_with_float_slash_option(): ) -def test_with_float_slash_option_with_defaults(): +def test_with_float_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_float_slash_option("hi", "bye")(mock_command) @@ -378,7 +377,7 @@ def test_with_float_slash_option_with_defaults(): ) -def test_with_bool_slash_option(): +def test_with_bool_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_bool_slash_option("bool", "bool me man", default=False, key="audience", pass_as_kwarg=False)( @@ -391,7 +390,7 @@ def test_with_bool_slash_option(): ) -def test_with_bool_slash_option_with_defaults(): +def test_with_bool_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_bool_slash_option("bool", "bool me man")(mock_command) @@ -402,7 +401,7 @@ def test_with_bool_slash_option_with_defaults(): ) -def test_with_user_slash_option(): +def test_with_user_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_user_slash_option( @@ -415,7 +414,7 @@ def test_with_user_slash_option(): ) -def test_with_user_slash_option_with_defaults(): +def test_with_user_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_user_slash_option("victim", "who're we getting next?")(mock_command) @@ -426,7 +425,7 @@ def test_with_user_slash_option_with_defaults(): ) -def test_with_member_slash_option(): +def test_with_member_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_member_slash_option("no", "hihihi?", default=123321, key="member")(mock_command) @@ -435,7 +434,7 @@ def test_with_member_slash_option(): mock_command.add_member_option.assert_called_once_with("no", "hihihi?", default=123321, key="member") -def test_with_member_slash_option_with_defaults(): +def test_with_member_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_member_slash_option("no", "hihihi?")(mock_command) @@ -444,7 +443,7 @@ def test_with_member_slash_option_with_defaults(): mock_command.add_member_option.assert_called_once_with("no", "hihihi?", default=tanjun.abc.NO_DEFAULT, key=None) -def test_with_channel_slash_option(): +def test_with_channel_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_channel_slash_option( @@ -467,7 +466,7 @@ def test_with_channel_slash_option(): ) -def test_with_channel_slash_option_with_defaults(): +def test_with_channel_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_channel_slash_option("channel", "channel?")(mock_command) @@ -478,7 +477,7 @@ def test_with_channel_slash_option_with_defaults(): ) -def test_with_role_slash_option(): +def test_with_role_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_role_slash_option("role", "role?", default=333, key="paradise", pass_as_kwarg=False)( @@ -491,7 +490,7 @@ def test_with_role_slash_option(): ) -def test_with_role_slash_option_with_defaults(): +def test_with_role_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_role_slash_option("role", "role?")(mock_command) @@ -502,7 +501,7 @@ def test_with_role_slash_option_with_defaults(): ) -def test_with_mentionable_slash_option(): +def test_with_mentionable_slash_option() -> None: mock_command = mock.MagicMock() result = tanjun.with_mentionable_slash_option("mentu", "mentu?", default=333, key="gun", pass_as_kwarg=False)( @@ -515,7 +514,7 @@ def test_with_mentionable_slash_option(): ) -def test_with_mentionable_slash_option_with_defaults(): +def test_with_mentionable_slash_option_with_defaults() -> None: mock_command = mock.MagicMock() result = tanjun.with_mentionable_slash_option("mentu", "mentu?", pass_as_kwarg=True)(mock_command) @@ -527,7 +526,7 @@ def test_with_mentionable_slash_option_with_defaults(): class TestTrackedOption: - def test_init(self): + def test_init(self) -> None: mock_converter = mock.Mock() option = tanjun.commands.slash._TrackedOption( name="name", @@ -548,14 +547,14 @@ def test_init(self): assert option.default == "default" @pytest.mark.asyncio - async def test_convert_when_no_converters(self): + async def test_convert_when_no_converters(self) -> None: mock_value = mock.Mock() option = tanjun.commands.slash._TrackedOption(name="hi", key="bye", option_type=hikari.OptionType.INTEGER) assert await option.convert(mock.Mock(), mock_value) is mock_value @pytest.mark.asyncio - async def test_convert_when_all_fail(self): + async def test_convert_when_all_fail(self) -> None: exc_1 = ValueError() exc_2 = ValueError() mock_converter_1 = mock.Mock() @@ -578,7 +577,7 @@ async def test_convert_when_all_fail(self): ) @pytest.mark.asyncio - async def test_convert(self): + async def test_convert(self) -> None: mock_converter_1 = mock.Mock() mock_converter_2 = mock.Mock() mock_converter_3 = mock.Mock() @@ -610,7 +609,7 @@ class TestSlashCommandBuilder: ... class TestBaseSlashCommand: @pytest.mark.parametrize("name", _INVALID_NAMES) - def test__init__with_invalid_name(self, name: str): + def test__init__with_invalid_name(self, name: str) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -619,7 +618,7 @@ def test__init__with_invalid_name(self, name: str): stub_class(tanjun.commands.BaseSlashCommand, args=(name, "desccc")) @pytest.mark.parametrize("name", _INVALID_NAMES) - def test__init__with_invalid_localised_name(self, name: str): + def test__init__with_invalid_localised_name(self, name: str) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -631,7 +630,7 @@ def test__init__with_invalid_localised_name(self, name: str): ) @pytest.mark.parametrize("name", _INVALID_NAMES) - def test__init__with_invalid_localised_default_name(self, name: str): + def test__init__with_invalid_localised_default_name(self, name: str) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -645,22 +644,22 @@ def test__init__with_invalid_localised_default_name(self, name: str): ), ) - def test__init__when_no_names_provided(self): + def test__init__when_no_names_provided(self) -> None: with pytest.raises(RuntimeError, match="No default name given"): tanjun.commands.SlashCommand(mock.AsyncMock(), {"id": "id"}, "description") - def test__init__when_name_too_long(self): + def test__init__when_name_too_long(self) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): stub_class(tanjun.commands.BaseSlashCommand, args=("x" * 33, "description")) - def test__init__when_localised_name_too_long(self): + def test__init__when_localised_name_too_long(self) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, args=({hikari.Locale.DE: "x" * 33, hikari.Locale.JA: "op", hikari.Locale.KO: "opop"}, "description"), ) - def test__init__when_localised_default_name_too_long(self): + def test__init__when_localised_default_name_too_long(self) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, @@ -670,11 +669,11 @@ def test__init__when_localised_default_name_too_long(self): ), ) - def test__init__when_name_too_short(self): + def test__init__when_name_too_short(self) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): stub_class(tanjun.commands.BaseSlashCommand, args=("", "description")) - def test__init__when_localised_name_too_short(self): + def test__init__when_localised_name_too_short(self) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, @@ -684,7 +683,7 @@ def test__init__when_localised_name_too_short(self): ), ) - def test__init__when_localised_default_name_too_short(self): + def test__init__when_localised_default_name_too_short(self) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, @@ -699,18 +698,18 @@ def test__init__when_localised_default_name_too_short(self): ), ) - def test__init__when_name_isnt_lowercase(self): + def test__init__when_name_isnt_lowercase(self) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'VooDOo' must be lowercase"): stub_class(tanjun.commands.BaseSlashCommand, args=("VooDOo", "desccc")) - def test__init__when_localised_name_isnt_lowercase(self): + def test__init__when_localised_name_isnt_lowercase(self) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'BeepBeep' must be lowercase"): stub_class( tanjun.commands.BaseSlashCommand, args=({hikari.Locale.DE: "im_a_very_good_german", hikari.Locale.ES_ES: "BeepBeep"}, "desccc"), ) - def test__init__when_localised_default_name_isnt_lowercase(self): + def test__init__when_localised_default_name_isnt_lowercase(self) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'WoreLSA' must be lowercase"): stub_class( tanjun.commands.BaseSlashCommand, @@ -720,61 +719,61 @@ def test__init__when_localised_default_name_isnt_lowercase(self): ), ) - def test__init__when_no_descriptions_provided(self): + def test__init__when_no_descriptions_provided(self) -> None: with pytest.raises(RuntimeError, match="No default description given"): tanjun.commands.SlashCommand(mock.AsyncMock(), "name", {"id": "path"}) - def test__init__when_description_too_long(self): + def test__init__when_description_too_long(self) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): stub_class(tanjun.commands.BaseSlashCommand, args=("gary", "x" * 101)) - def test__init__when_localised_description_too_long(self): + def test__init__when_localised_description_too_long(self) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, args=("gary", {hikari.Locale.ES_ES: "x" * 101, hikari.Locale.EL: "el salvador"}), ) - def test__init__when_localised_default_description_too_long(self): + def test__init__when_localised_default_description_too_long(self) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, args=("gary", {"default": "x" * 101, hikari.Locale.EL: "el salvador"}) ) - def test__init__when_description_too_short(self): + def test__init__when_description_too_short(self) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): stub_class(tanjun.commands.BaseSlashCommand, args=("gary", "")) - def test__init__when_localised_description_too_short(self): + def test__init__when_localised_description_too_short(self) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): stub_class( tanjun.commands.BaseSlashCommand, args=("gary", {hikari.Locale.EL: "", hikari.Locale.CS: "essa"}) ) - def test__init__when_localised_default_description_too_short(self): + def test__init__when_localised_default_description_too_short(self) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): stub_class(tanjun.commands.BaseSlashCommand, args=("gary", {"default": "", hikari.Locale.CS: "essa"})) - def test_default_member_permissions_property(self): + def test_default_member_permissions_property(self) -> None: command = stub_class( tanjun.commands.BaseSlashCommand, args=("hi", "no"), kwargs={"default_member_permissions": 54312312} ) assert command.default_member_permissions == 54312312 - def test_defaults_to_ephemeral_property(self): + def test_defaults_to_ephemeral_property(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("hi", "no")) assert command.set_ephemeral_default(True).defaults_to_ephemeral is True - def test_description_properties(self): + def test_description_properties(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("hi", "desccc")) assert command.description == "desccc" assert command.description_localisations == {} assert command._descriptions.id is None - def test_description_properties_when_localised(self): + def test_description_properties_when_localised(self) -> None: command = stub_class( tanjun.commands.BaseSlashCommand, args=( @@ -797,7 +796,7 @@ def test_description_properties_when_localised(self): } assert command._descriptions.id == "about" - def test_description_properties_when_localised_implicit_default(self): + def test_description_properties_when_localised_implicit_default(self) -> None: command = stub_class( tanjun.commands.BaseSlashCommand, args=("eep", {hikari.Locale.HU: "how are you", hikari.Locale.JA: "nihongo", hikari.Locale.TR: "no"}), @@ -811,7 +810,7 @@ def test_description_properties_when_localised_implicit_default(self): } assert command._descriptions.id is None - def test_description_properties_when_dict_without_localisations(self): + def test_description_properties_when_dict_without_localisations(self) -> None: command = stub_class( tanjun.commands.BaseSlashCommand, args=("meep", {"default": "ok girl boss", "id": "idididid"}) ) @@ -820,29 +819,29 @@ def test_description_properties_when_dict_without_localisations(self): assert command.description_localisations == {} assert command._descriptions.id == "idididid" - def test_is_dm_enabled_property(self): + def test_is_dm_enabled_property(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("hi", "no"), kwargs={"dm_enabled": False}) assert command.is_dm_enabled is False - def test_is_global_property(self): + def test_is_global_property(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("yeet", "No"), kwargs={"is_global": False}) assert command.is_global is False - def test_is_nsfw_property(self): + def test_is_nsfw_property(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("yeet", "No"), kwargs={"nsfw": True}) assert command.is_nsfw is True - def test_name_properties(self): + def test_name_properties(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("yee", "nsoosos")) assert command.name == "yee" assert command.name_localisations == {} assert command._names.id is None - def test_name_properties_when_localised(self): + def test_name_properties_when_localised(self) -> None: command = stub_class( tanjun.commands.BaseSlashCommand, args=( @@ -865,7 +864,7 @@ def test_name_properties_when_localised(self): } assert command._names.id == "43" - def test_name_properties_when_localised_implicit_default(self): + def test_name_properties_when_localised_implicit_default(self) -> None: command = stub_class( tanjun.commands.BaseSlashCommand, args=({hikari.Locale.HI: "hug", hikari.Locale.HR: "human eaters", hikari.Locale.KO: "kyoto"}, "o"), @@ -879,26 +878,26 @@ def test_name_properties_when_localised_implicit_default(self): } assert command._names.id is None - def test_name_properties_when_dict_without_localisations(self): + def test_name_properties_when_dict_without_localisations(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=({"default": "this_default", "id": "meep"}, "boop")) assert command.name == "this_default" assert command.name_localisations == {} assert command._names.id == "meep" - def test_parent_property(self): + def test_parent_property(self) -> None: mock_parent = mock.Mock() command = stub_class(tanjun.commands.BaseSlashCommand, args=("yee", "nsoosos")) assert command.set_parent(mock_parent).parent is mock_parent - def test_tracked_command_property(self): + def test_tracked_command_property(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("yee", "nsoosos")) mock_command = mock.Mock(hikari.SlashCommand) assert command.set_tracked_command(mock_command).tracked_command is mock_command - def test_tracked_command_id_property(self): + def test_tracked_command_id_property(self) -> None: command = stub_class(tanjun.commands.BaseSlashCommand, args=("yee", "nsoosos")) mock_command = mock.Mock(hikari.SlashCommand) @@ -906,7 +905,7 @@ def test_tracked_command_id_property(self): @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_check_context(self): + async def test_check_context(self) -> None: mock_callback = mock.Mock() mock_other_callback = mock.Mock() mock_context = mock.Mock() @@ -926,7 +925,7 @@ async def test_check_context(self): mock_context.set_command.assert_has_calls([mock.call(command), mock.call(None)]) @pytest.mark.skip(reason="TODO") - def test_copy(self): + def test_copy(self) -> None: mock_parent = mock.MagicMock() command = stub_class(tanjun.commands.BaseSlashCommand, args=("yee", "nsoosos")) @@ -936,7 +935,7 @@ def test_copy(self): assert isinstance(result, tanjun.commands.BaseSlashCommand) assert result.parent is mock_parent - def test_load_into_component_when_no_parent(self): + def test_load_into_component_when_no_parent(self) -> None: mock_component = mock.Mock() command = stub_class(tanjun.commands.BaseSlashCommand, args=("yee", "nsoosos")) @@ -946,14 +945,14 @@ def test_load_into_component_when_no_parent(self): class TestSlashCommandGroup: - def test_commands_property(self): + def test_commands_property(self) -> None: mock_command = mock.Mock() mock_other_command = mock.Mock() command = tanjun.SlashCommandGroup("yee", "nsoosos").add_command(mock_command).add_command(mock_other_command) assert list(command.commands) == [mock_command, mock_other_command] - def test_build(self): + def test_build(self) -> None: mock_command = mock.Mock(tanjun.abc.SlashCommand) mock_command_group = mock.Mock(tanjun.abc.SlashCommandGroup) command_group = ( @@ -1005,7 +1004,7 @@ def test_build(self): ) ) - def test_build_with_optional_fields(self): + def test_build_with_optional_fields(self) -> None: command_group = tanjun.SlashCommandGroup( "yee", "nsoosos", dm_enabled=False, default_member_permissions=hikari.Permissions(4321123), nsfw=True ) @@ -1017,7 +1016,7 @@ def test_build_with_optional_fields(self): assert result.is_nsfw is True assert result.options == [] - def test_build_with_localised_fields(self): + def test_build_with_localised_fields(self) -> None: command = tanjun.SlashCommand[typing.Any]( mock.Mock(), {hikari.Locale.EN_GB: "yeet", hikari.Locale.FI: "beat", "default": "shinji", hikari.Locale.JA: "ayanami"}, @@ -1042,7 +1041,7 @@ def test_build_with_localised_fields(self): hikari.Locale.EN_US: "meep meep", } - def test_build_with_localised_fields_and_implicit_default(self): + def test_build_with_localised_fields_and_implicit_default(self) -> None: command = tanjun.SlashCommand[typing.Any]( mock.Mock(), { @@ -1075,7 +1074,7 @@ def test_build_with_localised_fields_and_implicit_default(self): hikari.Locale.EN_US: "meep meep", } - def test_build_with_bound_component_field_inheritance(self): + def test_build_with_bound_component_field_inheritance(self) -> None: command_group = tanjun.SlashCommandGroup("yee", "nsoosos").bind_component( mock.Mock(default_app_cmd_permissions=hikari.Permissions(5412123), dms_enabled_for_app_cmds=True) ) @@ -1086,7 +1085,7 @@ def test_build_with_bound_component_field_inheritance(self): assert result.is_dm_enabled is True assert result.options == [] - def test_build_with_passed_component_field_inheritance(self): + def test_build_with_passed_component_field_inheritance(self) -> None: command_group = tanjun.SlashCommandGroup("yee", "nsoosos").bind_component( mock.Mock(default_app_cmd_permissions=hikari.Permissions(54312312), dms_enabled_for_app_cmds=True) ) @@ -1102,9 +1101,9 @@ def test_build_with_passed_component_field_inheritance(self): assert result.options == [] @pytest.mark.skip(reason="TODO") - def test_copy(self): ... + def test_copy(self) -> None: ... - def test_add_command(self): + def test_add_command(self) -> None: command_group = tanjun.SlashCommandGroup("yeet", "need") mock_command = mock.Mock() @@ -1114,7 +1113,7 @@ def test_add_command(self): mock_command.set_parent.assert_called_once_with(command_group) assert mock_command in command_group.commands - def test_add_command_when_too_many_commands(self): + def test_add_command_when_too_many_commands(self) -> None: command_group = tanjun.SlashCommandGroup("yeet", "need") mock_command = mock.Mock() @@ -1127,7 +1126,7 @@ def test_add_command_when_too_many_commands(self): mock_command.set_parent.assert_not_called() assert mock_command not in command_group.commands - def test_add_command_when_too_many_commands_when_name_already_present(self): + def test_add_command_when_too_many_commands_when_name_already_present(self) -> None: mock_command = mock.Mock() mock_command.name = "yeet" command_group = tanjun.SlashCommandGroup("yeet", "need").add_command(mock_command) @@ -1140,7 +1139,7 @@ def test_add_command_when_too_many_commands_when_name_already_present(self): mock_command.set_parent.assert_not_called() assert mock_command not in command_group.commands - def test_add_command_when_nested(self): + def test_add_command_when_nested(self) -> None: command_group = tanjun.SlashCommandGroup("yee", "nsoosos").set_parent(mock.Mock()) mock_sub_command = mock.Mock(tanjun.abc.SlashCommand) @@ -1150,13 +1149,13 @@ def test_add_command_when_nested(self): mock_sub_command.set_parent.assert_called_once_with(command_group) assert mock_sub_command in command_group.commands - def test_add_command_when_attempting_to_double_nest_groups(self): + def test_add_command_when_attempting_to_double_nest_groups(self) -> None: command_group = tanjun.SlashCommandGroup("yee", "nsoosos").set_parent(mock.Mock()) with pytest.raises(ValueError, match="Cannot add a slash command group to a nested slash command group"): command_group.add_command(mock.Mock(tanjun.abc.SlashCommandGroup)) - def test_as_sub_command(self): + def test_as_sub_command(self) -> None: async def mock_callback(ctx: tanjun.abc.SlashContext) -> None: raise NotImplementedError @@ -1173,7 +1172,7 @@ async def mock_callback(ctx: tanjun.abc.SlashContext) -> None: assert result._arg_names is not None assert result in command_group.commands - def test_as_sub_command_with_optional_args(self): + def test_as_sub_command_with_optional_args(self) -> None: async def mock_callback(ctx: tanjun.abc.SlashContext) -> None: raise NotImplementedError @@ -1197,7 +1196,7 @@ async def mock_callback(ctx: tanjun.abc.SlashContext) -> None: assert result._arg_names is None assert result in command_group.commands - def test_make_sub_group(self): + def test_make_sub_group(self) -> None: command_group = tanjun.SlashCommandGroup("nyaa", "yippe") result = command_group.make_sub_group("cats", "for life") @@ -1208,7 +1207,7 @@ def test_make_sub_group(self): assert result.defaults_to_ephemeral is None assert result in command_group.commands - def test_make_sub_group_with_optional_args(self): + def test_make_sub_group_with_optional_args(self) -> None: command_group = tanjun.SlashCommandGroup("nyaa", "yippe") result = command_group.make_sub_group("lovely", "cats", default_to_ephemeral=True) @@ -1219,7 +1218,7 @@ def test_make_sub_group_with_optional_args(self): assert result.defaults_to_ephemeral is True assert result in command_group.commands - def test_remove_command(self): + def test_remove_command(self) -> None: mock_sub_command = mock.Mock(tanjun.abc.SlashCommand) command_group = tanjun.SlashCommandGroup("yee", "nsoosos").set_parent(mock.Mock()).add_command(mock_sub_command) @@ -1228,7 +1227,7 @@ def test_remove_command(self): assert result is command_group assert mock_sub_command not in command_group.commands - def test_with_command(self): + def test_with_command(self) -> None: command_group = tanjun.SlashCommandGroup("yee", "nsoosos").set_parent(mock.Mock()) mock_sub_command = mock.Mock(tanjun.abc.SlashCommand) @@ -1238,7 +1237,7 @@ def test_with_command(self): assert mock_sub_command in command_group.commands @pytest.mark.asyncio - async def test_execute(self): + async def test_execute(self) -> None: mock_command = mock.AsyncMock(set_parent=mock.Mock(), defaults_to_ephemeral=None) mock_command.name = "sex" mock_command.check_context.return_value = True @@ -1256,7 +1255,7 @@ async def test_execute(self): mock_context.set_ephemeral_default.assert_not_called() @pytest.mark.asyncio - async def test_execute_when_sub_command_has_ephemeral_default_set(self): + async def test_execute_when_sub_command_has_ephemeral_default_set(self) -> None: mock_command = mock.AsyncMock(set_parent=mock.Mock(), defaults_to_ephemeral=True) mock_command.name = "sex" mock_command.check_context.return_value = True @@ -1274,7 +1273,7 @@ async def test_execute_when_sub_command_has_ephemeral_default_set(self): mock_context.set_ephemeral_default.assert_called_once_with(True) @pytest.mark.asyncio - async def test_execute_when_not_found(self): + async def test_execute_when_not_found(self) -> None: command_group = stub_class( tanjun.SlashCommandGroup, check_context=mock.AsyncMock(return_value=True), args=("yee", "nsoosos") ) @@ -1287,7 +1286,7 @@ async def test_execute_when_not_found(self): mock_context.set_ephemeral_default.assert_not_called() @pytest.mark.asyncio - async def test_execute_when_checks_fail(self): + async def test_execute_when_checks_fail(self) -> None: mock_command = mock.AsyncMock(set_parent=mock.Mock(), defaults_to_ephemeral=None) mock_command.name = "sex" mock_command.check_context.return_value = False @@ -1306,7 +1305,7 @@ async def test_execute_when_checks_fail(self): mock_context.set_ephemeral_default.assert_not_called() @pytest.mark.asyncio - async def test_execute_when_nested(self): + async def test_execute_when_nested(self) -> None: mock_command = mock.AsyncMock( check_context=mock.AsyncMock(return_value=True), set_parent=mock.Mock(), defaults_to_ephemeral=None ) @@ -1341,7 +1340,7 @@ def test___init___when_command_object( | tanjun.MessageCommand[tanjun.abc.CommandCallbackSig] | tanjun.MenuCommand[typing.Any, typing.Any] ), - ): + ) -> None: assert tanjun.SlashCommand(inner_command, "woow", "no").callback is inner_command.callback @pytest.fixture @@ -1352,7 +1351,7 @@ async def mock_command(ctx: tanjun.abc.SlashContext, **kwargs: str) -> None: ... return mock_command @pytest.mark.asyncio - async def test___call__(self): + async def test___call__(self) -> None: mock_callback = mock.AsyncMock() command = tanjun.SlashCommand[typing.Any](mock_callback, "yee", "nsoosos") @@ -1360,13 +1359,13 @@ async def test___call__(self): mock_callback.assert_awaited_once_with(1, 3, a=4, b=5) - def test_callback_property(self): + def test_callback_property(self) -> None: mock_callback = mock.Mock() command = tanjun.SlashCommand[typing.Any](mock_callback, "yee", "nsoosos") assert command.callback is mock_callback - def test_load_into_component(self, command: tanjun.SlashCommand[typing.Any]): + def test_load_into_component(self, command: tanjun.SlashCommand[typing.Any]) -> None: mock_component = mock.Mock() with mock.patch.object(tanjun.commands.BaseSlashCommand, "load_into_component") as load_into_component: @@ -1374,7 +1373,7 @@ def test_load_into_component(self, command: tanjun.SlashCommand[typing.Any]): load_into_component.assert_called_once_with(mock_component) - def test_load_into_component_when_wrapped_command_set(self, command: tanjun.SlashCommand[typing.Any]): + def test_load_into_component_when_wrapped_command_set(self, command: tanjun.SlashCommand[typing.Any]) -> None: mock_component = mock.Mock() mock_other_command = mock.Mock() command._wrapped_command = mock_other_command @@ -1386,7 +1385,9 @@ def test_load_into_component_when_wrapped_command_set(self, command: tanjun.Slas mock_other_command.load_into_component.assert_not_called() - def test_load_into_component_when_wrapped_command_is_loadable(self, command: tanjun.SlashCommand[typing.Any]): + def test_load_into_component_when_wrapped_command_is_loadable( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: mock_component = mock.Mock() mock_other_command = mock.Mock(tanjun.components.AbstractComponentLoader) command._wrapped_command = mock_other_command @@ -1398,7 +1399,7 @@ def test_load_into_component_when_wrapped_command_is_loadable(self, command: tan mock_other_command.load_into_component.assert_called_once_with(mock_component) - def test__add_option_when_no_signature(self): + def test__add_option_when_no_signature(self) -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -1406,45 +1407,45 @@ def test__add_option_when_no_signature(self): command.add_str_option("meow", "description").add_int_option("nom", "nom", key="no") - def test__add_option_when_kwargs(self): + def test__add_option_when_kwargs(self) -> None: @tanjun.as_slash_command("name", "description") - async def command(ctx: tanjun.abc.SlashContext, **kwargs: typing.Any): ... + async def command(ctx: tanjun.abc.SlashContext, **kwargs: typing.Any) -> None: ... command.add_str_option("meow", "description").add_int_option("nom", "nom", key="no") - def test__add_option_when_valid_name(self): + def test__add_option_when_valid_name(self) -> None: @tanjun.as_slash_command("name", "description") - async def command(ctx: tanjun.abc.SlashContext, meowth: str, bam: int): ... + async def command(ctx: tanjun.abc.SlashContext, meowth: str, bam: int) -> None: ... command.add_str_option("meowth", "description").add_int_option("bams", "bams", key="bam") - def test__add_option_when_invalid_key(self): + def test__add_option_when_invalid_key(self) -> None: @tanjun.as_slash_command("name", "description") - async def command(ctx: tanjun.abc.SlashContext, *args: str): ... + async def command(ctx: tanjun.abc.SlashContext, *args: str) -> None: ... with pytest.raises(ValueError, match=f"'meow' is not a valid keyword argument for {command.callback}"): command.add_str_option("meow", "description") - def test__add_option_when_invalid_overridden_key(self): + def test__add_option_when_invalid_overridden_key(self) -> None: @tanjun.as_slash_command("name", "description") - async def command(ctx: tanjun.abc.SlashContext, *args: str, meow: str): ... + async def command(ctx: tanjun.abc.SlashContext, *args: str, meow: str) -> None: ... with pytest.raises(ValueError, match=f"'yeet' is not a valid keyword argument for {command.callback}"): command.add_str_option("meow", "description", key="yeet") - def test__add_option_when_invalid_key_but_not_validating(self): + def test__add_option_when_invalid_key_but_not_validating(self) -> None: @tanjun.as_slash_command("name", "description", validate_arg_keys=False) - async def command(ctx: tanjun.abc.SlashContext): ... + async def command(ctx: tanjun.abc.SlashContext) -> None: ... command.add_str_option("name", "description") - def test__add_option_when_invalid_overriden_key_but_not_validating(self): + def test__add_option_when_invalid_overriden_key_but_not_validating(self) -> None: @tanjun.as_slash_command("name", "description", validate_arg_keys=False) - async def command(ctx: tanjun.abc.SlashContext, meow: str): ... + async def command(ctx: tanjun.abc.SlashContext, meow: str) -> None: ... command.add_str_option("meow", "description", key="pet") - def test_add_attachment_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_attachment_option("me", "ow", default="no attached", key="bbb") option = command.build().options[0] @@ -1469,7 +1470,7 @@ def test_add_attachment_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_attachment_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_attachment_option("nya", "aaaa") option = command.build().options[0] @@ -1495,7 +1496,7 @@ def test_add_attachment_option_with_defaults(self, command: tanjun.SlashCommand[ assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_attachment_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_attachment_option("me", "how", pass_as_kwarg=False) option = command.build().options[0] @@ -1506,7 +1507,7 @@ def test_add_attachment_option_when_not_pass_as_kwarg(self, command: tanjun.Slas assert option.type is hikari.OptionType.ATTACHMENT assert option.name not in command._tracked_options - def test_add_attachment_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_attachment_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -1533,7 +1534,7 @@ def test_add_attachment_option_with_localised_fields(self, command: tanjun.Slash def test_add_attachment_option_with_localised_explicit_default_and_id( self, command: tanjun.SlashCommand[typing.Any] - ): + ) -> None: command.add_attachment_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -1552,7 +1553,7 @@ def test_add_attachment_option_with_localised_explicit_default_and_id( @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_attachment_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -1560,23 +1561,29 @@ def test_add_attachment_option_with_localised_name_regex_mismatch( ): command.add_attachment_option({hikari.Locale.BG: name}, "description") - def test_add_attachment_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_attachment_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_attachment_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_with_localised_name_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_attachment_option({hikari.Locale.EL: ""}, "description") - def test_add_attachment_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_attachment_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_attachment_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_attachment_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_attachment_option("name", {hikari.Locale.IT: ""}) - def test_add_str_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: mock_converter = mock.Mock() command.add_str_option( "boom", @@ -1614,7 +1621,7 @@ def test_add_str_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_str_option_with_choices_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_choices_list(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("boom", "No u", choices=["video", "channel", "playlist"]) option = command.build().options[0] @@ -1625,7 +1632,7 @@ def test_add_str_option_with_choices_list(self, command: tanjun.SlashCommand[typ ] assert option.name in command._tracked_options - def test_add_str_option_with_choices_object_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_choices_object_list(self, command: tanjun.SlashCommand[typing.Any]) -> None: choice_1 = hikari.CommandChoice(name="ea", name_localizations={"a": "b"}, value="meow") choice_2 = hikari.CommandChoice(name="s", name_localizations={"a": "h"}, value="meowa") choice_3 = hikari.CommandChoice(name="f", name_localizations={"a": "bf"}, value="mesow") @@ -1635,7 +1642,7 @@ def test_add_str_option_with_choices_object_list(self, command: tanjun.SlashComm assert option.choices == [choice_1, choice_2, choice_3] assert option.name in command._tracked_options - def test_add_str_option_with_deprecated_choices_tuple_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_deprecated_choices_tuple_list(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.warns(DeprecationWarning): command.add_str_option( "boom", @@ -1652,7 +1659,7 @@ def test_add_str_option_with_deprecated_choices_tuple_list(self, command: tanjun ] assert option.name in command._tracked_options - def test_add_str_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("boom", "No u") option = command.build().options[0] @@ -1677,7 +1684,7 @@ def test_add_str_option_with_defaults(self, command: tanjun.SlashCommand[typing. assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_str_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("hi", "Nou", pass_as_kwarg=False) option = command.build().options[0] @@ -1687,7 +1694,7 @@ def test_add_str_option_when_not_pass_as_kwarg(self, command: tanjun.SlashComman assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_str_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -1695,89 +1702,97 @@ def test_add_str_option_with_invalid_name(self, name: str, command: tanjun.Slash ): command.add_str_option(name, "aye") - def test_add_str_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'BeBooBp' must be lowercase"): command.add_str_option("BeBooBp", "aye") - def test_add_str_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_str_option("boi", "a" * 101) - def test_add_str_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_str_option("boi", "") - def test_add_str_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_str_option("x" * 33, "description") - def test_add_str_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_str_option("", "description") - def test_add_str_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_str_option("namae", "aye") - def test_add_str_option_with_too_many_choices(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_too_many_choices(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Slash command options cannot have more than 25 choices"): command.add_str_option("namae", "aye", choices={mock.Mock(): mock.Mock() for _ in range(26)}) - def test_add_str_option_when_min_length_is_greater_than_max_length(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_min_length_is_greater_than_max_length( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="`min_length` cannot be greater than `max_length`"): command.add_str_option("a", "b", min_length=434, max_length=432) - def test_add_str_option_when_min_length_is_equal_to_max_length(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_min_length_is_equal_to_max_length( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_str_option("beat", "yeet", min_length=43, max_length=43) option = command.build().options[0] assert option.min_length == 43 assert option.max_length == 43 - def test_add_str_option_when_min_length_is_less_than_0(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_min_length_is_less_than_0(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="`min_length` must be greater than or equal to 0"): command.add_str_option("bb", "aa", min_length=-1) - def test_add_str_option_when_min_length_is_0(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_min_length_is_0(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("bb", "aa", min_length=0) option = command.build().options[0] assert option.min_length == 0 - def test_add_str_option_when_min_length_is_greater_than_6000(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_min_length_is_greater_than_6000( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="`min_length` must be less than or equal to 6000"): command.add_str_option("bbbb", "aaa", min_length=6001) - def test_add_str_option_when_min_length_is_6000(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_min_length_is_6000(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("bb", "aa", min_length=6000) option = command.build().options[0] assert option.min_length == 6000 - def test_add_str_option_when_max_length_is_less_than_1(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_max_length_is_less_than_1(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="`max_length` must be greater than or equal to 1"): command.add_str_option("bbbbbb", "aaaa", max_length=0) - def test_add_str_option_when_max_length_is_0(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_max_length_is_0(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("bb", "aa", min_length=0) option = command.build().options[0] assert option.min_length == 0 - def test_add_str_option_when_max_length_is_greater_than_6000(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_max_length_is_greater_than_6000( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="`max_length` must be less than or equal to 6000"): command.add_str_option("bbbbbbbbb", "aaaaaa", max_length=6001) - def test_add_str_option_when_max_length_is_6000(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_max_length_is_6000(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option("bb", "aa", max_length=6000) option = command.build().options[0] assert option.max_length == 6000 - def test_add_str_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_str_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -1802,7 +1817,9 @@ def test_add_str_option_with_localised_fields(self, command: tanjun.SlashCommand } assert option.type is hikari.OptionType.STRING - def test_add_str_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_str_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -1821,7 +1838,7 @@ def test_add_str_option_with_localised_explicit_default_and_id(self, command: ta @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_str_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -1829,23 +1846,25 @@ def test_add_str_option_with_localised_name_regex_mismatch( ): command.add_str_option({hikari.Locale.EN_GB: name}, "description") - def test_add_str_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_str_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_str_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_str_option({hikari.Locale.EL: ""}, "description") - def test_add_str_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_str_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_str_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_str_option("name", {hikari.Locale.IT: ""}) - def test_add_str_option_when_converters_is_flat_enum(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_str_option_when_converters_is_flat_enum(self, command: tanjun.SlashCommand[typing.Any]) -> None: class Enum(str, enum.Enum): FOO = "i can't" BAR = "meow" @@ -1855,7 +1874,7 @@ class Enum(str, enum.Enum): assert list(command._tracked_options["boom"].converters) == [Enum] - def test_add_int_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: mock_converter = mock.Mock() command.add_int_option( @@ -1882,7 +1901,7 @@ def test_add_int_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_int_option_with_min_and_max_value(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_min_and_max_value(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_int_option("sesese", "asasasa", min_value=123321, max_value=6451231) option = command.build().options[0] @@ -1900,11 +1919,11 @@ def test_add_int_option_with_min_and_max_value(self, command: tanjun.SlashComman assert option.name in command._tracked_options - def test_add_int_option_when_min_greater_than_max(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_min_greater_than_max(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="`min_value` cannot be greater than `max_value`"): command.add_int_option("sesese", "asasasa", min_value=33232, max_value=2232) - def test_add_int_option_with_deprecated_choices_tuple_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_deprecated_choices_tuple_list(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.warns(DeprecationWarning): command.add_int_option("see", "seesee", choices=[("les", 1), ("g", 43)]) # type: ignore @@ -1912,7 +1931,7 @@ def test_add_int_option_with_deprecated_choices_tuple_list(self, command: tanjun assert option.choices == [hikari.CommandChoice(name="les", value=1), hikari.CommandChoice(name="g", value=43)] assert option.name in command._tracked_options - def test_add_int_option_with_choices_object_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_choices_object_list(self, command: tanjun.SlashCommand[typing.Any]) -> None: choice_1 = hikari.CommandChoice(name="a", name_localizations={"b": "c"}, value="d") choice_2 = hikari.CommandChoice(name="e", name_localizations={"f": "g"}, value="h") choice_3 = hikari.CommandChoice(name="i", name_localizations={"j": "k"}, value="l") @@ -1923,7 +1942,7 @@ def test_add_int_option_with_choices_object_list(self, command: tanjun.SlashComm assert option.choices == [choice_1, choice_2, choice_3] assert option.name in command._tracked_options - def test_add_int_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_int_option("e", "a") option = command.build().options[0] @@ -1946,7 +1965,7 @@ def test_add_int_option_with_defaults(self, command: tanjun.SlashCommand[typing. assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_int_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_int_option("hiu", "Nouu", pass_as_kwarg=False) option = command.build().options[0] @@ -1956,7 +1975,7 @@ def test_add_int_option_when_not_pass_as_kwarg(self, command: tanjun.SlashComman assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_int_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -1964,38 +1983,38 @@ def test_add_int_option_with_invalid_name(self, name: str, command: tanjun.Slash ): command.add_int_option(name, "aye") - def test_add_int_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'YAWN' must be lowercase"): command.add_int_option("YAWN", "aye") - def test_add_int_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_int_option("boi", "a" * 101) - def test_add_int_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_int_option("eep", "") - def test_add_int_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_int_option("x" * 33, "description") - def test_add_int_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_int_option("", "description") - def test_add_int_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_int_option("namae", "aye") - def test_add_int_option_with_too_many_choices(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_too_many_choices(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Slash command options cannot have more than 25 choices"): command.add_int_option("namae", "aye", choices={mock.Mock(): mock.Mock() for _ in range(26)}) - def test_add_int_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_int_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -2020,7 +2039,9 @@ def test_add_int_option_with_localised_fields(self, command: tanjun.SlashCommand } assert option.type is hikari.OptionType.INTEGER - def test_add_int_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_int_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -2039,7 +2060,7 @@ def test_add_int_option_with_localised_explicit_default_and_id(self, command: ta @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_int_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2047,23 +2068,25 @@ def test_add_int_option_with_localised_name_regex_mismatch( ): command.add_int_option({hikari.Locale.DE: name}, "description") - def test_add_int_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_int_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_int_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_int_option({hikari.Locale.EL: ""}, "description") - def test_add_int_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_int_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_int_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_int_option("name", {hikari.Locale.IT: ""}) - def test_add_int_option_when_converters_is_flat_enum(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_int_option_when_converters_is_flat_enum(self, command: tanjun.SlashCommand[typing.Any]) -> None: class Enum(int, enum.Enum): THERE_IS_NO = 543 THERE_IS_YES = 123123 @@ -2072,7 +2095,7 @@ class Enum(int, enum.Enum): assert list(command._tracked_options["see"].converters) == [Enum] - def test_add_float_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: mock_converter = mock.Mock() command.add_float_option( "sesese", "asasasa", choices={"no": 4.4, "ok": 6.9}, converters=[mock_converter], default="eaf", key="meow" @@ -2101,7 +2124,7 @@ def test_add_float_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is True assert tracked.is_only_member is False - def test_add_float_option_with_min_and_max_value(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_min_and_max_value(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_float_option("sesese", "asasasa", min_value=5213.123, max_value=6523.123) option = command.build().options[0] @@ -2119,7 +2142,9 @@ def test_add_float_option_with_min_and_max_value(self, command: tanjun.SlashComm assert option.name in command._tracked_options - def test_add_float_option_when_ints_passed_for_min_and_max_value(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_ints_passed_for_min_and_max_value( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_float_option("sesese", "asasasa", min_value=3543, max_value=54123) option = command.build().options[0] @@ -2137,11 +2162,11 @@ def test_add_float_option_when_ints_passed_for_min_and_max_value(self, command: assert option.name in command._tracked_options - def test_add_float_option_when_min_greater_than_max(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_min_greater_than_max(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="`min_value` cannot be greater than `max_value`"): command.add_float_option("sesese", "asasasa", min_value=333.222, max_value=222.333) - def test_add_float_option_with_choices_object_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_choices_object_list(self, command: tanjun.SlashCommand[typing.Any]) -> None: choice_1 = hikari.CommandChoice(name="g", name_localizations={"g": "d", "e": "o"}, value="o") choice_2 = hikari.CommandChoice(name="t", name_localizations={"d": "g", "ed": "os"}, value="for") choice_3 = hikari.CommandChoice(name="s", name_localizations={"f": "g", "a": "od"}, value="go") @@ -2151,7 +2176,9 @@ def test_add_float_option_with_choices_object_list(self, command: tanjun.SlashCo assert option.choices == [choice_1, choice_2, choice_3] assert option.name in command._tracked_options - def test_add_float_option_with_deprecated_choices_tuple_list(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_deprecated_choices_tuple_list( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.warns(DeprecationWarning): command.add_float_option("easy", "aaa", choices=[("blam", 4.20), ("blam2", 6.9)]) # type: ignore @@ -2162,7 +2189,7 @@ def test_add_float_option_with_deprecated_choices_tuple_list(self, command: tanj ] assert option.name in command._tracked_options - def test_add_float_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_float_option("easy", "aaa") option = command.build().options[0] @@ -2185,7 +2212,7 @@ def test_add_float_option_with_defaults(self, command: tanjun.SlashCommand[typin assert tracked.is_always_float is True assert tracked.is_only_member is False - def test_add_float_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_float_option("123", "321", pass_as_kwarg=False) option = command.build().options[0] @@ -2195,7 +2222,7 @@ def test_add_float_option_when_not_pass_as_kwarg(self, command: tanjun.SlashComm assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_float_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2203,38 +2230,38 @@ def test_add_float_option_with_invalid_name(self, name: str, command: tanjun.Sla ): command.add_float_option(name, "aye") - def test_add_float_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'Bloop' must be lowercase"): command.add_float_option("Bloop", "aye") - def test_add_float_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_float_option("boi", "a" * 101) - def test_add_float_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_float_option("eep", "") - def test_add_float_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_float_option("x" * 33, "description") - def test_add_float_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_float_option("", "description") - def test_add_float_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_float_option("namae", "aye") - def test_add_float_option_with_too_many_choices(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_too_many_choices(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Slash command options cannot have more than 25 choices"): command.add_float_option("namae", "aye", choices={mock.Mock(): mock.Mock() for _ in range(26)}) - def test_add_float_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_float_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -2259,7 +2286,9 @@ def test_add_float_option_with_localised_fields(self, command: tanjun.SlashComma } assert option.type is hikari.OptionType.FLOAT - def test_add_float_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_float_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -2278,7 +2307,7 @@ def test_add_float_option_with_localised_explicit_default_and_id(self, command: @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_float_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2286,23 +2315,27 @@ def test_add_float_option_with_localised_name_regex_mismatch( ): command.add_float_option({hikari.Locale.FI: name}, "description") - def test_add_float_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_float_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_float_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_float_option({hikari.Locale.EL: ""}, "description") - def test_add_float_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_float_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_float_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_float_option("name", {hikari.Locale.IT: ""}) - def test_add_float_option_when_converters_is_flat_enum(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_float_option_when_converters_is_flat_enum(self, command: tanjun.SlashCommand[typing.Any]) -> None: class Enum(enum.Enum): MEOW = 431.123 NYAA = 3243.543 @@ -2311,7 +2344,7 @@ class Enum(enum.Enum): assert list(command._tracked_options["sesese"].converters) == [Enum] - def test_add_bool_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_bool_option("eaassa", "saas", default="feel", key="o") option = command.build().options[0] @@ -2334,7 +2367,7 @@ def test_add_bool_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_bool_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_bool_option("essssss", "aaaaaaa") option = command.build().options[0] @@ -2357,7 +2390,7 @@ def test_add_bool_option_with_defaults(self, command: tanjun.SlashCommand[typing assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_bool_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_bool_option("222", "333", pass_as_kwarg=False) option = command.build().options[0] @@ -2367,7 +2400,7 @@ def test_add_bool_option_when_not_pass_as_kwarg(self, command: tanjun.SlashComma assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_bool_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2375,34 +2408,34 @@ def test_add_bool_option_with_invalid_name(self, name: str, command: tanjun.Slas ): command.add_bool_option(name, "aye") - def test_add_bool_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'SNOOO' must be lowercase"): command.add_bool_option("SNOOO", "aye") - def test_add_bool_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_bool_option("boi", "a" * 101) - def test_add_bool_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_bool_option("boi", "") - def test_add_bool_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_bool_option("x" * 33, "description") - def test_add_bool_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_bool_option("", "description") - def test_add_bool_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_bool_option("namae", "aye") - def test_add_bool_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_bool_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -2427,7 +2460,9 @@ def test_add_bool_option_with_localised_fields(self, command: tanjun.SlashComman } assert option.type is hikari.OptionType.BOOLEAN - def test_add_bool_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_bool_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -2446,7 +2481,7 @@ def test_add_bool_option_with_localised_explicit_default_and_id(self, command: t @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_bool_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2454,23 +2489,27 @@ def test_add_bool_option_with_localised_name_regex_mismatch( ): command.add_bool_option({hikari.Locale.SV_SE: name}, "description") - def test_add_bool_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_bool_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_bool_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_bool_option({hikari.Locale.EL: ""}, "description") - def test_add_bool_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_bool_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_bool_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_bool_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_bool_option("name", {hikari.Locale.IT: ""}) - def test_add_user_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_user_option("yser", "nanm", default="nou", key="oh") option = command.build().options[0] @@ -2493,7 +2532,7 @@ def test_add_user_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_user_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_user_option("fafafa", "sfsfsf") option = command.build().options[0] @@ -2516,7 +2555,7 @@ def test_add_user_option_with_defaults(self, command: tanjun.SlashCommand[typing assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_user_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_user_option("eee", "333", pass_as_kwarg=False) option = command.build().options[0] @@ -2526,7 +2565,7 @@ def test_add_user_option_when_not_pass_as_kwarg(self, command: tanjun.SlashComma assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_user_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2534,34 +2573,34 @@ def test_add_user_option_with_invalid_name(self, name: str, command: tanjun.Slas ): command.add_user_option(name, "aye") - def test_add_user_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'WWWWWWWWWWW' must be lowercase"): command.add_user_option("WWWWWWWWWWW", "aye") - def test_add_user_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_user_option("boi", "a" * 101) - def test_add_user_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_user_option("boi", "") - def test_add_user_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_user_option("x" * 33, "description") - def test_add_user_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_user_option("", "description") - def test_add_user_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_user_option("namae", "aye") - def test_add_user_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_user_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -2586,7 +2625,9 @@ def test_add_user_option_with_localised_fields(self, command: tanjun.SlashComman } assert option.type is hikari.OptionType.USER - def test_add_user_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_user_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -2605,7 +2646,7 @@ def test_add_user_option_with_localised_explicit_default_and_id(self, command: t @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_user_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2613,23 +2654,27 @@ def test_add_user_option_with_localised_name_regex_mismatch( ): command.add_user_option({hikari.Locale.BG: name}, "description") - def test_add_user_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_user_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_user_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_user_option({hikari.Locale.EL: ""}, "description") - def test_add_user_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_user_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_user_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_user_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_user_option("name", {hikari.Locale.IT: ""}) - def test_add_member_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_member_option("ddddd", "sssss", default="dsasds", key="key2") option = command.build().options[0] @@ -2652,7 +2697,7 @@ def test_add_member_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is True - def test_add_member_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_member_option("asasas", "fdssdddsds") option = command.build().options[0] @@ -2676,7 +2721,7 @@ def test_add_member_option_with_defaults(self, command: tanjun.SlashCommand[typi assert tracked.is_only_member is True @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_member_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2684,34 +2729,34 @@ def test_add_member_option_with_invalid_name(self, name: str, command: tanjun.Sl ): command.add_member_option(name, "aye") - def test_add_member_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'YEET' must be lowercase"): command.add_member_option("YEET", "aye") - def test_add_member_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_member_option("boi", "a" * 101) - def test_add_member_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_member_option("boi", "") - def test_add_member_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_member_option("x" * 33, "description") - def test_add_member_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_member_option("", "description") - def test_add_member_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_member_option("namae", "aye") - def test_add_member_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_member_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -2738,7 +2783,9 @@ def test_add_member_option_with_localised_fields(self, command: tanjun.SlashComm assert command._tracked_options[option.name].is_only_member is True - def test_add_member_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_member_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -2759,7 +2806,7 @@ def test_add_member_option_with_localised_explicit_default_and_id(self, command: @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_member_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2767,23 +2814,27 @@ def test_add_member_option_with_localised_name_regex_mismatch( ): command.add_member_option({hikari.Locale.FR: name}, "description") - def test_add_member_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_member_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_member_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_member_option({hikari.Locale.EL: ""}, "description") - def test_add_member_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_member_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_member_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_member_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_member_option("name", {hikari.Locale.IT: ""}) - def test_add_channel_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_channel_option("c", "d", default="eee", key="eep") option = command.build().options[0] @@ -2806,7 +2857,7 @@ def test_add_channel_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_channel_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_channel_option("channel", "chaaa") option = command.build().options[0] @@ -2877,18 +2928,18 @@ def test_add_channel_option_types_behaviour( command: tanjun.SlashCommand[typing.Any], classes: list[type[hikari.PartialChannel] | int], int_types: list[int] | None, - ): + ) -> None: command.add_channel_option("channel", "chaaa", types=classes) option = command.build().options[0] assert set(option.channel_types or ()) == set(int_types or ()) assert len(option.channel_types or ()) == len(int_types or ()) - def test_add_channel_option_with_invalid_type(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_invalid_type(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Unknown channel type "): command.add_channel_option("channel", "chaaa", types=(bool,)) # type: ignore - def test_add_channel_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_channel_option("dsds", "www", pass_as_kwarg=False) option = command.build().options[0] @@ -2898,7 +2949,7 @@ def test_add_channel_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCo assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_channel_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2906,34 +2957,34 @@ def test_add_channel_option_with_invalid_name(self, name: str, command: tanjun.S ): command.add_channel_option(name, "aye") - def test_add_channel_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'MeOw' must be lowercase"): command.add_channel_option("MeOw", "aye") - def test_add_channel_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_channel_option("boi", "a" * 101) - def test_add_channel_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_channel_option("boi", "") - def test_add_channel_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_channel_option("x" * 33, "description") - def test_add_channel_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_channel_option("", "description") - def test_add_channel_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_channel_option("namae", "aye") - def test_add_channel_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_channel_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -2958,7 +3009,9 @@ def test_add_channel_option_with_localised_fields(self, command: tanjun.SlashCom } assert option.type is hikari.OptionType.CHANNEL - def test_add_channel_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_channel_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -2977,7 +3030,7 @@ def test_add_channel_option_with_localised_explicit_default_and_id(self, command @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_channel_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -2985,23 +3038,27 @@ def test_add_channel_option_with_localised_name_regex_mismatch( ): command.add_channel_option({hikari.Locale.KO: name}, "description") - def test_add_channel_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_channel_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_channel_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_channel_option({hikari.Locale.EL: ""}, "description") - def test_add_channel_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_channel_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_channel_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_channel_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_channel_option("name", {hikari.Locale.IT: ""}) - def test_add_role_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_role_option("jhjh", "h", default="shera", key="catra") option = command.build().options[0] @@ -3024,7 +3081,7 @@ def test_add_role_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_role_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_role_option("hhhhh", "h") option = command.build().options[0] @@ -3047,7 +3104,7 @@ def test_add_role_option_with_defaults(self, command: tanjun.SlashCommand[typing assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_role_option_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_role_option("22222", "ddddd", pass_as_kwarg=False) option = command.build().options[0] @@ -3057,7 +3114,7 @@ def test_add_role_option_option_when_not_pass_as_kwarg(self, command: tanjun.Sla assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_role_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -3065,34 +3122,34 @@ def test_add_role_option_with_invalid_name(self, name: str, command: tanjun.Slas ): command.add_role_option(name, "aye") - def test_add_role_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'MeeP' must be lowercase"): command.add_role_option("MeeP", "aye") - def test_add_role_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_role_option("boi", "a" * 101) - def test_add_role_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_role_option("boi", "") - def test_add_role_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_role_option("x" * 33, "description") - def test_add_role_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_role_option("", "description") - def test_add_role_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_role_option("namae", "aye") - def test_add_role_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_role_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -3117,7 +3174,9 @@ def test_add_role_option_with_localised_fields(self, command: tanjun.SlashComman } assert option.type is hikari.OptionType.ROLE - def test_add_role_option_with_localised_explicit_default_and_id(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_localised_explicit_default_and_id( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_role_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -3136,7 +3195,7 @@ def test_add_role_option_with_localised_explicit_default_and_id(self, command: t @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_role_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -3144,23 +3203,27 @@ def test_add_role_option_with_localised_name_regex_mismatch( ): command.add_role_option({hikari.Locale.EL: name}, "description") - def test_add_role_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_role_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_role_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_role_option({hikari.Locale.EL: ""}, "description") - def test_add_role_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_role_option("name", {hikari.Locale.EN_US: "y" * 101}) - def test_add_role_option_with_localised_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_role_option_with_localised_description_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_role_option("name", {hikari.Locale.IT: ""}) - def test_add_mentionable_option(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_mentionable_option("単純", "iwi", default="ywy", key="neko") option = command.build().options[0] @@ -3183,7 +3246,7 @@ def test_add_mentionable_option(self, command: tanjun.SlashCommand[typing.Any]): assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_mentionable_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_with_defaults(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_mentionable_option("shera-ra", "hhh") option = command.build().options[0] @@ -3206,7 +3269,9 @@ def test_add_mentionable_option_with_defaults(self, command: tanjun.SlashCommand assert tracked.is_always_float is False assert tracked.is_only_member is False - def test_add_mentionable_option_option_when_not_pass_as_kwarg(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_option_when_not_pass_as_kwarg( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: command.add_mentionable_option("333ww", "dsdsds", pass_as_kwarg=False) option = command.build().options[0] @@ -3216,7 +3281,9 @@ def test_add_mentionable_option_option_when_not_pass_as_kwarg(self, command: tan assert option.name not in command._tracked_options @pytest.mark.parametrize("name", _INVALID_NAMES) - def test_add_mentionable_option_with_invalid_name(self, name: str, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_with_invalid_name( + self, name: str, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -3224,34 +3291,34 @@ def test_add_mentionable_option_with_invalid_name(self, name: str, command: tanj ): command.add_mentionable_option(name, "aye") - def test_add_mentionable_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_when_name_isnt_lowercase(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Invalid name provided, 'Sharlette' must be lowercase"): command.add_mentionable_option("Sharlette", "aye") - def test_add_mentionable_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_when_description_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_mentionable_option("boi", "a" * 101) - def test_add_mentionable_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_when_description_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_mentionable_option("boi", "") - def test_add_mentionable_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_when_name_too_long(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_mentionable_option("x" * 33, "description") - def test_add_mentionable_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_when_name_too_short(self, command: tanjun.SlashCommand[typing.Any]) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_mentionable_option("", "description") - def test_add_mentionable_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_when_too_many_options(self, command: tanjun.SlashCommand[typing.Any]) -> None: for index in range(25): command.add_str_option(str(index), str(index)) with pytest.raises(ValueError, match="Slash commands cannot have more than 25 options"): command.add_mentionable_option("namae", "aye") - def test_add_mentionable_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_with_localised_fields(self, command: tanjun.SlashCommand[typing.Any]) -> None: command.add_mentionable_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", hikari.Locale.EN_US: "bungus"}, { @@ -3278,7 +3345,7 @@ def test_add_mentionable_option_with_localised_fields(self, command: tanjun.Slas def test_add_mentionable_option_with_localised_explicit_default_and_id( self, command: tanjun.SlashCommand[typing.Any] - ): + ) -> None: command.add_mentionable_option( {hikari.Locale.EN_GB: "meep", hikari.Locale.DE: "moop", "default": "bungus"}, {hikari.Locale.DA: "description girl", "default": "meep meep", hikari.Locale.FI: "finished for the cats"}, @@ -3297,7 +3364,7 @@ def test_add_mentionable_option_with_localised_explicit_default_and_id( @pytest.mark.parametrize("name", _INVALID_NAMES) def test_add_mentionable_option_with_localised_name_regex_mismatch( self, command: tanjun.SlashCommand[typing.Any], name: str - ): + ) -> None: with pytest.raises( ValueError, match=f"Invalid name provided, {name!r} doesn't match the required regex " @@ -3305,36 +3372,42 @@ def test_add_mentionable_option_with_localised_name_regex_mismatch( ): command.add_mentionable_option({hikari.Locale.BG: name}, "description") - def test_add_mentionable_option_with_localised_name_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_with_localised_name_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Name must be less than or equal to 32 characters in length"): command.add_mentionable_option({hikari.Locale.KO: "xy3" * 11}, "description") - def test_add_mentionable_option_with_localised_name_too_short(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_with_localised_name_too_short( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Name must be greater than or equal to 1 characters in length"): command.add_mentionable_option({hikari.Locale.EL: ""}, "description") - def test_add_mentionable_option_with_localised_description_too_long(self, command: tanjun.SlashCommand[typing.Any]): + def test_add_mentionable_option_with_localised_description_too_long( + self, command: tanjun.SlashCommand[typing.Any] + ) -> None: with pytest.raises(ValueError, match="Description must be less than or equal to 100 characters in length"): command.add_mentionable_option("name", {hikari.Locale.EN_US: "y" * 101}) def test_add_mentionable_option_with_localised_description_too_short( self, command: tanjun.SlashCommand[typing.Any] - ): + ) -> None: with pytest.raises(ValueError, match="Description must be greater than or equal to 1 characters in length"): command.add_mentionable_option("name", {hikari.Locale.IT: ""}) @pytest.mark.skip(reason="TODO") - def test_build(self): ... + def test_build(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_build_with_localised_fields(self): ... + def test_build_with_localised_fields(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_build_with_localised_fields_and_implicit_default(self): ... + def test_build_with_localised_fields_and_implicit_default(self) -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_execute(self): ... + async def test_execute(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_copy(self): ... + def test_copy(self) -> None: ... diff --git a/tests/context/__init__.py b/tests/context/__init__.py index 279f959a8..0b621117b 100644 --- a/tests/context/__init__.py +++ b/tests/context/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tests/context/test_autocomplete.py b/tests/context/test_autocomplete.py index b279c6300..903f65ef0 100644 --- a/tests/context/test_autocomplete.py +++ b/tests/context/test_autocomplete.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -59,29 +58,29 @@ def context( def test_author_property( self, context: tanjun.context.AutocompleteContext, mock_interaction: hikari.AutocompleteInteraction - ): + ) -> None: assert context.author is mock_interaction.user def test_channel_id_property( self, context: tanjun.context.AutocompleteContext, mock_interaction: hikari.AutocompleteInteraction - ): + ) -> None: assert context.channel_id is mock_interaction.channel_id - def test_cache_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_cache_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.cache is mock_client.cache - def test_client_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_client_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.client is mock_client def test_created_at_property( self, context: tanjun.context.AutocompleteContext, mock_interaction: hikari.AutocompleteInteraction - ): + ) -> None: assert context.created_at is mock_interaction.created_at - def test_events_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_events_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.events is mock_client.events - def test_focused_property(self): + def test_focused_property(self) -> None: focused_option = mock.Mock(is_focused=True) mock_interaction = mock.Mock(options=[mock.Mock(is_focused=False), focused_option, mock.Mock(is_focused=False)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction) @@ -90,18 +89,18 @@ def test_focused_property(self): def test_guild_id_property( self, context: tanjun.context.AutocompleteContext, mock_interaction: hikari.AutocompleteInteraction - ): + ) -> None: assert context.guild_id is mock_interaction.guild_id def test_member_property( self, context: tanjun.context.AutocompleteContext, mock_interaction: hikari.AutocompleteInteraction - ): + ) -> None: assert context.member is mock_interaction.member - def test_server_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_server_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.server is mock_client.server - def test_rest_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_rest_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.rest is mock_client.rest def test_shard_property( @@ -109,7 +108,7 @@ def test_shard_property( context: tanjun.context.AutocompleteContext, mock_client: mock.Mock, mock_interaction: hikari.AutocompleteInteraction, - ): + ) -> None: mock_shard = mock.Mock() mock_client.shards = mock.MagicMock(spec=traits.ShardAware, shard_count=5, shards={2: mock_shard}) mock_interaction.guild_id = hikari.Snowflake(123321123312) @@ -121,33 +120,33 @@ def test_shard_property_when_dm( context: tanjun.context.AutocompleteContext, mock_client: mock.Mock, mock_interaction: hikari.AutocompleteInteraction, - ): + ) -> None: mock_shard = mock.Mock() mock_client.shards = mock.Mock(shards={0: mock_shard}) mock_interaction.guild_id = None assert context.shard is mock_shard - def test_shard_property_when_no_shards(self, context: tanjun.context.AutocompleteContext): + def test_shard_property_when_no_shards(self, context: tanjun.context.AutocompleteContext) -> None: context._tanjun_client = mock.Mock(shards=None) assert context.shard is None - def test_shards_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_shards_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.shards is mock_client.shards - def test_voice_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client): + def test_voice_property(self, context: tanjun.context.AutocompleteContext, mock_client: tanjun.Client) -> None: assert context.voice is mock_client.voice - def test_has_responded_property(self, context: tanjun.context.AutocompleteContext): + def test_has_responded_property(self, context: tanjun.context.AutocompleteContext) -> None: assert context.has_responded is False def test_interaction_property( self, context: tanjun.context.AutocompleteContext, mock_interaction: hikari.AutocompleteInteraction - ): + ) -> None: assert context.interaction is mock_interaction - def test_options_property(self): + def test_options_property(self) -> None: mock_option_1 = mock.Mock() mock_option_1.name = "hi" mock_option_2 = mock.Mock() @@ -160,7 +159,7 @@ def test_options_property(self): assert context.options == {"hi": mock_option_1, "bye": mock_option_2, "yoda": mock_option_3} - def test_options_property_for_top_level_command(self, mock_client: mock.Mock): + def test_options_property_for_top_level_command(self, mock_client: mock.Mock) -> None: mock_option_1 = mock.Mock(focused=True) mock_option_1.name = "hi" mock_option_2 = mock.Mock() @@ -176,7 +175,7 @@ def test_options_property_for_top_level_command(self, mock_client: mock.Mock): assert context.options["bye"].value is mock_option_2.value assert context.options["bye"].name is mock_option_2.name - def test_options_property_for_command_group(self, mock_client: mock.Mock): + def test_options_property_for_command_group(self, mock_client: mock.Mock) -> None: mock_option_1 = mock.Mock(focused=True) mock_option_1.name = "kachow" mock_option_2 = mock.Mock() @@ -195,7 +194,7 @@ def test_options_property_for_command_group(self, mock_client: mock.Mock): assert context.options["nyaa"].value is mock_option_2.value assert context.options["nyaa"].name is mock_option_2.name - def test_options_property_for_sub_command_group(self, mock_client: mock.Mock): + def test_options_property_for_sub_command_group(self, mock_client: mock.Mock) -> None: mock_option_1 = mock.Mock(focused=True) mock_option_1.name = "meow" mock_option_2 = mock.Mock() @@ -217,10 +216,10 @@ def test_options_property_for_sub_command_group(self, mock_client: mock.Mock): def test_triggering_name_property_for_top_level_command( self, context: tanjun.context.autocomplete.AutocompleteContext - ): + ) -> None: assert context.triggering_name is context.interaction.command_name - def test_triggering_name_property_for_sub_command(self, mock_client: mock.Mock): + def test_triggering_name_property_for_sub_command(self, mock_client: mock.Mock) -> None: group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=[mock.Mock(focused=True)]) group_option.name = "daniel" context = tanjun.context.AutocompleteContext( @@ -229,7 +228,7 @@ def test_triggering_name_property_for_sub_command(self, mock_client: mock.Mock): assert context.triggering_name == "damn daniel" - def test_triggering_name_property_for_sub_sub_command(self, mock_client: mock.Mock): + def test_triggering_name_property_for_sub_sub_command(self, mock_client: mock.Mock) -> None: sub_group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=[mock.Mock(focused=True)]) sub_group_option.name = "nyaa" group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND_GROUP, options=[sub_group_option]) @@ -241,7 +240,9 @@ def test_triggering_name_property_for_sub_sub_command(self, mock_client: mock.Mo assert context.triggering_name == "meow xes nyaa" @pytest.mark.asyncio - async def test_fetch_channel(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock): + async def test_fetch_channel( + self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock + ) -> None: mock_interaction.fetch_channel = mock.AsyncMock() result = await context.fetch_channel() @@ -250,7 +251,7 @@ async def test_fetch_channel(self, context: tanjun.context.AutocompleteContext, mock_interaction.fetch_channel.assert_awaited_once_with() @pytest.mark.asyncio - async def test_fetch_guild(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock): + async def test_fetch_guild(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock) -> None: mock_interaction.fetch_guild = mock.AsyncMock() result = await context.fetch_guild() @@ -258,20 +259,20 @@ async def test_fetch_guild(self, context: tanjun.context.AutocompleteContext, mo assert result is mock_interaction.fetch_guild.return_value mock_interaction.fetch_guild.assert_awaited_once_with() - def test_get_channel(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock): + def test_get_channel(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock) -> None: result = context.get_channel() assert result is mock_interaction.get_channel.return_value mock_interaction.get_channel.assert_called_once_with() - def test_get_guild(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock): + def test_get_guild(self, context: tanjun.context.AutocompleteContext, mock_interaction: mock.Mock) -> None: result = context.get_guild() assert result is mock_interaction.get_guild.return_value mock_interaction.get_guild.assert_called_once_with() @pytest.mark.asyncio - async def test_set_choices(self): + async def test_set_choices(self) -> None: mock_interaction = mock.AsyncMock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction) assert context.has_responded is False @@ -288,7 +289,7 @@ async def test_set_choices(self): ) @pytest.mark.asyncio - async def test_set_choices_when_no_options(self): + async def test_set_choices_when_no_options(self) -> None: mock_interaction = mock.AsyncMock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction) @@ -298,7 +299,7 @@ async def test_set_choices_when_no_options(self): mock_interaction.create_response.assert_awaited_once_with([]) @pytest.mark.asyncio - async def test_set_choices_when_iterable(self): + async def test_set_choices_when_iterable(self) -> None: mock_interaction = mock.AsyncMock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction) @@ -314,7 +315,7 @@ async def test_set_choices_when_iterable(self): ) @pytest.mark.asyncio - async def test_set_choices_when_future_based(self): + async def test_set_choices_when_future_based(self) -> None: mock_future = mock.Mock() mock_interaction = mock.Mock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction, future=mock_future) @@ -332,7 +333,7 @@ async def test_set_choices_when_future_based(self): ) @pytest.mark.asyncio - async def test_set_choices_when_future_based_and_iterable(self): + async def test_set_choices_when_future_based_and_iterable(self) -> None: mock_future = mock.Mock() mock_interaction = mock.Mock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction, future=mock_future) @@ -352,7 +353,7 @@ async def test_set_choices_when_future_based_and_iterable(self): assert context.has_responded is True @pytest.mark.asyncio - async def test_set_choices_when_future_based_and_no_options(self): + async def test_set_choices_when_future_based_and_no_options(self) -> None: mock_future = mock.Mock() mock_interaction = mock.Mock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction, future=mock_future) @@ -364,17 +365,17 @@ async def test_set_choices_when_future_based_and_no_options(self): mock_interaction.build_response.assert_called_once_with([]) @pytest.mark.asyncio - async def test_set_choices_when_too_many_options(self): + async def test_set_choices_when_too_many_options(self) -> None: mock_interaction = mock.AsyncMock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction) with pytest.raises(ValueError, match="Cannot set more than 25 choices"): - await context.set_choices({str(v): "a" for v in range(0, 23)}, foo="ok", bar="as", baz="43") + await context.set_choices({str(v): "a" for v in range(23)}, foo="ok", bar="as", baz="43") mock_interaction.create_response.assert_not_called() @pytest.mark.asyncio - async def test_set_choices_when_has_responded(self): + async def test_set_choices_when_has_responded(self) -> None: mock_interaction = mock.AsyncMock(options=[mock.Mock(is_focused=True)]) context = tanjun.context.AutocompleteContext(mock.Mock(tanjun.Client), mock_interaction) await context.set_choices() diff --git a/tests/context/test_base.py b/tests/context/test_base.py index b26500d85..78274a118 100644 --- a/tests/context/test_base.py +++ b/tests/context/test_base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -82,54 +81,54 @@ class TestBaseContext: def context(self, mock_client: mock.Mock) -> base_context.BaseContext: return stub_class(base_context.BaseContext, args=(mock_client,)) - def test_cache_property(self, context: tanjun.abc.Context, mock_client: mock.Mock): + def test_cache_property(self, context: tanjun.abc.Context, mock_client: mock.Mock) -> None: assert context.cache is mock_client.cache - def test_client_property(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_client_property(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.client is mock_client - def test_component_property(self, context: base_context.BaseContext, mock_component: tanjun.abc.Component): + def test_component_property(self, context: base_context.BaseContext, mock_component: tanjun.abc.Component) -> None: assert context.component is None - def test_events_proprety(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_events_proprety(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.events is mock_client.events - def test_rest_property(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_rest_property(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.rest is mock_client.rest - def test_server_property(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_server_property(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.server is mock_client.server - def test_shard_property(self, mock_client: mock.Mock): + def test_shard_property(self, mock_client: mock.Mock) -> None: mock_shard = mock.Mock() mock_client.shards = mock.MagicMock(spec=traits.ShardAware, shard_count=5, shards={2: mock_shard}) context = stub_class(base_context.BaseContext, guild_id=hikari.Snowflake(123321123312), args=(mock_client,)) assert context.shard is mock_shard - def test_shard_property_when_dm(self, mock_client: mock.Mock): + def test_shard_property_when_dm(self, mock_client: mock.Mock) -> None: mock_shard = mock.Mock() mock_client.shards = mock.Mock(shards={0: mock_shard}) context = stub_class(base_context.BaseContext, guild_id=None, args=(mock_client,)) assert context.shard is mock_shard - def test_shard_property_when_no_shards(self, context: tanjun.context.MessageContext): + def test_shard_property_when_no_shards(self, context: tanjun.context.MessageContext) -> None: context._tanjun_client = mock.Mock(shards=None) assert context.shard is None - def test_shards_property(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_shards_property(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.shards is mock_client.shards - def test_voice_property(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_voice_property(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.voice is mock_client.voice - def test_finalise(self, context: base_context.BaseContext): + def test_finalise(self, context: base_context.BaseContext) -> None: context.finalise() assert context._final is True - def test_set_component(self, context: base_context.BaseContext): + def test_set_component(self, context: base_context.BaseContext) -> None: component = mock.Mock() assert context.set_component(component) is context @@ -137,7 +136,7 @@ def test_set_component(self, context: base_context.BaseContext): assert context.component is component assert context.get_type_dependency(tanjun.abc.Component) is component - def test_set_component_when_none_and_previously_set(self, context: base_context.BaseContext): + def test_set_component_when_none_and_previously_set(self, context: base_context.BaseContext) -> None: mock_component = mock.Mock() context.set_component(mock_component) context.set_component(None) @@ -147,7 +146,7 @@ def test_set_component_when_none_and_previously_set(self, context: base_context. with pytest.raises(KeyError): context.get_type_dependency(tanjun.abc.Component) - def test_set_component_when_none(self, context: base_context.BaseContext): + def test_set_component_when_none(self, context: base_context.BaseContext) -> None: context.set_component(None) context.set_component(None) @@ -156,7 +155,7 @@ def test_set_component_when_none(self, context: base_context.BaseContext): with pytest.raises(KeyError): context.get_type_dependency(tanjun.abc.Component) - def test_set_component_when_final(self, context: base_context.BaseContext): + def test_set_component_when_final(self, context: base_context.BaseContext) -> None: component = mock.Mock() context.finalise() @@ -165,7 +164,7 @@ def test_set_component_when_final(self, context: base_context.BaseContext): assert context.component is not component - def test_get_channel(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_get_channel(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert mock_client.cache is not None mock_client.cache.get_guild_channel.return_value = mock.Mock(hikari.TextableGuildChannel) @@ -173,7 +172,9 @@ def test_get_channel(self, context: base_context.BaseContext, mock_client: mock. mock_client.cache.get_guild_channel.assert_called_once_with(context.channel_id) - def test_get_channel_when_cache_returns_none(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_get_channel_when_cache_returns_none( + self, context: base_context.BaseContext, mock_client: mock.Mock + ) -> None: assert mock_client.cache is not None mock_client.cache.get_guild_channel.return_value = None @@ -181,22 +182,22 @@ def test_get_channel_when_cache_returns_none(self, context: base_context.BaseCon mock_client.cache.get_guild_channel.assert_called_once_with(context.channel_id) - def test_get_channel_when_cacheless(self): + def test_get_channel_when_cacheless(self) -> None: context = stub_class(base_context.BaseContext, guild_id=None, args=(mock.Mock(cache=None),)) assert context.get_channel() is None - def test_get_guild(self, context: base_context.BaseContext, mock_client: mock.Mock): + def test_get_guild(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert mock_client.cache is not None assert context.get_guild() is mock_client.cache.get_guild.return_value mock_client.cache.get_guild.assert_called_once_with(context.guild_id) - def test_get_guild_when_cacheless(self): + def test_get_guild_when_cacheless(self) -> None: context = stub_class(base_context.BaseContext, guild_id=None, args=(mock.Mock(cache=None),)) assert context.get_guild() is None - def test_get_guild_when_dm_bound(self): + def test_get_guild_when_dm_bound(self) -> None: mock_client = mock.MagicMock() context = stub_class(base_context.BaseContext, guild_id=None, args=(mock_client,)) @@ -204,7 +205,7 @@ def test_get_guild_when_dm_bound(self): mock_client.cache.get_guild.assert_not_called() @pytest.mark.asyncio - async def test_fetch_channel(self, context: base_context.BaseContext, mock_client: mock.Mock): + async def test_fetch_channel(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: mock_client.rest.fetch_channel.return_value = mock.Mock(hikari.TextableChannel) result = await context.fetch_channel() @@ -213,14 +214,14 @@ async def test_fetch_channel(self, context: base_context.BaseContext, mock_clien mock_client.rest.fetch_channel.assert_called_once_with(context.channel_id) @pytest.mark.asyncio - async def test_fetch_guild(self, context: base_context.BaseContext, mock_client: mock.Mock): + async def test_fetch_guild(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: result = await context.fetch_guild() assert result is mock_client.rest.fetch_guild.return_value mock_client.rest.fetch_guild.assert_called_once_with(context.guild_id) @pytest.mark.asyncio - async def test_fetch_guild_when_dm_bound(self, mock_client: mock.Mock): + async def test_fetch_guild_when_dm_bound(self, mock_client: mock.Mock) -> None: context = stub_class(base_context.BaseContext, guild_id=None, args=(mock_client,)) result = await context.fetch_guild() diff --git a/tests/context/test_menu.py b/tests/context/test_menu.py index 6fa99c39f..aa99ccdb2 100644 --- a/tests/context/test_menu.py +++ b/tests/context/test_menu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -56,14 +55,14 @@ def context( ) -> tanjun.context.MenuContext: return tanjun.context.MenuContext(mock_client, mock_interaction, mock.Mock()) - def test_command_property(self, mock_client: tanjun.Client, mock_interaction: hikari.CommandInteraction): + def test_command_property(self, mock_client: tanjun.Client, mock_interaction: hikari.CommandInteraction) -> None: context = tanjun.context.MenuContext(mock_client, mock_interaction, mock.Mock()) assert context.command is None def test_target_id_property_when_user_menu( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {12354123: mock.Mock()} mock_interaction.resolved.messages = {} @@ -72,7 +71,7 @@ def test_target_id_property_when_user_menu( def test_target_id_property_when_message_menu( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {} mock_interaction.resolved.messages = {65123123: mock.Mock()} @@ -81,7 +80,7 @@ def test_target_id_property_when_message_menu( def test_target_id_property_when_unknown_menu_type( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {} mock_interaction.resolved.messages = {} @@ -91,7 +90,7 @@ def test_target_id_property_when_unknown_menu_type( def test_target_property_when_user_menu( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: mock_user = mock.Mock() assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {54123543: mock_user} @@ -102,7 +101,7 @@ def test_target_property_when_user_menu( def test_target_property_when_user_menu_and_member( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: mock_member = mock.Mock() assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {54123543: mock.Mock()} @@ -113,7 +112,7 @@ def test_target_property_when_user_menu_and_member( def test_target_property_when_message_menu( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: mock_message = mock.Mock() assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {} @@ -124,7 +123,7 @@ def test_target_property_when_message_menu( def test_target_property_when_unknown_menu_type( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction.resolved, mock.Mock) mock_interaction.resolved.users = {} mock_interaction.resolved.members = {} @@ -133,7 +132,7 @@ def test_target_property_when_unknown_menu_type( with pytest.raises(RuntimeError, match="Unknown menu type"): context.target - def test_triggering_name_property(self, context: tanjun.context.menu.MenuContext): + def test_triggering_name_property(self, context: tanjun.context.menu.MenuContext) -> None: assert context.triggering_name is context.interaction.command_name @pytest.mark.parametrize("command_type", [hikari.CommandType.MESSAGE, hikari.CommandType.USER]) @@ -142,13 +141,13 @@ def test_type_property( context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction, command_type: hikari.CommandType, - ): + ) -> None: mock_interaction.command_type = command_type assert context.type is mock_interaction.command_type @pytest.mark.asyncio - async def test_mark_not_found(self): + async def test_mark_not_found(self) -> None: on_not_found = mock.AsyncMock() context = tanjun.context.MenuContext( mock.Mock(), mock.Mock(options=None), mock.Mock(), on_not_found=on_not_found @@ -159,13 +158,13 @@ async def test_mark_not_found(self): on_not_found.assert_awaited_once_with(context) @pytest.mark.asyncio - async def test_mark_not_found_when_no_callback(self): + async def test_mark_not_found_when_no_callback(self) -> None: context = tanjun.context.MenuContext(mock.Mock(), mock.Mock(options=None), mock.Mock(), on_not_found=None) await context.mark_not_found() @pytest.mark.asyncio - async def test_mark_not_found_when_already_marked_as_not_found(self): + async def test_mark_not_found_when_already_marked_as_not_found(self) -> None: on_not_found = mock.AsyncMock() context = tanjun.context.MenuContext( mock.Mock(), mock.Mock(options=None), mock.Mock(), on_not_found=on_not_found @@ -177,7 +176,7 @@ async def test_mark_not_found_when_already_marked_as_not_found(self): on_not_found.assert_not_called() - def test_set_command(self, context: tanjun.context.MenuContext): + def test_set_command(self, context: tanjun.context.MenuContext) -> None: mock_command = mock.Mock() result = context.set_command(mock_command) @@ -185,7 +184,9 @@ def test_set_command(self, context: tanjun.context.MenuContext): assert context.command is mock_command assert result is context - def test_resolve_to_member(self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction): + def test_resolve_to_member( + self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction + ) -> None: mock_member = mock.Mock() assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {123534: mock_member} @@ -197,7 +198,7 @@ def test_resolve_to_member(self, context: tanjun.context.MenuContext, mock_inter def test_resolve_to_member_when_not_user_type( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {} mock_interaction.resolved.users = {} @@ -207,7 +208,7 @@ def test_resolve_to_member_when_not_user_type( def test_resolve_to_member_when_user_but_no_member( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {} mock_interaction.resolved.users = {1235432: mock.Mock()} @@ -217,7 +218,7 @@ def test_resolve_to_member_when_user_but_no_member( def test_resolve_to_member_when_user_but_no_member_and_default( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {} mock_interaction.resolved.users = {1235432: mock.Mock()} @@ -227,7 +228,9 @@ def test_resolve_to_member_when_user_but_no_member_and_default( assert result is mock_default - def test_resolve_to_message(self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction): + def test_resolve_to_message( + self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction + ) -> None: mock_message = mock.Mock() assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.messages = {3421123: mock_message} @@ -238,14 +241,16 @@ def test_resolve_to_message(self, context: tanjun.context.MenuContext, mock_inte def test_resolve_to_message_when_not_message_type( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.messages = {} with pytest.raises(TypeError, match="Cannot resolve user menu context to a message"): context.resolve_to_message() - def test_resolve_to_user(self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction): + def test_resolve_to_user( + self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction + ) -> None: mock_user = mock.Mock() assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {} @@ -257,7 +262,7 @@ def test_resolve_to_user(self, context: tanjun.context.MenuContext, mock_interac def test_resolve_to_user_when_member( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: mock_member = mock.Mock() assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {123534: mock_member} @@ -269,7 +274,7 @@ def test_resolve_to_user_when_member( def test_resolve_to_user_when_not_user_type( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction - ): + ) -> None: assert isinstance(mock_interaction, mock.Mock) mock_interaction.resolved.members = {} mock_interaction.resolved.users = {} diff --git a/tests/context/test_message.py b/tests/context/test_message.py index 3eb330dda..294310155 100644 --- a/tests/context/test_message.py +++ b/tests/context/test_message.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -89,54 +88,54 @@ def context(self, mock_client: mock.Mock) -> tanjun.context.MessageContext: triggering_prefix="bonhoven", ) - def test___repr__(self, context: tanjun.context.MessageContext): + def test___repr__(self, context: tanjun.context.MessageContext) -> None: assert repr(context) == f"MessageContext <{context.message!r}, {context.command!r}>" - def test_author_property(self, context: tanjun.context.MessageContext): + def test_author_property(self, context: tanjun.context.MessageContext) -> None: assert context.author is context.message.author - def test_channel_id_property(self, context: tanjun.context.MessageContext): + def test_channel_id_property(self, context: tanjun.context.MessageContext) -> None: assert context.channel_id is context.message.channel_id - def test_created_at_property(self, context: tanjun.context.MessageContext): + def test_created_at_property(self, context: tanjun.context.MessageContext) -> None: assert context.created_at is context.message.created_at - def test_guild_id_property(self, context: tanjun.context.MessageContext): + def test_guild_id_property(self, context: tanjun.context.MessageContext) -> None: assert context.guild_id is context.message.guild_id - def test_has_responded_property(self, context: tanjun.context.MessageContext): + def test_has_responded_property(self, context: tanjun.context.MessageContext) -> None: assert context.has_responded is False - def test_has_responded_property_when_initial_repsonse_id_set(self, context: tanjun.context.MessageContext): + def test_has_responded_property_when_initial_repsonse_id_set(self, context: tanjun.context.MessageContext) -> None: context._initial_response_id = hikari.Snowflake(321123) assert context.has_responded is True - def test_is_human_property(self, context: tanjun.context.MessageContext): + def test_is_human_property(self, context: tanjun.context.MessageContext) -> None: context.message.author = mock.Mock(is_bot=False) context.message.webhook_id = None assert context.is_human is True - def test_is_human_property_when_is_bot(self, context: tanjun.context.MessageContext): + def test_is_human_property_when_is_bot(self, context: tanjun.context.MessageContext) -> None: context.message.author = mock.Mock(is_bot=True) context.message.webhook_id = None assert context.is_human is False - def test_is_human_property_when_is_webhook(self, context: tanjun.context.MessageContext): + def test_is_human_property_when_is_webhook(self, context: tanjun.context.MessageContext) -> None: context.message.author = mock.Mock(is_bot=False) context.message.webhook_id = hikari.Snowflake(123321) assert context.is_human is False - def test_member_property(self, context: tanjun.context.MessageContext): + def test_member_property(self, context: tanjun.context.MessageContext) -> None: assert context.member is context.message.member - def test_message_property(self, context: tanjun.context.MessageContext): + def test_message_property(self, context: tanjun.context.MessageContext) -> None: assert context.message is context._message - def test_set_command(self, context: tanjun.context.MessageContext): + def test_set_command(self, context: tanjun.context.MessageContext) -> None: mock_command = mock.Mock() assert context.set_command(mock_command) is context @@ -145,7 +144,7 @@ def test_set_command(self, context: tanjun.context.MessageContext): assert context.get_type_dependency(tanjun.abc.ExecutableCommand) is mock_command assert context.get_type_dependency(tanjun.abc.MessageCommand) is mock_command - def test_set_command_when_none(self, context: tanjun.context.MessageContext): + def test_set_command_when_none(self, context: tanjun.context.MessageContext) -> None: context.set_command(None) context.set_command(None) @@ -157,7 +156,7 @@ def test_set_command_when_none(self, context: tanjun.context.MessageContext): with pytest.raises(KeyError): assert context.get_type_dependency(tanjun.abc.MessageCommand) - def test_set_command_when_none_and_previously_set(self, context: tanjun.context.MessageContext): + def test_set_command_when_none_and_previously_set(self, context: tanjun.context.MessageContext) -> None: mock_command = mock.Mock() context.set_command(mock_command) context.set_command(None) @@ -170,7 +169,7 @@ def test_set_command_when_none_and_previously_set(self, context: tanjun.context. with pytest.raises(KeyError): assert context.get_type_dependency(tanjun.abc.MessageCommand) - def test_set_command_when_finalised(self, context: tanjun.context.MessageContext): + def test_set_command_when_finalised(self, context: tanjun.context.MessageContext) -> None: context.finalise() mock_command = mock.Mock() @@ -179,11 +178,11 @@ def test_set_command_when_finalised(self, context: tanjun.context.MessageContext assert context.command is not mock_command - def test_set_content(self, context: tanjun.context.MessageContext): + def test_set_content(self, context: tanjun.context.MessageContext) -> None: assert context.set_content("hi") is context assert context.content == "hi" - def test_set_content_when_finalised(self, context: tanjun.context.MessageContext): + def test_set_content_when_finalised(self, context: tanjun.context.MessageContext) -> None: context.finalise() with pytest.raises(TypeError): @@ -191,12 +190,12 @@ def test_set_content_when_finalised(self, context: tanjun.context.MessageContext assert context.content != "hi" - def test_set_triggering_name(self, context: tanjun.context.MessageContext): + def test_set_triggering_name(self, context: tanjun.context.MessageContext) -> None: assert context.set_triggering_name("bonjour") is context assert context.triggering_name == "bonjour" - def test_set_triggering_name_when_finalised(self, context: tanjun.context.MessageContext): + def test_set_triggering_name_when_finalised(self, context: tanjun.context.MessageContext) -> None: context.finalise() with pytest.raises(TypeError): @@ -204,12 +203,12 @@ def test_set_triggering_name_when_finalised(self, context: tanjun.context.Messag assert context.triggering_name != "bonjour2" - def test_set_triggering_prefix(self, context: tanjun.context.MessageContext): + def test_set_triggering_prefix(self, context: tanjun.context.MessageContext) -> None: assert context.set_triggering_prefix("bonhoven") is context assert context.triggering_prefix == "bonhoven" - def test_set_triggering_prefix_when_finalised(self, context: tanjun.context.MessageContext): + def test_set_triggering_prefix_when_finalised(self, context: tanjun.context.MessageContext) -> None: context.finalise() with pytest.raises(TypeError): @@ -218,7 +217,9 @@ def test_set_triggering_prefix_when_finalised(self, context: tanjun.context.Mess assert context.triggering_prefix != "bonhoven2" @pytest.mark.asyncio - async def test_delete_initial_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock): + async def test_delete_initial_response( + self, context: tanjun.context.MessageContext, mock_client: mock.Mock + ) -> None: context._initial_response_id = hikari.Snowflake(32123) await context.delete_initial_response() @@ -228,14 +229,14 @@ async def test_delete_initial_response(self, context: tanjun.context.MessageCont @pytest.mark.asyncio async def test_delete_initial_response_when_no_initial_response( self, context: tanjun.context.MessageContext, mock_client: mock.Mock - ): + ) -> None: with pytest.raises(LookupError): await context.delete_initial_response() mock_client.rest.delete_message.assert_not_called() @pytest.mark.asyncio - async def test_delete_last_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock): + async def test_delete_last_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock) -> None: context._last_response_id = hikari.Snowflake(32123) await context.delete_last_response() @@ -245,14 +246,14 @@ async def test_delete_last_response(self, context: tanjun.context.MessageContext @pytest.mark.asyncio async def test_delete_last_response_when_no_response( self, context: tanjun.context.MessageContext, mock_client: mock.Mock - ): + ) -> None: with pytest.raises(LookupError): await context.delete_last_response() mock_client.rest.delete_message.assert_not_called() @pytest.mark.asyncio - async def test_edit_initial_response(self, mock_client: mock.Mock): + async def test_edit_initial_response(self, mock_client: mock.Mock) -> None: mock_register_task = mock.Mock() mock_delete_after = mock.Mock() context = stub_class( @@ -303,7 +304,7 @@ async def test_edit_initial_response(self, mock_client: mock.Mock): @pytest.mark.asyncio async def test_edit_initial_response_when_no_initial_response( self, context: tanjun.context.MessageContext, mock_client: mock.Mock - ): + ) -> None: with pytest.raises(LookupError): await context.edit_initial_response("hi") @@ -313,7 +314,7 @@ async def test_edit_initial_response_when_no_initial_response( @pytest.mark.asyncio async def test_edit_initial_response_when_delete_after( self, delete_after: datetime.timedelta | float | int, mock_client: mock.Mock - ): + ) -> None: mock_register_task = mock.Mock() mock_delete_after = mock.Mock() context = stub_class( @@ -331,7 +332,7 @@ async def test_edit_initial_response_when_delete_after( mock_register_task.assert_called_once_with(create_task.return_value) @pytest.mark.asyncio - async def test_edit_last_response(self, mock_client: mock.Mock): + async def test_edit_last_response(self, mock_client: mock.Mock) -> None: mock_register_task = mock.Mock() mock_delete_after = mock.Mock() context = stub_class( @@ -380,7 +381,7 @@ async def test_edit_last_response(self, mock_client: mock.Mock): @pytest.mark.asyncio async def test_edit_last_response_when_no_last_response( self, context: tanjun.context.MessageContext, mock_client: mock.Mock - ): + ) -> None: with pytest.raises(LookupError): await context.edit_last_response("hi") @@ -390,7 +391,7 @@ async def test_edit_last_response_when_no_last_response( @pytest.mark.asyncio async def test_edit_last_response_when_delete_after( self, mock_client: mock.Mock, delete_after: datetime.timedelta | int | float - ): + ) -> None: mock_register_task = mock.Mock() mock_delete_after = mock.Mock() context = stub_class( @@ -408,7 +409,7 @@ async def test_edit_last_response_when_delete_after( mock_register_task.assert_called_once_with(create_task.return_value) @pytest.mark.asyncio - async def test_fetch_initial_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock): + async def test_fetch_initial_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock) -> None: context._initial_response_id = hikari.Snowflake(32123) message = await context.fetch_initial_response() @@ -419,14 +420,14 @@ async def test_fetch_initial_response(self, context: tanjun.context.MessageConte @pytest.mark.asyncio async def test_fetch_initial_response_when_no_initial_response( self, context: tanjun.context.MessageContext, mock_client: mock.Mock - ): + ) -> None: with pytest.raises(LookupError): await context.fetch_initial_response() mock_client.rest.fetch_message.assert_not_called() @pytest.mark.asyncio - async def test_fetch_last_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock): + async def test_fetch_last_response(self, context: tanjun.context.MessageContext, mock_client: mock.Mock) -> None: context._last_response_id = hikari.Snowflake(32123) message = await context.fetch_last_response() @@ -437,7 +438,7 @@ async def test_fetch_last_response(self, context: tanjun.context.MessageContext, @pytest.mark.asyncio async def test_fetch_last_response_when_no_last_response( self, context: tanjun.context.MessageContext, mock_client: mock.Mock - ): + ) -> None: context._last_response_id = None with pytest.raises(LookupError): await context.fetch_last_response() @@ -445,7 +446,7 @@ async def test_fetch_last_response_when_no_last_response( mock_client.rest.fetch_message.assert_not_called() @pytest.mark.asyncio - async def test__delete_after(self, context: tanjun.context.MessageContext): + async def test__delete_after(self, context: tanjun.context.MessageContext) -> None: mock_message = mock.AsyncMock() with mock.patch.object(asyncio, "sleep") as sleep: @@ -455,7 +456,7 @@ async def test__delete_after(self, context: tanjun.context.MessageContext): mock_message.delete.assert_awaited_once_with() @pytest.mark.asyncio - async def test__delete_after_handles_not_found_error(self, context: tanjun.context.MessageContext): + async def test__delete_after_handles_not_found_error(self, context: tanjun.context.MessageContext) -> None: mock_message = mock.AsyncMock() mock_message.delete.side_effect = hikari.NotFoundError(url="", headers={}, raw_body=None) @@ -466,7 +467,7 @@ async def test__delete_after_handles_not_found_error(self, context: tanjun.conte mock_message.delete.assert_awaited_once_with() @pytest.mark.asyncio - async def test_respond(self): + async def test_respond(self) -> None: mock_delete_after = mock.Mock() mock_register_task = mock.Mock() context = stub_class( @@ -525,7 +526,7 @@ async def test_respond(self): mock_delete_after.assert_not_called() @pytest.mark.asyncio - async def test_respond_when_initial_response_id_already_set(self, context: tanjun.context.MessageContext): + async def test_respond_when_initial_response_id_already_set(self, context: tanjun.context.MessageContext) -> None: context._initial_response_id = hikari.Snowflake(32123) await context.respond("hi") @@ -534,7 +535,7 @@ async def test_respond_when_initial_response_id_already_set(self, context: tanju @pytest.mark.parametrize("delete_after", [datetime.timedelta(seconds=123), 123, 123.0]) @pytest.mark.asyncio - async def test_respond_when_delete_after(self, delete_after: int | float | datetime.timedelta): + async def test_respond_when_delete_after(self, delete_after: int | float | datetime.timedelta) -> None: mock_delete_after = mock.Mock() mock_register_task = mock.Mock() context = stub_class( diff --git a/tests/context/test_slash.py b/tests/context/test_slash.py index 3ad43bac5..b07e36e89 100644 --- a/tests/context/test_slash.py +++ b/tests/context/test_slash.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -78,18 +77,18 @@ def mock_component() -> tanjun.abc.Component: class TestSlashOption: - def test_name_property(self): + def test_name_property(self) -> None: mock_option = mock.Mock() assert tanjun.context.SlashOption(mock.Mock(), mock_option).name is mock_option.name - def test_type_property(self): + def test_type_property(self) -> None: mock_option = mock.Mock() assert tanjun.context.SlashOption(mock.Mock(), mock_option).type is mock_option.type @pytest.mark.parametrize("type_", [hikari.OptionType.STRING, hikari.OptionType.FLOAT, hikari.OptionType.INTEGER]) - def test_value_property(self, type_: hikari.OptionType): + def test_value_property(self, type_: hikari.OptionType) -> None: mock_option = mock.Mock(type=type_) assert tanjun.context.SlashOption(mock.Mock(), mock_option).value is mock_option.value @@ -98,35 +97,35 @@ def test_value_property(self, type_: hikari.OptionType): "type_", [hikari.OptionType.CHANNEL, hikari.OptionType.USER, hikari.OptionType.ROLE, hikari.OptionType.MENTIONABLE], ) - def test_value_property_for_unique_type(self, type_: hikari.OptionType): + def test_value_property_for_unique_type(self, type_: hikari.OptionType) -> None: mock_option = mock.Mock(type=type_, value="123321") assert tanjun.context.SlashOption(mock.Mock(), mock_option).value == 123321 - def test_boolean(self): + def test_boolean(self) -> None: mock_option = mock.Mock(type=hikari.OptionType.BOOLEAN, value=True) assert tanjun.context.SlashOption(mock.Mock(), mock_option).boolean() is True - def test_boolean_when_not_bool_type(self): + def test_boolean_when_not_bool_type(self) -> None: with pytest.raises(TypeError, match="Option is not a boolean"): assert tanjun.context.SlashOption(mock.Mock(), mock.Mock()).boolean() - def test_float(self): + def test_float(self) -> None: mock_option = mock.Mock(type=hikari.OptionType.FLOAT, value=123.312) assert tanjun.context.SlashOption(mock.Mock(), mock_option).float() == 123.312 - def test_float_when_not_float_type(self): + def test_float_when_not_float_type(self) -> None: with pytest.raises(TypeError, match="Option is not a float"): assert tanjun.context.SlashOption(mock.Mock(), mock.Mock()).float() - def test_integer(self): + def test_integer(self) -> None: mock_option = mock.Mock(type=hikari.OptionType.INTEGER, value=69300) assert tanjun.context.SlashOption(mock.Mock(), mock_option).integer() == 69300 - def test_integer_when_not_integer_type(self): + def test_integer_when_not_integer_type(self) -> None: with pytest.raises(TypeError, match="Option is not an integer"): assert tanjun.context.SlashOption(mock.Mock(), mock.Mock()).integer() @@ -134,28 +133,28 @@ def test_integer_when_not_integer_type(self): "type_", [hikari.OptionType.CHANNEL, hikari.OptionType.USER, hikari.OptionType.ROLE, hikari.OptionType.MENTIONABLE], ) - def test_snowflake(self, type_: hikari.OptionType): + def test_snowflake(self, type_: hikari.OptionType) -> None: mock_option = mock.Mock(type=type_, value="45123") assert tanjun.context.SlashOption(mock.Mock(), mock_option).snowflake() == 45123 @pytest.mark.parametrize("type_", [hikari.OptionType.STRING, hikari.OptionType.FLOAT, hikari.OptionType.INTEGER]) - def test_snowflake_when_not_unique_type(self, type_: hikari.OptionType): + def test_snowflake_when_not_unique_type(self, type_: hikari.OptionType) -> None: mock_option = mock.Mock(type=type_) with pytest.raises(TypeError, match="Option is not a unique resource"): assert tanjun.context.SlashOption(mock.Mock(), mock_option).snowflake() - def test_string(self): + def test_string(self) -> None: mock_option = mock.Mock(type=hikari.OptionType.STRING, value="hi meow") assert tanjun.context.SlashOption(mock.Mock(), mock_option).string() == "hi meow" - def test_string_when_not_str_type(self): + def test_string_when_not_str_type(self) -> None: with pytest.raises(TypeError, match="Option is not a string"): assert tanjun.context.SlashOption(mock.Mock(), mock.Mock()).string() - def test_resolve_value_for_attachment_option(self): + def test_resolve_value_for_attachment_option(self) -> None: resolve_to_attachment = mock.Mock() resolve_to_channel = mock.Mock() resolve_to_role = mock.Mock() @@ -180,7 +179,7 @@ def test_resolve_value_for_attachment_option(self): resolve_to_user.assert_not_called() resolve_to_mentionable.assert_not_called() - def test_resolve_value_for_channel_option(self): + def test_resolve_value_for_channel_option(self) -> None: resolve_to_attachment = mock.Mock() resolve_to_channel = mock.Mock() resolve_to_role = mock.Mock() @@ -205,7 +204,7 @@ def test_resolve_value_for_channel_option(self): resolve_to_user.assert_not_called() resolve_to_mentionable.assert_not_called() - def test_resolve_value_for_role_option(self): + def test_resolve_value_for_role_option(self) -> None: resolve_to_attachment = mock.Mock() resolve_to_channel = mock.Mock() resolve_to_role = mock.Mock() @@ -230,7 +229,7 @@ def test_resolve_value_for_role_option(self): resolve_to_user.assert_not_called() resolve_to_mentionable.assert_not_called() - def test_resolve_value_for_user_option(self): + def test_resolve_value_for_user_option(self) -> None: resolve_to_attachment = mock.Mock() resolve_to_channel = mock.Mock() resolve_to_role = mock.Mock() @@ -255,7 +254,7 @@ def test_resolve_value_for_user_option(self): resolve_to_user.assert_called_once_with() resolve_to_mentionable.assert_not_called() - def test_resolve_value_for_mentionable_option(self): + def test_resolve_value_for_mentionable_option(self) -> None: resolve_to_attachment = mock.Mock() resolve_to_channel = mock.Mock() resolve_to_role = mock.Mock() @@ -292,13 +291,13 @@ def test_resolve_value_for_mentionable_option(self): } ), ) - def test_resolve_value_for_non_resolvable_option(self, option_type: hikari.OptionType): + def test_resolve_value_for_non_resolvable_option(self, option_type: hikari.OptionType) -> None: option = tanjun.context.SlashOption(mock.Mock(), mock.Mock(type=option_type)) with pytest.raises(TypeError): option.resolve_value() - def test_resolve_to_attachment(self): + def test_resolve_to_attachment(self) -> None: mock_attachment = mock.Mock() mock_resolved = mock.Mock(attachments={696969696: mock_attachment}) option = tanjun.context.SlashOption( @@ -310,13 +309,13 @@ def test_resolve_to_attachment(self): assert value is mock_attachment @pytest.mark.parametrize("option_type", set(hikari.OptionType).difference({hikari.OptionType.ATTACHMENT})) - def test_resolve_to_attachment_for_non_attachment_type(self, option_type: hikari.OptionType): + def test_resolve_to_attachment_for_non_attachment_type(self, option_type: hikari.OptionType) -> None: option = tanjun.context.SlashOption(mock.Mock(), mock.Mock(type=option_type)) with pytest.raises(TypeError): option.resolve_to_attachment() - def test_resolve_to_channel(self): + def test_resolve_to_channel(self) -> None: mock_channel = mock.Mock() mock_resolved = mock.Mock(channels={3123321: mock_channel}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.CHANNEL, value="3123321")) @@ -326,13 +325,13 @@ def test_resolve_to_channel(self): assert value is mock_channel @pytest.mark.parametrize("option_type", set(hikari.OptionType).difference({hikari.OptionType.CHANNEL})) - def test_resolve_to_channel_for_non_channel_type(self, option_type: hikari.OptionType): + def test_resolve_to_channel_for_non_channel_type(self, option_type: hikari.OptionType) -> None: option = tanjun.context.SlashOption(mock.Mock(), mock.Mock(type=option_type)) with pytest.raises(TypeError): option.resolve_to_channel() - def test_resolve_to_member(self): + def test_resolve_to_member(self) -> None: mock_member = mock.Mock() mock_resolved = mock.Mock(members={421123: mock_member}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.USER, value="421123")) @@ -341,14 +340,14 @@ def test_resolve_to_member(self): assert value is mock_member - def test_resolve_to_member_when_user_only(self): + def test_resolve_to_member_when_user_only(self) -> None: mock_resolved = mock.Mock(members={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.USER, value="421123")) with pytest.raises(LookupError): option.resolve_to_member() - def test_resolve_to_member_when_user_only_and_defaulting(self): + def test_resolve_to_member_when_user_only_and_defaulting(self) -> None: mock_resolved = mock.Mock(members={}) mock_result = mock.Mock() option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.USER, value="421123")) @@ -357,7 +356,7 @@ def test_resolve_to_member_when_user_only_and_defaulting(self): assert result is mock_result - def test_resolve_to_member_when_mentionable(self): + def test_resolve_to_member_when_mentionable(self) -> None: mock_member = mock.Mock() mock_resolved = mock.Mock(members={1122: mock_member}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) @@ -366,14 +365,14 @@ def test_resolve_to_member_when_mentionable(self): assert result is mock_member - def test_resolve_to_member_when_mentionable_and_user_only(self): + def test_resolve_to_member_when_mentionable_and_user_only(self) -> None: mock_resolved = mock.Mock(users={1122: mock.Mock()}, members={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) with pytest.raises(LookupError): option.resolve_to_member() - def test_resolve_to_member_when_mentionable_and_user_only_while_defaulting(self): + def test_resolve_to_member_when_mentionable_and_user_only_while_defaulting(self) -> None: mock_resolved = mock.Mock(members={}, users={1122: mock.Mock()}) mock_default = mock.Mock() option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) @@ -382,7 +381,7 @@ def test_resolve_to_member_when_mentionable_and_user_only_while_defaulting(self) assert result is mock_default - def test_resolve_to_member_when_mentionable_but_targets_role(self): + def test_resolve_to_member_when_mentionable_but_targets_role(self) -> None: mock_resolved = mock.Mock(members={}, users={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) @@ -392,13 +391,13 @@ def test_resolve_to_member_when_mentionable_but_targets_role(self): @pytest.mark.parametrize( "option_type", set(hikari.OptionType).difference({hikari.OptionType.USER, hikari.OptionType.MENTIONABLE}) ) - def test_resolve_to_member_when_not_member_type(self, option_type: hikari.OptionType): + def test_resolve_to_member_when_not_member_type(self, option_type: hikari.OptionType) -> None: option = tanjun.context.SlashOption(mock.Mock(), mock.Mock(type=option_type)) with pytest.raises(TypeError): option.resolve_to_member() - def test_resolve_to_mentionable_for_role(self): + def test_resolve_to_mentionable_for_role(self) -> None: mock_role = mock.Mock() mock_resolved = mock.Mock(roles={1122: mock_role}, users={}, members={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) @@ -407,7 +406,7 @@ def test_resolve_to_mentionable_for_role(self): assert result is mock_role - def test_resolve_to_mentionable_for_member(self): + def test_resolve_to_mentionable_for_member(self) -> None: mock_member = mock.Mock() mock_resolved = mock.Mock(members={1122: mock_member}, roles={}, users={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) @@ -416,7 +415,7 @@ def test_resolve_to_mentionable_for_member(self): assert result is mock_member - def test_resolve_to_mentionable_when_user_only(self): + def test_resolve_to_mentionable_when_user_only(self) -> None: mock_user = mock.Mock() mock_resolved = mock.Mock(users={1122: mock_user}, roles={}, members={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="1122")) @@ -425,7 +424,7 @@ def test_resolve_to_mentionable_when_user_only(self): assert result is mock_user - def test_resolve_to_mentionable_for_user_option_type(self): + def test_resolve_to_mentionable_for_user_option_type(self) -> None: resolve_to_role = mock.Mock() resolve_to_user = mock.Mock() option = stub_class( @@ -441,7 +440,7 @@ def test_resolve_to_mentionable_for_user_option_type(self): resolve_to_user.assert_called_once_with() resolve_to_role.assert_not_called() - def test_resolve_to_mentionable_for_role_option_type(self): + def test_resolve_to_mentionable_for_role_option_type(self) -> None: resolve_to_role = mock.Mock() resolve_to_user = mock.Mock() option = stub_class( @@ -463,13 +462,13 @@ def test_resolve_to_mentionable_for_role_option_type(self): {hikari.OptionType.USER, hikari.OptionType.MENTIONABLE, hikari.OptionType.ROLE} ), ) - def test_resolve_to_mentionable_when_not_mentionable(self, option_type: hikari.OptionType): + def test_resolve_to_mentionable_when_not_mentionable(self, option_type: hikari.OptionType) -> None: option = tanjun.context.SlashOption(mock.Mock(), mock.Mock(type=option_type)) with pytest.raises(TypeError): option.resolve_to_mentionable() - def test_resolve_to_role(self): + def test_resolve_to_role(self) -> None: mock_role = mock.Mock() mock_resolved = mock.Mock(roles={21321: mock_role}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.ROLE, value="21321")) @@ -478,7 +477,7 @@ def test_resolve_to_role(self): assert result is mock_role - def test_resolve_to_role_when_mentionable(self): + def test_resolve_to_role_when_mentionable(self) -> None: mock_role = mock.Mock() mock_resolved = mock.Mock(roles={21321: mock_role}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="21321")) @@ -487,7 +486,7 @@ def test_resolve_to_role_when_mentionable(self): assert result is mock_role - def test_resolve_to_role_when_mentionable_but_targets_user(self): + def test_resolve_to_role_when_mentionable_but_targets_user(self) -> None: mock_resolved = mock.Mock(roles={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="21321")) @@ -497,14 +496,14 @@ def test_resolve_to_role_when_mentionable_but_targets_user(self): @pytest.mark.parametrize( "option_type", set(hikari.OptionType).difference({hikari.OptionType.MENTIONABLE, hikari.OptionType.ROLE}) ) - def test_resolve_to_role_when_not_role(self, option_type: hikari.OptionType): + def test_resolve_to_role_when_not_role(self, option_type: hikari.OptionType) -> None: mock_interaction = mock.Mock() option = tanjun.context.SlashOption(mock_interaction, mock.Mock(type=option_type, value="21321")) with pytest.raises(TypeError): option.resolve_to_role() - def test_resolve_to_user(self): + def test_resolve_to_user(self) -> None: mock_user = mock.Mock() mock_resolved = mock.Mock(users={33333: mock_user}, members={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.USER, value="33333")) @@ -513,7 +512,7 @@ def test_resolve_to_user(self): assert result is mock_user - def test_resolve_to_user_when_member_present(self): + def test_resolve_to_user_when_member_present(self) -> None: mock_member = mock.Mock() mock_resolved = mock.Mock(members={33333: mock_member}, users={33333: mock.Mock()}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="33333")) @@ -525,14 +524,14 @@ def test_resolve_to_user_when_member_present(self): @pytest.mark.parametrize( "option_type", set(hikari.OptionType).difference({hikari.OptionType.USER, hikari.OptionType.MENTIONABLE}) ) - def test_resolve_to_user_when_not_user(self, option_type: hikari.OptionType): + def test_resolve_to_user_when_not_user(self, option_type: hikari.OptionType) -> None: mock_interaction = mock.Mock() option = tanjun.context.SlashOption(mock_interaction, mock.Mock(type=option_type, value="33333")) with pytest.raises(TypeError): option.resolve_to_user() - def test_resolve_to_user_when_mentionable(self): + def test_resolve_to_user_when_mentionable(self) -> None: mock_user = mock.Mock() mock_resolved = mock.Mock(users={33333: mock_user}, members={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="33333")) @@ -541,7 +540,7 @@ def test_resolve_to_user_when_mentionable(self): assert result is mock_user - def test_resolve_to_user_when_mentionable_and_member_present(self): + def test_resolve_to_user_when_mentionable_and_member_present(self) -> None: mock_member = mock.Mock() mock_resolved = mock.Mock(members={33333: mock_member}, users={33333: mock.Mock()}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="33333")) @@ -550,7 +549,7 @@ def test_resolve_to_user_when_mentionable_and_member_present(self): assert result is mock_member - def test_resolve_to_user_when_mentionable_but_targets_role(self): + def test_resolve_to_user_when_mentionable_but_targets_role(self) -> None: mock_resolved = mock.Mock(members={}, users={}) option = tanjun.context.SlashOption(mock_resolved, mock.Mock(type=hikari.OptionType.MENTIONABLE, value="33333")) @@ -568,19 +567,19 @@ def context(self, mock_client: mock.Mock) -> tanjun.context.slash.AppCommandCont args=(mock_client, mock.AsyncMock(options=None), mock.Mock()), ) - def test_author_property(self, context: tanjun.context.slash.AppCommandContext): + def test_author_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.author is context.interaction.user - def test_channel_id_property(self, context: tanjun.context.slash.AppCommandContext): + def test_channel_id_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.channel_id is context.interaction.channel_id - def test_client_property(self, context: tanjun.abc.Context, mock_client: mock.Mock): + def test_client_property(self, context: tanjun.abc.Context, mock_client: mock.Mock) -> None: assert context.client is mock_client - def test_created_at_property(self, context: tanjun.context.slash.AppCommandContext): + def test_created_at_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.created_at is context.interaction.created_at - def test_expires_at_property(self): + def test_expires_at_property(self) -> None: context = stub_class( tanjun.context.slash.AppCommandContext, type=mock.Mock, @@ -588,35 +587,34 @@ def test_expires_at_property(self): args=( mock.Mock(), mock.Mock( - created_at=datetime.datetime(2021, 11, 15, 5, 42, 6, 445670, tzinfo=datetime.timezone.utc), - options=None, + created_at=datetime.datetime(2021, 11, 15, 5, 42, 6, 445670, tzinfo=datetime.UTC), options=None ), mock.Mock(), ), ) - assert context.expires_at == datetime.datetime(2021, 11, 15, 5, 57, 6, 445670, tzinfo=datetime.timezone.utc) + assert context.expires_at == datetime.datetime(2021, 11, 15, 5, 57, 6, 445670, tzinfo=datetime.UTC) - def test_guild_id_property(self, context: tanjun.context.slash.AppCommandContext): + def test_guild_id_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.guild_id is context.interaction.guild_id - def test_has_been_deferred_property(self, context: tanjun.context.slash.AppCommandContext): + def test_has_been_deferred_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.has_been_deferred is context._has_been_deferred - def test_has_responded_property(self, context: tanjun.context.slash.AppCommandContext): + def test_has_responded_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.has_responded is context._has_responded - def test_is_human_property(self, context: tanjun.context.slash.AppCommandContext): + def test_is_human_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.is_human is True - def test_member_property(self, context: tanjun.context.slash.AppCommandContext): + def test_member_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.member is context.interaction.member - def test_interaction_property(self, context: tanjun.context.slash.AppCommandContext): + def test_interaction_property(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.interaction is context._interaction @pytest.mark.asyncio - async def test__auto_defer(self, mock_client: mock.Mock): + async def test__auto_defer(self, mock_client: mock.Mock) -> None: defer = mock.AsyncMock() context = stub_class( tanjun.context.slash.AppCommandContext, @@ -630,21 +628,21 @@ async def test__auto_defer(self, mock_client: mock.Mock): sleep.assert_awaited_once_with(0.1) defer.assert_awaited_once_with() - def test_cancel_defer(self, context: tanjun.context.slash.AppCommandContext): + def test_cancel_defer(self, context: tanjun.context.slash.AppCommandContext) -> None: context._defer_task = mock.Mock() context.cancel_defer() context._defer_task.cancel.assert_called_once_with() - def test_cancel_defer_when_no_active_task(self, context: tanjun.context.slash.AppCommandContext): + def test_cancel_defer_when_no_active_task(self, context: tanjun.context.slash.AppCommandContext) -> None: context._defer_task = None context.cancel_defer() @pytest.mark.parametrize(("flags", "result"), [(hikari.UNDEFINED, hikari.MessageFlag.NONE), (6666, 6666)]) def test__get_flags( self, context: tanjun.context.slash.AppCommandContext, flags: hikari.UndefinedOr[int], result: int - ): + ) -> None: context.set_ephemeral_default(False) assert context._get_flags(flags) == result @@ -659,12 +657,12 @@ def test__get_flags( ) def test__get_flags_when_defaulting_to_ephemeral( self, context: tanjun.context.slash.AppCommandContext, flags: hikari.UndefinedOr[int], result: int - ): + ) -> None: context.set_ephemeral_default(True) assert context._get_flags(flags) == result - def test_start_defer_timer(self, mock_client: mock.Mock): + def test_start_defer_timer(self, mock_client: mock.Mock) -> None: auto_defer = mock.Mock() context = stub_class( tanjun.context.slash.AppCommandContext, @@ -679,23 +677,23 @@ def test_start_defer_timer(self, mock_client: mock.Mock): create_task.assert_called_once_with(auto_defer.return_value) assert context._defer_task is create_task.return_value - def test_start_defer_timer_when_already_started(self, context: tanjun.context.slash.AppCommandContext): + def test_start_defer_timer_when_already_started(self, context: tanjun.context.slash.AppCommandContext) -> None: context._defer_task = mock.Mock() with pytest.raises(RuntimeError): context.start_defer_timer(321) - def test_start_defer_timer_when_finalised(self, context: tanjun.context.slash.AppCommandContext): + def test_start_defer_timer_when_finalised(self, context: tanjun.context.slash.AppCommandContext) -> None: context.finalise() with pytest.raises(TypeError): context.start_defer_timer(123) - def test_set_ephemeral_default(self, context: tanjun.context.slash.AppCommandContext): + def test_set_ephemeral_default(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.set_ephemeral_default(True) is context assert context.defaults_to_ephemeral is True - def test_set_ephemeral_default_when_finalised(self, context: tanjun.context.slash.AppCommandContext): + def test_set_ephemeral_default_when_finalised(self, context: tanjun.context.slash.AppCommandContext) -> None: context.finalise() with pytest.raises(TypeError): context.set_ephemeral_default(True) @@ -705,15 +703,15 @@ def test_set_ephemeral_default_when_finalised(self, context: tanjun.context.slas @pytest.mark.skip(reason="not implemented") async def test_defer_cancels_defer_when_not_in_defer_task( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") async def test_defer_doesnt_cancel_defer_when_in_deffer_task( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.asyncio - async def test__delete_followup_after(self, context: tanjun.context.slash.AppCommandContext): + async def test__delete_followup_after(self, context: tanjun.context.slash.AppCommandContext) -> None: mock_message = mock.Mock() with mock.patch.object(asyncio, "sleep") as sleep: @@ -727,7 +725,7 @@ async def test__delete_followup_after(self, context: tanjun.context.slash.AppCom @pytest.mark.asyncio async def test__delete_followup_after_handles_not_found_error( self, context: tanjun.context.slash.AppCommandContext - ): + ) -> None: mock_message = mock.Mock() assert isinstance(context.interaction.delete_message, mock.AsyncMock) context.interaction.delete_message.side_effect = hikari.NotFoundError(url="", headers={}, raw_body=None) @@ -741,10 +739,10 @@ async def test__delete_followup_after_handles_not_found_error( @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_create_followup(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_create_followup(self, context: tanjun.context.slash.AppCommandContext) -> None: ... @pytest.mark.asyncio - async def test__delete_initial_response_after(self): + async def test__delete_initial_response_after(self) -> None: mock_delete_initial_response = mock.AsyncMock() context = stub_class( tanjun.context.slash.AppCommandContext, @@ -761,7 +759,7 @@ async def test__delete_initial_response_after(self): mock_delete_initial_response.assert_awaited_once_with() @pytest.mark.asyncio - async def test__delete_initial_response_after_handles_not_found_error(self): + async def test__delete_initial_response_after_handles_not_found_error(self) -> None: mock_delete_initial_response = mock.AsyncMock( side_effect=hikari.NotFoundError(url="", headers={}, raw_body=None) ) @@ -779,42 +777,46 @@ async def test__delete_initial_response_after_handles_not_found_error(self): @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_create_initial_response(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_create_initial_response(self, context: tanjun.context.slash.AppCommandContext) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_create_initial_response_for_gateway_interaction( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_create_initial_response_for_rest_interaction( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_create_initial_response_when_already_responded( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_create_initial_response_when_deferred(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_create_initial_response_when_deferred( + self, context: tanjun.context.slash.AppCommandContext + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_create_initial_response_when_delete_after(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_create_initial_response_when_delete_after( + self, context: tanjun.context.slash.AppCommandContext + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_create_initial_response_when_delete_after_will_have_expired( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.asyncio - async def test_delete_initial_response(self, context: tanjun.context.slash.AppCommandContext): + async def test_delete_initial_response(self, context: tanjun.context.slash.AppCommandContext) -> None: assert context.has_responded is False await context.delete_initial_response() @@ -824,8 +826,8 @@ async def test_delete_initial_response(self, context: tanjun.context.slash.AppCo assert context.has_responded is True @pytest.mark.asyncio - async def test_edit_initial_response(self, mock_client: mock.Mock): - mock_interaction = mock.AsyncMock(created_at=datetime.datetime.now(tz=datetime.timezone.utc)) + async def test_edit_initial_response(self, mock_client: mock.Mock) -> None: + mock_interaction = mock.AsyncMock(created_at=datetime.datetime.now(tz=datetime.UTC)) mock_register_task = mock.Mock() context = stub_class( tanjun.context.slash.AppCommandContext, @@ -875,9 +877,9 @@ async def test_edit_initial_response(self, mock_client: mock.Mock): @pytest.mark.asyncio async def test_edit_initial_response_when_delete_after( self, mock_client: mock.Mock, delete_after: datetime.timedelta | int | float - ): + ) -> None: mock_delete_initial_response_after = mock.Mock() - mock_interaction = mock.AsyncMock(created_at=datetime.datetime.now(tz=datetime.timezone.utc)) + mock_interaction = mock.AsyncMock(created_at=datetime.datetime.now(tz=datetime.UTC)) mock_interaction.edit_initial_response.return_value.flags = hikari.MessageFlag.NONE mock_register_task = mock.Mock() context = stub_class( @@ -899,10 +901,10 @@ async def test_edit_initial_response_when_delete_after( @pytest.mark.asyncio async def test_edit_initial_response_when_delete_after_will_have_expired( self, mock_client: mock.Mock, delete_after: datetime.timedelta | int | float - ): + ) -> None: mock_delete_initial_response_after = mock.Mock() mock_register_task = mock.Mock() - mock_interaction = mock.AsyncMock(created_at=datetime.datetime.now(tz=datetime.timezone.utc)) + mock_interaction = mock.AsyncMock(created_at=datetime.datetime.now(tz=datetime.UTC)) context = stub_class( tanjun.context.slash.AppCommandContext, type=mock.Mock(), @@ -925,55 +927,55 @@ async def test_edit_initial_response_when_delete_after_will_have_expired( @pytest.mark.asyncio async def test_edit_last_response_when_only_initial_response( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_edit_last_response_when_initial_response_deferred( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_edit_last_response_when_only_initial_response_or_deferred_and_delete_after( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_edit_last_response_when_only_initial_response_or_deferred_and_delete_after_will_have_expired( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_edit_last_response_when_multiple_responses( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio async def test_edit_last_response_when_no_previous_response( self, context: tanjun.context.slash.AppCommandContext - ): ... + ) -> None: ... @pytest.mark.asyncio - async def test_fetch_initial_response(self, context: tanjun.context.slash.AppCommandContext): + async def test_fetch_initial_response(self, context: tanjun.context.slash.AppCommandContext) -> None: assert isinstance(context.interaction.fetch_initial_response, mock.AsyncMock) assert await context.fetch_initial_response() is context.interaction.fetch_initial_response.return_value context.interaction.fetch_initial_response.assert_awaited_once_with() @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_fetch_last_response(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_fetch_last_response(self, context: tanjun.context.slash.AppCommandContext) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_create_modal_response(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_create_modal_response(self, context: tanjun.context.slash.AppCommandContext) -> None: ... @pytest.mark.skip(reason="not implemented") @pytest.mark.asyncio - async def test_respond(self, context: tanjun.context.slash.AppCommandContext): ... + async def test_respond(self, context: tanjun.context.slash.AppCommandContext) -> None: ... class TestSlashContext: @@ -984,14 +986,14 @@ def context(self, mock_client: mock.Mock) -> tanjun.context.SlashContext: @pytest.mark.parametrize("raw_options", [None, []]) def test_options_property_when_no_options( self, mock_client: mock.Mock, raw_options: list[hikari.OptionType] | None - ): + ) -> None: context = tanjun.context.SlashContext( mock_client, mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=raw_options), mock.Mock() ) assert context.options == {} - def test_options_property_for_top_level_command(self, mock_client: mock.Mock): + def test_options_property_for_top_level_command(self, mock_client: mock.Mock) -> None: mock_option_1 = mock.Mock() mock_option_1.name = "hi" mock_option_2 = mock.Mock() @@ -1011,7 +1013,7 @@ def test_options_property_for_top_level_command(self, mock_client: mock.Mock): assert context.options["bye"].name is mock_option_2.name assert isinstance(context.options["bye"], tanjun.context.SlashOption) - def test_options_property_for_command_group(self, mock_client: mock.Mock): + def test_options_property_for_command_group(self, mock_client: mock.Mock) -> None: mock_option_1 = mock.Mock() mock_option_1.name = "kachow" mock_option_2 = mock.Mock() @@ -1033,13 +1035,13 @@ def test_options_property_for_command_group(self, mock_client: mock.Mock): @pytest.mark.parametrize("raw_options", [None, []]) def test_options_property_for_command_group_with_no_sub_option( self, mock_client: mock.Mock, raw_options: list[hikari.OptionType] | None - ): + ) -> None: group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=raw_options) context = tanjun.context.SlashContext(mock_client, mock.Mock(options=[group_option]), mock.Mock()) assert context.options == {} - def test_options_property_for_sub_command_group(self, mock_client: mock.Mock): + def test_options_property_for_sub_command_group(self, mock_client: mock.Mock) -> None: mock_option_1 = mock.Mock() mock_option_1.name = "meow" mock_option_2 = mock.Mock() @@ -1062,17 +1064,17 @@ def test_options_property_for_sub_command_group(self, mock_client: mock.Mock): @pytest.mark.parametrize("raw_options", [None, []]) def test_options_property_for_sub_command_group_with_no_sub_option( self, mock_client: mock.Mock, raw_options: list[hikari.OptionType] | None - ): + ) -> None: sub_group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=raw_options) group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND_GROUP, options=[sub_group_option]) context = tanjun.context.SlashContext(mock_client, mock.Mock(options=[group_option]), mock.Mock()) assert context.options == {} - def test_triggering_name_property_for_top_level_command(self, context: tanjun.context.slash.SlashContext): + def test_triggering_name_property_for_top_level_command(self, context: tanjun.context.slash.SlashContext) -> None: assert context.triggering_name is context.interaction.command_name - def test_triggering_name_property_for_sub_command(self, mock_client: mock.Mock): + def test_triggering_name_property_for_sub_command(self, mock_client: mock.Mock) -> None: group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=None) group_option.name = "daniel" context = tanjun.context.SlashContext( @@ -1081,7 +1083,7 @@ def test_triggering_name_property_for_sub_command(self, mock_client: mock.Mock): assert context.triggering_name == "damn daniel" - def test_triggering_name_property_for_sub_sub_command(self, mock_client: mock.Mock): + def test_triggering_name_property_for_sub_sub_command(self, mock_client: mock.Mock) -> None: sub_group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND, options=None) sub_group_option.name = "nyaa" group_option = mock.Mock(type=hikari.OptionType.SUB_COMMAND_GROUP, options=[sub_group_option]) @@ -1092,11 +1094,11 @@ def test_triggering_name_property_for_sub_sub_command(self, mock_client: mock.Mo assert context.triggering_name == "meow xes nyaa" - def test_type_property(self, context: tanjun.context.SlashContext): + def test_type_property(self, context: tanjun.context.SlashContext) -> None: assert context.type is hikari.CommandType.SLASH @pytest.mark.asyncio - async def test_mark_not_found(self): + async def test_mark_not_found(self) -> None: on_not_found = mock.AsyncMock() context = tanjun.context.SlashContext( mock.Mock(), mock.Mock(options=None), mock.Mock(), on_not_found=on_not_found @@ -1107,13 +1109,13 @@ async def test_mark_not_found(self): on_not_found.assert_awaited_once_with(context) @pytest.mark.asyncio - async def test_mark_not_found_when_no_callback(self): + async def test_mark_not_found_when_no_callback(self) -> None: context = tanjun.context.SlashContext(mock.Mock(), mock.Mock(options=None), mock.Mock(), on_not_found=None) await context.mark_not_found() @pytest.mark.asyncio - async def test_mark_not_found_when_already_marked_as_not_found(self): + async def test_mark_not_found_when_already_marked_as_not_found(self) -> None: on_not_found = mock.AsyncMock() context = tanjun.context.SlashContext( mock.Mock(), mock.Mock(options=None), mock.Mock(), on_not_found=on_not_found @@ -1125,7 +1127,7 @@ async def test_mark_not_found_when_already_marked_as_not_found(self): on_not_found.assert_not_called() - def test_set_command(self, context: tanjun.context.SlashContext): + def test_set_command(self, context: tanjun.context.SlashContext) -> None: mock_command = mock.Mock() assert context.set_command(mock_command) is context @@ -1136,7 +1138,7 @@ def test_set_command(self, context: tanjun.context.SlashContext): assert context.get_type_dependency(tanjun.abc.BaseSlashCommand) is mock_command assert context.get_type_dependency(tanjun.abc.SlashCommand) is mock_command - def test_set_command_when_none(self, context: tanjun.context.SlashContext): + def test_set_command_when_none(self, context: tanjun.context.SlashContext) -> None: context.set_command(None) context.set_command(None) @@ -1154,7 +1156,7 @@ def test_set_command_when_none(self, context: tanjun.context.SlashContext): with pytest.raises(KeyError): assert context.get_type_dependency(tanjun.abc.SlashCommand) - def test_set_command_when_none_and_previously_set(self, context: tanjun.context.SlashContext): + def test_set_command_when_none_and_previously_set(self, context: tanjun.context.SlashContext) -> None: mock_command = mock.Mock() context.set_command(mock_command) context.set_command(None) @@ -1173,7 +1175,7 @@ def test_set_command_when_none_and_previously_set(self, context: tanjun.context. with pytest.raises(KeyError): assert context.get_type_dependency(tanjun.abc.SlashCommand) - def test_set_command_when_finalised(self, context: tanjun.context.SlashContext): + def test_set_command_when_finalised(self, context: tanjun.context.SlashContext) -> None: context.finalise() mock_command = mock.Mock() diff --git a/tests/dependencies/__init__.py b/tests/dependencies/__init__.py index 279f959a8..0b621117b 100644 --- a/tests/dependencies/__init__.py +++ b/tests/dependencies/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tests/dependencies/test___init__.py b/tests/dependencies/test___init__.py index 3bb38ff13..df1091966 100644 --- a/tests/dependencies/test___init__.py +++ b/tests/dependencies/test___init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -39,7 +38,7 @@ import tanjun -def test_set_standard_dependencies(): +def test_set_standard_dependencies() -> None: mock_client = mock.Mock(tanjun.Client) mock_client.set_type_dependency.return_value = mock_client diff --git a/tests/dependencies/test_callbacks.py b/tests/dependencies/test_callbacks.py index cdb02868c..6d5e99a42 100644 --- a/tests/dependencies/test_callbacks.py +++ b/tests/dependencies/test_callbacks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -41,7 +40,7 @@ @pytest.mark.asyncio -async def test_fetch_my_user_when_cached(): +async def test_fetch_my_user_when_cached() -> None: mock_client = mock.Mock() mock_cache = mock.AsyncMock() @@ -54,7 +53,7 @@ async def test_fetch_my_user_when_cached(): @pytest.mark.asyncio -async def test_fetch_my_user_when_not_cached_but_async_cache_returns(): +async def test_fetch_my_user_when_not_cached_but_async_cache_returns() -> None: mock_client = mock.Mock() mock_client.cache.get_me.return_value = None mock_cache = mock.AsyncMock() @@ -68,7 +67,7 @@ async def test_fetch_my_user_when_not_cached_but_async_cache_returns(): @pytest.mark.asyncio -async def test_fetch_my_user_when_no_cache_but_async_cache_returns(): +async def test_fetch_my_user_when_no_cache_but_async_cache_returns() -> None: mock_client = mock.Mock() mock_client.cache = None mock_cache = mock.AsyncMock() @@ -81,7 +80,7 @@ async def test_fetch_my_user_when_no_cache_but_async_cache_returns(): @pytest.mark.asyncio -async def test_fetch_my_user_when_not_cached_token_type_isnt_bot(): +async def test_fetch_my_user_when_not_cached_token_type_isnt_bot() -> None: mock_client = mock.Mock() mock_client.rest.token_type = hikari.TokenType.BEARER mock_client.cache.get_me.return_value = None @@ -96,7 +95,7 @@ async def test_fetch_my_user_when_not_cached_token_type_isnt_bot(): @pytest.mark.asyncio -async def test_fetch_my_user_when_not_cache_bound_and_async_cache_returns_none_falls_back_to_rest(): +async def test_fetch_my_user_when_not_cache_bound_and_async_cache_returns_none_falls_back_to_rest() -> None: mock_client = mock.Mock() mock_client.rest.token_type = hikari.TokenType.BOT mock_client.rest.fetch_my_user = mock.AsyncMock(return_value=mock.Mock()) @@ -112,7 +111,7 @@ async def test_fetch_my_user_when_not_cache_bound_and_async_cache_returns_none_f @pytest.mark.asyncio -async def test_fetch_my_user_when_not_cache_bound_and_not_async_cache_falls_back_to_rest(): +async def test_fetch_my_user_when_not_cache_bound_and_not_async_cache_falls_back_to_rest() -> None: mock_client = mock.Mock() mock_client.rest.token_type = hikari.TokenType.BOT mock_client.rest.fetch_my_user = mock.AsyncMock(return_value=mock.Mock()) diff --git a/tests/dependencies/test_data.py b/tests/dependencies/test_data.py index 3892d8688..31950f799 100644 --- a/tests/dependencies/test_data.py +++ b/tests/dependencies/test_data.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -45,21 +44,21 @@ class TestLazyConstant: - def test_callback_property(self): + def test_callback_property(self) -> None: mock_callback = mock.Mock() assert tanjun.LazyConstant(mock_callback).callback is mock_callback - def test_get_value(self): + def test_get_value(self) -> None: assert tanjun.LazyConstant(mock.Mock()).get_value() is None - def test_reset(self): + def test_reset(self) -> None: constant = tanjun.LazyConstant(mock.Mock()).set_value(mock.Mock()) constant.reset() assert constant.get_value() is None - def test_set_value(self): + def test_set_value(self) -> None: mock_value = mock.Mock() constant = tanjun.LazyConstant(mock.Mock()) constant._lock = mock.Mock() @@ -70,7 +69,7 @@ def test_set_value(self): assert constant.get_value() is mock_value assert constant._lock is None - def test_set_value_when_value_already_set(self): + def test_set_value_when_value_already_set(self) -> None: mock_value = mock.Mock() constant = tanjun.LazyConstant(mock.Mock()).set_value(mock_value) constant._lock = mock.Mock() @@ -81,7 +80,7 @@ def test_set_value_when_value_already_set(self): assert constant.get_value() is mock_value @pytest.mark.asyncio - async def test_acquire(self): + async def test_acquire(self) -> None: with mock.patch.object(asyncio, "Lock") as lock: constant = tanjun.LazyConstant(mock.Mock()) lock.assert_not_called() @@ -98,15 +97,15 @@ async def test_acquire(self): @pytest.mark.skip(reason="Not Implemented") @pytest.mark.asyncio -async def test_make_lc_resolver_when_already_cached(): ... +async def test_make_lc_resolver_when_already_cached() -> None: ... @pytest.mark.skip(reason="Not Implemented") @pytest.mark.asyncio -async def test_make_lc_resolver(): ... +async def test_make_lc_resolver() -> None: ... -def test_inject_lc(): +def test_inject_lc() -> None: mock_type: typing.Any = mock.Mock() with ( @@ -121,13 +120,13 @@ def test_inject_lc(): @pytest.mark.parametrize("expire_after", [0.0, -1, datetime.timedelta(seconds=-2)]) -def test_cache_callback_when_invalid_expire_after(expire_after: float | int | datetime.timedelta): +def test_cache_callback_when_invalid_expire_after(expire_after: float | int | datetime.timedelta) -> None: with pytest.raises(ValueError, match="expire_after must be more than 0 seconds"): tanjun.dependencies.data.cache_callback(mock.Mock(), expire_after=expire_after) @pytest.mark.asyncio -async def test_cache_callback(): +async def test_cache_callback() -> None: mock_callback = mock.AsyncMock() mock_context = mock.AsyncMock() cached_callback = tanjun.dependencies.data.cache_callback(mock_callback) @@ -150,7 +149,7 @@ async def test_cache_callback(): @pytest.mark.parametrize("expire_after", [4, 4.0, datetime.timedelta(seconds=4)]) @pytest.mark.asyncio -async def test_cache_callback_when_expired(expire_after: float | int | datetime.timedelta): +async def test_cache_callback_when_expired(expire_after: float | int | datetime.timedelta) -> None: mock_callback = mock.AsyncMock() mock_first_context = mock.AsyncMock() mock_second_context = mock.AsyncMock() @@ -180,7 +179,7 @@ async def test_cache_callback_when_expired(expire_after: float | int | datetime. @pytest.mark.parametrize("expire_after", [15, 15.0, datetime.timedelta(seconds=15)]) @pytest.mark.asyncio -async def test_cache_callback_when_not_expired(expire_after: float | int | datetime.timedelta): +async def test_cache_callback_when_not_expired(expire_after: float | int | datetime.timedelta) -> None: mock_callback = mock.AsyncMock() mock_context = mock.AsyncMock() cached_callback = tanjun.dependencies.data.cache_callback(mock_callback, expire_after=expire_after) @@ -206,7 +205,7 @@ async def test_cache_callback_when_not_expired(expire_after: float | int | datet assert len(results) == 6 -def test_cached_inject(): +def test_cached_inject() -> None: mock_callback = mock.Mock() with ( @@ -220,7 +219,7 @@ def test_cached_inject(): cache_callback.assert_called_once_with(mock_callback, expire_after=datetime.timedelta(seconds=15)) -def test_cached_inject_with_defaults(): +def test_cached_inject_with_defaults() -> None: mock_callback = mock.Mock() with ( diff --git a/tests/dependencies/test_limiters.py b/tests/dependencies/test_limiters.py index c26e2754b..8dfdd9f8c 100644 --- a/tests/dependencies/test_limiters.py +++ b/tests/dependencies/test_limiters.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -47,12 +46,12 @@ def _now() -> datetime.datetime: - return datetime.datetime.now(tz=datetime.timezone.utc) + return datetime.datetime.now(tz=datetime.UTC) class TestAbstractCooldownManager: @pytest.mark.asyncio - async def test_increment_cooldown(self): + async def test_increment_cooldown(self) -> None: mock_try_acquire = mock.AsyncMock() mock_release = mock.AsyncMock() @@ -74,7 +73,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_release.assert_awaited_once_with("catgirl neko", mock_context) @pytest.mark.asyncio - async def test_increment_cooldown_when_resource_depleted(self): + async def test_increment_cooldown_when_resource_depleted(self) -> None: mock_try_acquire = mock.AsyncMock(side_effect=tanjun.dependencies.CooldownDepleted(None)) mock_release = mock.AsyncMock() @@ -96,7 +95,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_release.assert_not_called() @pytest.mark.asyncio - async def test_acquire(self): + async def test_acquire(self) -> None: mock_try_acquire = mock.AsyncMock() mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -120,7 +119,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_error_callback.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_ended_by_raise(self): + async def test_acquire_when_ended_by_raise(self) -> None: mock_try_acquire = mock.AsyncMock() mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -140,17 +139,18 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_try_acquire.assert_awaited_once_with("buuuuu", mock_ctx) mock_release.assert_not_called() - raise RuntimeError("bye") + error_message = "bye" + raise RuntimeError(error_message) mock_try_acquire.assert_awaited_once_with("buuuuu", mock_ctx) mock_release.assert_awaited_once_with("buuuuu", mock_ctx) mock_error_callback.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_errors(self): + async def test_acquire_when_errors(self) -> None: mock_try_acquire = mock.AsyncMock( side_effect=tanjun.dependencies.CooldownDepleted( - datetime.datetime(2023, 5, 19, 21, 20, 28, 782112, tzinfo=datetime.timezone.utc) + datetime.datetime(2023, 5, 19, 21, 20, 28, 782112, tzinfo=datetime.UTC) ) ) mock_release = mock.AsyncMock() @@ -165,7 +165,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): manager = CooldownManager() - with pytest.raises(tanjun.CommandError) as exc: # noqa: PT012 + with pytest.raises(tanjun.CommandError) as exc: async with manager.acquire("mooo", mock_ctx): pytest.fail("Should never be reached") @@ -174,7 +174,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_release.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_errors_with_unknown_wait_until(self): + async def test_acquire_when_errors_with_unknown_wait_until(self) -> None: mock_try_acquire = mock.AsyncMock(side_effect=tanjun.dependencies.CooldownDepleted(None)) mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -188,7 +188,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): manager = CooldownManager() - with pytest.raises(tanjun.CommandError) as exc: # noqa: PT012 + with pytest.raises(tanjun.CommandError) as exc: async with manager.acquire("mooo", mock_ctx): pytest.fail("Should never be reached") @@ -197,8 +197,8 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_release.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_custom_error(self): - expected_datetime = datetime.datetime(2023, 7, 19, 21, 20, 28, 782112, tzinfo=datetime.timezone.utc) + async def test_acquire_when_custom_error(self) -> None: + expected_datetime = datetime.datetime(2023, 7, 19, 21, 20, 28, 782112, tzinfo=datetime.UTC) expected_error = Exception("It's 5 nights at Fred bear's") mock_try_acquire = mock.AsyncMock(side_effect=tanjun.dependencies.CooldownDepleted(expected_datetime)) mock_release = mock.AsyncMock() @@ -214,7 +214,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): manager = CooldownManager() - with pytest.raises(Exception, match="It's 5 nights at Fred bear's") as exc: # noqa: PT012 + with pytest.raises(Exception, match="It's 5 nights at Fred bear's") as exc: async with manager.acquire("ooop", mock_ctx, error=mock_error_callback): pytest.fail("Should never be reached") @@ -224,7 +224,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_error_callback.assert_called_once_with(expected_datetime) @pytest.mark.asyncio - async def test_acquire_when_already_acquired(self): + async def test_acquire_when_already_acquired(self) -> None: mock_try_acquire = mock.AsyncMock() mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -244,7 +244,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_try_acquire.assert_awaited_once_with("oop", mock_ctx) mock_release.assert_not_called() - with pytest.raises(RuntimeError, match="Already acquired"): # noqa: PT012 + with pytest.raises(RuntimeError, match="Already acquired"): async with acquire: pytest.fail("Should never be reached") @@ -253,7 +253,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): mock_error_callback.assert_not_called() @pytest.mark.asyncio - async def test_release_when_not_acquired(self): + async def test_release_when_not_acquired(self) -> None: mock_try_acquire = mock.AsyncMock() mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -280,7 +280,7 @@ class CooldownManager(tanjun.dependencies.AbstractCooldownManager): class TestAbstractConcurrencyLimiter: @pytest.mark.asyncio - async def test_acquire(self): + async def test_acquire(self) -> None: mock_ctx = mock.Mock() mock_error_callback = mock.Mock() mock_try_acquire = mock.AsyncMock() @@ -303,7 +303,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): mock_error_callback.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_ended_by_raise(self): + async def test_acquire_when_ended_by_raise(self) -> None: mock_ctx = mock.Mock() mock_error_callback = mock.Mock() mock_try_acquire = mock.AsyncMock() @@ -322,14 +322,15 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): mock_try_acquire.assert_awaited_once_with("oooooo", mock_ctx) mock_release.assert_not_called() - raise RuntimeError("yeet") + error_message = "yeet" + raise RuntimeError(error_message) mock_try_acquire.assert_awaited_once_with("oooooo", mock_ctx) mock_release.assert_awaited_once_with("oooooo", mock_ctx) mock_error_callback.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_errors(self): + async def test_acquire_when_errors(self) -> None: mock_ctx = mock.Mock() mock_try_acquire = mock.AsyncMock(side_effect=tanjun.dependencies.ResourceDepleted) mock_release = mock.AsyncMock() @@ -342,7 +343,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): limiter = ConcurrencyLimiter() - with pytest.raises(tanjun.CommandError) as exc: # noqa: PT012 + with pytest.raises(tanjun.CommandError) as exc: async with limiter.acquire("oooooo", mock_ctx): pytest.fail("Should never be reached") @@ -351,7 +352,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): mock_release.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_custom_error(self): + async def test_acquire_when_custom_error(self) -> None: mock_ctx = mock.Mock() expected_error = Exception("P music") mock_error_callback = mock.Mock(side_effect=expected_error) @@ -366,7 +367,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): limiter = ConcurrencyLimiter() - with pytest.raises(Exception, match="P music") as exc: # noqa: PT012 + with pytest.raises(Exception, match="P music") as exc: async with limiter.acquire("oooooo", mock_ctx, error=mock_error_callback): pytest.fail("Should never be reached") @@ -375,7 +376,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): mock_release.assert_not_called() @pytest.mark.asyncio - async def test_acquire_when_already_acquired(self): + async def test_acquire_when_already_acquired(self) -> None: mock_ctx = mock.Mock() mock_error_callback = mock.Mock() mock_try_acquire = mock.AsyncMock() @@ -394,7 +395,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): mock_try_acquire.assert_awaited_once_with("oooooo", mock_ctx) mock_release.assert_not_called() - with pytest.raises(RuntimeError, match="Already acquired"): # noqa: PT012 + with pytest.raises(RuntimeError, match="Already acquired"): async with acquire: pytest.fail("Should never be reached") @@ -403,7 +404,7 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): mock_error_callback.assert_not_called() @pytest.mark.asyncio - async def test_release_when_not_acquired(self): + async def test_release_when_not_acquired(self) -> None: mock_ctx = mock.Mock() mock_error_callback = mock.Mock() mock_try_acquire = mock.AsyncMock() @@ -436,12 +437,14 @@ class ConcurrencyLimiter(tanjun.dependencies.AbstractConcurrencyLimiter): ], ) @pytest.mark.asyncio -async def test__get_ctx_target(resource_type: tanjun.BucketResource, mock_ctx: tanjun.abc.Context, expected: int): +async def test__get_ctx_target( + resource_type: tanjun.BucketResource, mock_ctx: tanjun.abc.Context, expected: int +) -> None: assert await tanjun.dependencies.limiters._get_ctx_target(mock_ctx, resource_type) == expected @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_and_cache_result(): +async def test__get_ctx_target_when_parent_channel_and_cache_result() -> None: mock_context = mock.Mock() mock_context.get_channel.return_value = mock.Mock(parent_id=5132, id=123321) @@ -454,7 +457,7 @@ async def test__get_ctx_target_when_parent_channel_and_cache_result(): @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_and_cache_result_has_no_parent(): +async def test__get_ctx_target_when_parent_channel_and_cache_result_has_no_parent() -> None: mock_context = mock.Mock() mock_context.get_channel.return_value = mock.Mock(parent_id=None, id=6534234) @@ -467,7 +470,7 @@ async def test__get_ctx_target_when_parent_channel_and_cache_result_has_no_paren @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_when_async_channel_cache_returns(): +async def test__get_ctx_target_when_parent_channel_when_async_channel_cache_returns() -> None: mock_channel_cache = mock.AsyncMock() mock_channel_cache.get.return_value = mock.Mock(parent_id=3421123, id=123321) mock_context = mock.Mock(base_context.BaseContext) @@ -486,7 +489,7 @@ async def test__get_ctx_target_when_parent_channel_when_async_channel_cache_retu @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_when_async_channel_cache_returns_has_no_parent(): +async def test__get_ctx_target_when_parent_channel_when_async_channel_cache_returns_has_no_parent() -> None: mock_channel_cache = mock.AsyncMock() mock_channel_cache.get.return_value = mock.Mock(parent_id=None, id=123) mock_context = mock.Mock(base_context.BaseContext) @@ -505,7 +508,7 @@ async def test__get_ctx_target_when_parent_channel_when_async_channel_cache_retu @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_when_async_thread_cache_returns(): +async def test__get_ctx_target_when_parent_channel_when_async_thread_cache_returns() -> None: mock_channel_cache = mock.AsyncMock() mock_channel_cache.get.return_value = None mock_thread_cache = mock.AsyncMock() @@ -530,7 +533,7 @@ async def test__get_ctx_target_when_parent_channel_when_async_thread_cache_retur @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_when_async_caches_returns_none_falls_back_to_rest(): +async def test__get_ctx_target_when_parent_channel_when_async_caches_returns_none_falls_back_to_rest() -> None: mock_context = mock.Mock(base_context.BaseContext) mock_context.get_channel.return_value = None mock_context.fetch_channel = mock.AsyncMock( @@ -558,7 +561,9 @@ async def test__get_ctx_target_when_parent_channel_when_async_caches_returns_non @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_when_async_caches_returns_none_falls_back_to_rest_has_no_parent(): +async def test__get_ctx_target_when_parent_channel_when_async_caches_returns_none_falls_back_to_rest_has_no_parent() -> ( + None +): mock_context = mock.Mock(base_context.BaseContext) mock_context.get_channel.return_value = None mock_context.fetch_channel = mock.AsyncMock(return_value=mock.Mock(hikari.GuildChannel, parent_id=None, id=123)) @@ -584,7 +589,7 @@ async def test__get_ctx_target_when_parent_channel_when_async_caches_returns_non @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_and_no_async_caches_falls_back_to_rest(): +async def test__get_ctx_target_when_parent_channel_and_no_async_caches_falls_back_to_rest() -> None: mock_context = mock.Mock(base_context.BaseContext) mock_context.get_channel.return_value = None mock_context.fetch_channel = mock.AsyncMock( @@ -606,7 +611,7 @@ async def test__get_ctx_target_when_parent_channel_and_no_async_caches_falls_bac @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_and_no_async_caches_falls_back_to_rest_has_no_parent(): +async def test__get_ctx_target_when_parent_channel_and_no_async_caches_falls_back_to_rest_has_no_parent() -> None: mock_context = mock.Mock(base_context.BaseContext) mock_context.get_channel.return_value = None mock_context.fetch_channel = mock.AsyncMock(return_value=mock.Mock(hikari.GuildChannel, parent_id=None, id=123)) @@ -626,7 +631,7 @@ async def test__get_ctx_target_when_parent_channel_and_no_async_caches_falls_bac @pytest.mark.asyncio -async def test__get_ctx_target_when_parent_channel_and_dm_bound(): +async def test__get_ctx_target_when_parent_channel_and_dm_bound() -> None: mock_context = mock.Mock(guild_id=None) result = await tanjun.dependencies.limiters._get_ctx_target(mock_context, tanjun.BucketResource.PARENT_CHANNEL) @@ -635,7 +640,7 @@ async def test__get_ctx_target_when_parent_channel_and_dm_bound(): @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role(): +async def test__get_ctx_target_when_top_role() -> None: mock_roles = [ mock.Mock(id=123321, position=555), mock.Mock(id=42123, position=56), @@ -656,7 +661,7 @@ async def test__get_ctx_target_when_top_role(): @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role_and_async_cache(): +async def test__get_ctx_target_when_top_role_and_async_cache() -> None: mock_context = mock.Mock(base_context.BaseContext) mock_context.member.role_ids = [674345, 123876, 7643, 9999999] mock_context.member.get_roles = mock.Mock(return_value=[]) @@ -678,7 +683,7 @@ async def test__get_ctx_target_when_top_role_and_async_cache(): @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role_falls_back_to_rest_when_async_cache_raises_cache_miss(): +async def test__get_ctx_target_when_top_role_falls_back_to_rest_when_async_cache_raises_cache_miss() -> None: mock_roles = [ mock.Mock(id=123321, position=42), mock.Mock(id=123322, position=43), @@ -703,7 +708,7 @@ async def test__get_ctx_target_when_top_role_falls_back_to_rest_when_async_cache @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role_falls_back_to_rest(): +async def test__get_ctx_target_when_top_role_falls_back_to_rest() -> None: mock_roles = [ mock.Mock(id=123321, position=42), mock.Mock(id=123322, position=43), @@ -725,7 +730,7 @@ async def test__get_ctx_target_when_top_role_falls_back_to_rest(): @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role_when_dm_bound(): +async def test__get_ctx_target_when_top_role_when_dm_bound() -> None: mock_context = mock.Mock(guild_id=None) result = await tanjun.dependencies.limiters._get_ctx_target(mock_context, tanjun.BucketResource.TOP_ROLE) @@ -734,7 +739,7 @@ async def test__get_ctx_target_when_top_role_when_dm_bound(): @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role_when_no_member_in_guild(): +async def test__get_ctx_target_when_top_role_when_no_member_in_guild() -> None: mock_context = mock.Mock(guild_id=654124, member=None) result = await tanjun.dependencies.limiters._get_ctx_target(mock_context, tanjun.BucketResource.TOP_ROLE) @@ -745,7 +750,7 @@ async def test__get_ctx_target_when_top_role_when_no_member_in_guild(): @pytest.mark.parametrize("role_ids", [[123321], []]) @pytest.mark.asyncio -async def test__get_ctx_target_when_top_role_when_no_roles_or_only_1_role(role_ids: list[int]): +async def test__get_ctx_target_when_top_role_when_no_roles_or_only_1_role(role_ids: list[int]) -> None: mock_context = mock.Mock(guild_id=123312) mock_context.member.role_ids = role_ids @@ -756,20 +761,20 @@ async def test__get_ctx_target_when_top_role_when_no_roles_or_only_1_role(role_i @pytest.mark.asyncio -async def test__get_ctx_target_when_unexpected_type(): +async def test__get_ctx_target_when_unexpected_type() -> None: with pytest.raises(ValueError, match="Unexpected type BucketResource.MEMBER"): await tanjun.dependencies.limiters._get_ctx_target(mock.Mock(), tanjun.BucketResource.MEMBER) class TestCooldown: - def test_has_expired_property(self): + def test_has_expired_property(self) -> None: cooldown = tanjun.dependencies.limiters._Cooldown(limit=1, reset_after=datetime.timedelta(seconds=60)) cooldown.increment(mock.Mock()) assert cooldown.has_expired() is False - def test_has_expired_property_after_unlock(self): + def test_has_expired_property_after_unlock(self) -> None: mock_ctx = mock.Mock() cooldown = tanjun.dependencies.limiters._Cooldown(limit=1, reset_after=datetime.timedelta(seconds=60)) @@ -778,14 +783,14 @@ def test_has_expired_property_after_unlock(self): assert cooldown.has_expired() is False - def test_has_expired_property_when_has_expired(self): + def test_has_expired_property_when_has_expired(self) -> None: cooldown = tanjun.dependencies.limiters._Cooldown( limit=1, reset_after=datetime.timedelta(seconds=26, milliseconds=500) ) assert cooldown.has_expired() is True - def test_has_expired_property_when_tracking_expired_acquires(self): + def test_has_expired_property_when_tracking_expired_acquires(self) -> None: cooldown = tanjun.dependencies.limiters._Cooldown( limit=1, reset_after=datetime.timedelta(seconds=26, milliseconds=500) ) @@ -797,7 +802,7 @@ def test_has_expired_property_when_tracking_expired_acquires(self): assert cooldown.has_expired() is True - def test_check_clears_old_releases(self): + def test_check_clears_old_releases(self) -> None: now = _now() mock_ctx_1 = mock.Mock() mock_ctx_2 = mock.Mock() @@ -820,7 +825,7 @@ def test_check_clears_old_releases(self): now + datetime.timedelta(seconds=37, milliseconds=420), ] - def test(self): + def test(self) -> None: now = _now() mock_ctx = mock.Mock() mock_other_ctx = mock.Mock() @@ -842,7 +847,7 @@ def test(self): ] assert cooldown.check() - def test_when_counter_no_ctxs_tracked(self): + def test_when_counter_no_ctxs_tracked(self) -> None: mock_ctx = mock.Mock() cooldown = tanjun.dependencies.limiters._Cooldown( limit=5, reset_after=datetime.timedelta(seconds=69, milliseconds=420) @@ -854,7 +859,7 @@ def test_when_counter_no_ctxs_tracked(self): assert cooldown.resets == [] assert cooldown.check() - def test_when_counter_is_at_limit(self): + def test_when_counter_is_at_limit(self) -> None: now = _now() mock_ctx = mock.Mock() mock_ctx_1 = mock.Mock() @@ -880,7 +885,7 @@ def test_when_counter_is_at_limit(self): now + datetime.timedelta(seconds=64, milliseconds=420), ] - def test_when_counter_is_at_limit_from_only_locks(self): + def test_when_counter_is_at_limit_from_only_locks(self) -> None: cooldown = tanjun.dependencies.limiters._Cooldown( limit=5, reset_after=datetime.timedelta(seconds=69, milliseconds=420) ) @@ -895,7 +900,7 @@ def test_when_counter_is_at_limit_from_only_locks(self): assert exc.value.wait_until is None - def test_when_counter_is_at_limit_from_only_unlocked_tracks(self): + def test_when_counter_is_at_limit_from_only_unlocked_tracks(self) -> None: now = _now() cooldown = tanjun.dependencies.limiters._Cooldown( limit=5, reset_after=datetime.timedelta(seconds=69, milliseconds=420) @@ -913,7 +918,7 @@ def test_when_counter_is_at_limit_from_only_unlocked_tracks(self): assert exc.value.wait_until == now + datetime.timedelta(seconds=34, milliseconds=420) - def test_when_limit_is_negeative_1(self): + def test_when_limit_is_negeative_1(self) -> None: cooldown = tanjun.dependencies.limiters._Cooldown( limit=-1, reset_after=datetime.timedelta(seconds=69, milliseconds=420) ) @@ -928,7 +933,7 @@ def test_when_limit_is_negeative_1(self): class TestFlatResource: @pytest.mark.asyncio - async def test_try_into_inner(self): + async def test_try_into_inner(self) -> None: mock_resource_maker = mock.Mock() mock_resource = mock.Mock() bucket = tanjun.dependencies.limiters._FlatResource(tanjun.BucketResource.USER, mock_resource_maker) @@ -943,7 +948,7 @@ async def test_try_into_inner(self): assert bucket.mapping[hikari.Snowflake(321123)] is mock_resource @pytest.mark.asyncio - async def test_try_into_inner_when_resource_doesnt_exist(self): + async def test_try_into_inner_when_resource_doesnt_exist(self) -> None: mock_resource_maker = mock.Mock() bucket = tanjun.dependencies.limiters._FlatResource(tanjun.BucketResource.USER, mock_resource_maker) mock_context = mock.Mock() @@ -956,7 +961,7 @@ async def test_try_into_inner_when_resource_doesnt_exist(self): assert hikari.Snowflake(123321) not in bucket.mapping @pytest.mark.asyncio - async def test_into_inner(self): + async def test_into_inner(self) -> None: mock_resource_maker = mock.Mock() mock_resource = mock.Mock() bucket = tanjun.dependencies.limiters._FlatResource(tanjun.BucketResource.USER, mock_resource_maker) @@ -971,7 +976,7 @@ async def test_into_inner(self): assert bucket.mapping[hikari.Snowflake(3333)] is mock_resource @pytest.mark.asyncio - async def test_into_inner_creates_new_resource(self): + async def test_into_inner_creates_new_resource(self) -> None: mock_resource_maker = mock.Mock() bucket = tanjun.dependencies.limiters._FlatResource(tanjun.BucketResource.USER, mock_resource_maker) mock_context = mock.Mock() @@ -983,7 +988,7 @@ async def test_into_inner_creates_new_resource(self): mock_resource_maker.assert_called_once_with() assert bucket.mapping[hikari.Snowflake(123)] is mock_resource_maker.return_value - def test_cleanup(self): + def test_cleanup(self) -> None: mock_cooldown_1 = mock.Mock(has_expired=mock.Mock(return_value=False)) mock_cooldown_2 = mock.Mock(has_expired=mock.Mock(return_value=False)) mock_cooldown_3 = mock.Mock(has_expired=mock.Mock(return_value=False)) @@ -1143,7 +1148,7 @@ async def test_try_into_inner_when_dm_bound_and_user_not_found(self) -> None: mock_resource_maker.assert_not_called() assert hikari.Snowflake(555555) not in bucket.dm_fallback - def test_cleanup(self): + def test_cleanup(self) -> None: mock_cooldown_1 = mock.Mock(has_expired=mock.Mock(return_value=False)) mock_cooldown_2 = mock.Mock(has_expired=mock.Mock(return_value=False)) mock_cooldown_3 = mock.Mock(has_expired=mock.Mock(return_value=False)) @@ -1191,7 +1196,7 @@ def test_cleanup(self): class TestGlobalResource: @pytest.mark.asyncio - async def test_into_inner(self): + async def test_into_inner(self) -> None: mock_resource_maker = mock.Mock() bucket = tanjun.dependencies.limiters._GlobalResource(mock_resource_maker) @@ -1200,7 +1205,7 @@ async def test_into_inner(self): mock_resource_maker.assert_called_once_with() @pytest.mark.asyncio - async def test_try_into_inner(self): + async def test_try_into_inner(self) -> None: mock_resource_maker = mock.Mock() bucket = tanjun.dependencies.limiters._GlobalResource(mock_resource_maker) @@ -1208,13 +1213,13 @@ async def test_try_into_inner(self): assert await bucket.try_into_inner(mock.Mock()) is mock_resource_maker.return_value mock_resource_maker.assert_called_once_with() - def test_cleanup(self): + def test_cleanup(self) -> None: tanjun.dependencies.limiters._GlobalResource(mock.Mock()).cleanup() class TestInMemoryCooldownManager: @pytest.mark.asyncio - async def test__gc(self): + async def test__gc(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() mock_bucket_1 = mock.Mock() mock_bucket_2 = mock.Mock() @@ -1233,12 +1238,12 @@ async def test__gc(self): mock_bucket_2.cleanup.assert_has_calls([mock.call(), mock.call()]) mock_bucket_3.cleanup.assert_has_calls([mock.call(), mock.call()]) - def test_add_to_client(self): + def test_add_to_client(self) -> None: mock_client = mock.Mock(tanjun.Client, is_alive=False) mock_open = mock.Mock() class StubManager(tanjun.dependencies.InMemoryCooldownManager): - open = mock_open # noqa: VNE003 + open = mock_open manager = StubManager() manager.add_to_client(mock_client) @@ -1251,12 +1256,12 @@ class StubManager(tanjun.dependencies.InMemoryCooldownManager): ) mock_open.assert_not_called() - def test_add_to_client_when_client_is_active(self): + def test_add_to_client_when_client_is_active(self) -> None: mock_client = mock.Mock(tanjun.Client, is_alive=True) mock_open = mock.Mock() class StubManager(tanjun.dependencies.InMemoryCooldownManager): - open = mock_open # noqa: VNE003 + open = mock_open manager = StubManager() manager.add_to_client(mock_client) @@ -1270,7 +1275,7 @@ class StubManager(tanjun.dependencies.InMemoryCooldownManager): mock_open.assert_called_once_with(_loop=mock_client.loop) @pytest.mark.asyncio - async def test_try_acquire(self): + async def test_try_acquire(self) -> None: mock_bucket = mock.AsyncMock() mock_ctx = mock.Mock() inner = mock_bucket.into_inner.return_value = mock.Mock() @@ -1286,7 +1291,7 @@ async def test_try_acquire(self): assert manager._acquiring_ctxs[("yeet me", mock_ctx)] == inner @pytest.mark.asyncio - async def test_try_acquire_dedupes(self): + async def test_try_acquire_dedupes(self) -> None: mock_bucket = mock.AsyncMock() mock_ctx = mock.Mock() inner = mock_bucket.into_inner.return_value = mock.Mock() @@ -1303,7 +1308,7 @@ async def test_try_acquire_dedupes(self): assert manager._acquiring_ctxs[("yeet me", mock_ctx)] == inner @pytest.mark.asyncio - async def test_try_acquire_when_depleted(self): + async def test_try_acquire_when_depleted(self) -> None: expected_error = tanjun.dependencies.CooldownDepleted(None) mock_bucket = mock.AsyncMock() mock_ctx = mock.Mock() @@ -1322,7 +1327,7 @@ async def test_try_acquire_when_depleted(self): assert ("yeet me", mock_ctx) not in manager._acquiring_ctxs @pytest.mark.asyncio - async def test_try_acquire_falls_back_to_default(self): + async def test_try_acquire_falls_back_to_default(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager().set_bucket( "default", tanjun.dependencies.BucketResource.CHANNEL, 543, datetime.timedelta(50) ) @@ -1336,7 +1341,7 @@ async def test_try_acquire_falls_back_to_default(self): assert bucket.reset_after == datetime.timedelta(50) @pytest.mark.asyncio - async def test_try_acquire_with_custom_bucket(self): + async def test_try_acquire_with_custom_bucket(self) -> None: mock_bucket = mock.AsyncMock() mock_context = mock.Mock() manager = tanjun.dependencies.InMemoryCooldownManager().set_custom_bucket(mock_bucket, "meow meow") @@ -1346,7 +1351,7 @@ async def test_try_acquire_with_custom_bucket(self): mock_bucket.try_acquire.assert_awaited_once_with("meow meow", mock_context) @pytest.mark.asyncio - async def test_release(self): + async def test_release(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() mock_ctx = mock.Mock() mock_inner = mock.Mock() @@ -1358,14 +1363,14 @@ async def test_release(self): mock_inner.unlock.assert_called_once_with(mock_ctx) @pytest.mark.asyncio - async def test_release_when_not_tracked(self): + async def test_release_when_not_tracked(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with pytest.raises(tanjun.dependencies.ResourceNotTracked): await manager.release("oop", mock.Mock()) @pytest.mark.asyncio - async def test_release_with_custom_bucket(self): + async def test_release_with_custom_bucket(self) -> None: mock_bucket = mock.AsyncMock() mock_context = mock.Mock() manager = tanjun.dependencies.InMemoryCooldownManager().set_custom_bucket(mock_bucket, "meowers meowers") @@ -1375,7 +1380,7 @@ async def test_release_with_custom_bucket(self): mock_bucket.release.assert_awaited_once_with("meowers meowers", mock_context) @pytest.mark.asyncio - async def test_check_cooldown(self): + async def test_check_cooldown(self) -> None: mock_bucket = mock.AsyncMock() mock_bucket.into_inner.return_value = mock.Mock() mock_ctx = mock.Mock() @@ -1390,7 +1395,7 @@ async def test_check_cooldown(self): mock_bucket.into_inner.return_value.check.assert_called_once_with() @pytest.mark.asyncio - async def test_check_cooldown_for_acquired_context(self): + async def test_check_cooldown_for_acquired_context(self) -> None: mock_resource = mock.Mock() mock_ctx = mock.Mock() manager = tanjun.dependencies.InMemoryCooldownManager() @@ -1403,7 +1408,7 @@ async def test_check_cooldown_for_acquired_context(self): mock_resource.check.assert_called_once_with() @pytest.mark.asyncio - async def test_check_cooldown_when_cooldown_depleted(self): + async def test_check_cooldown_when_cooldown_depleted(self) -> None: date = _now() mock_bucket = mock.AsyncMock() mock_bucket.into_inner.return_value.check = mock.Mock(side_effect=tanjun.dependencies.CooldownDepleted(date)) @@ -1419,7 +1424,7 @@ async def test_check_cooldown_when_cooldown_depleted(self): mock_bucket.into_inner.return_value.check.assert_called_once_with() @pytest.mark.asyncio - async def test_check_cooldown_for_acquired_context_when_cooldown_depleted(self): + async def test_check_cooldown_for_acquired_context_when_cooldown_depleted(self) -> None: date = _now() mock_resource = mock.Mock() mock_resource.check.side_effect = tanjun.dependencies.CooldownDepleted(date) @@ -1434,44 +1439,44 @@ async def test_check_cooldown_for_acquired_context_when_cooldown_depleted(self): mock_resource.check.assert_called_once_with() @pytest.mark.asyncio - async def test_check_cooldown_when_cooldown_depleted_unknown_wait_until(self): + async def test_check_cooldown_when_cooldown_depleted_unknown_wait_until(self) -> None: mock_bucket = mock.AsyncMock() mock_bucket.into_inner.return_value.check = mock.Mock(side_effect=tanjun.dependencies.CooldownDepleted(None)) mock_ctx = mock.Mock() manager = tanjun.dependencies.InMemoryCooldownManager() manager._buckets["flirt"] = mock_bucket - date = datetime.datetime(2022, 5, 27, 23, 2, 40, 527391, tzinfo=datetime.timezone.utc) + date = datetime.datetime(2022, 5, 27, 23, 2, 40, 527391, tzinfo=datetime.UTC) with ( freezegun.freeze_time(date), pytest.warns(DeprecationWarning, match="Use .acquire or .try_acquire and .release to manage cooldowns"), ): result = await manager.check_cooldown("flirt", mock_ctx) # pyright: ignore[reportDeprecated] - assert result == datetime.datetime(2022, 5, 27, 23, 3, 40, 527391, tzinfo=datetime.timezone.utc) + assert result == datetime.datetime(2022, 5, 27, 23, 3, 40, 527391, tzinfo=datetime.UTC) mock_bucket.into_inner.assert_awaited_once_with(mock_ctx) mock_bucket.into_inner.return_value.check.assert_called_once_with() @pytest.mark.asyncio - async def test_check_cooldown_for_acquired_context_when_cooldown_depleted_unknown_wait_until(self): + async def test_check_cooldown_for_acquired_context_when_cooldown_depleted_unknown_wait_until(self) -> None: mock_resource = mock.Mock() mock_resource.check.side_effect = tanjun.dependencies.CooldownDepleted(None) mock_ctx = mock.Mock() manager = tanjun.dependencies.InMemoryCooldownManager() manager._acquiring_ctxs[("mother", mock_ctx)] = mock_resource - date = datetime.datetime(2021, 5, 27, 23, 2, 40, 527391, tzinfo=datetime.timezone.utc) + date = datetime.datetime(2021, 5, 27, 23, 2, 40, 527391, tzinfo=datetime.UTC) with ( freezegun.freeze_time(date), pytest.warns(DeprecationWarning, match="Use .acquire or .try_acquire and .release to manage cooldowns"), ): result = await manager.check_cooldown("mother", mock_ctx) # pyright: ignore[reportDeprecated] - assert result == datetime.datetime(2021, 5, 27, 23, 3, 40, 527391, tzinfo=datetime.timezone.utc) + assert result == datetime.datetime(2021, 5, 27, 23, 3, 40, 527391, tzinfo=datetime.UTC) mock_resource.check.assert_called_once_with() @pytest.mark.asyncio - async def test_check_cooldown_when_increment(self): + async def test_check_cooldown_when_increment(self) -> None: mock_try_acquire = mock.AsyncMock() mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -1490,7 +1495,7 @@ class CooldownManager(tanjun.InMemoryCooldownManager): mock_release.assert_awaited_once_with("yeet", mock_ctx) @pytest.mark.asyncio - async def test_check_cooldown_when_increment_and_cooldown_depleted(self): + async def test_check_cooldown_when_increment_and_cooldown_depleted(self) -> None: date = _now() mock_try_acquire = mock.AsyncMock(side_effect=tanjun.dependencies.CooldownDepleted(date)) mock_release = mock.AsyncMock() @@ -1510,7 +1515,7 @@ class CooldownManager(tanjun.InMemoryCooldownManager): mock_release.assert_not_called() @pytest.mark.asyncio - async def test_check_cooldown_when_increment_and_cooldown_depleted_with_unknown_wait_until(self): + async def test_check_cooldown_when_increment_and_cooldown_depleted_with_unknown_wait_until(self) -> None: mock_try_acquire = mock.AsyncMock(side_effect=tanjun.dependencies.CooldownDepleted(None)) mock_release = mock.AsyncMock() mock_ctx = mock.Mock() @@ -1521,18 +1526,18 @@ class CooldownManager(tanjun.InMemoryCooldownManager): manager = CooldownManager() - date = datetime.datetime(2023, 5, 27, 23, 2, 40, 527391, tzinfo=datetime.timezone.utc) + date = datetime.datetime(2023, 5, 27, 23, 2, 40, 527391, tzinfo=datetime.UTC) with ( freezegun.freeze_time(date), pytest.warns(DeprecationWarning, match="Use .acquire or .try_acquire and .release to manage cooldowns"), ): result = await manager.check_cooldown("yeet", mock_ctx, increment=True) # pyright: ignore[reportDeprecated] - assert result == datetime.datetime(2023, 5, 27, 23, 3, 40, 527391, tzinfo=datetime.timezone.utc) + assert result == datetime.datetime(2023, 5, 27, 23, 3, 40, 527391, tzinfo=datetime.UTC) mock_try_acquire.assert_awaited_once_with("yeet", mock_ctx) mock_release.assert_not_called() - def test_close(self): + def test_close(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() mock_gc_task = mock.Mock() manager._gc_task = mock_gc_task @@ -1541,13 +1546,13 @@ def test_close(self): mock_gc_task.cancel.assert_called_once_with() - def test_close_when_not_active(self): + def test_close_when_not_active(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with pytest.raises(RuntimeError, match="Cooldown manager is not active"): manager.close() - def test_open(self): + def test_open(self) -> None: mock_gc = mock.Mock() class StubManager(tanjun.dependencies.InMemoryCooldownManager): @@ -1563,7 +1568,7 @@ class StubManager(tanjun.dependencies.InMemoryCooldownManager): get_running_loop.return_value.create_task.assert_called_once_with(mock_gc.return_value) mock_gc.assert_called_once_with() - def test_open_with_passed_through_loop(self): + def test_open_with_passed_through_loop(self) -> None: mock_gc = mock.Mock() mock_loop = mock.Mock() @@ -1578,14 +1583,14 @@ class StubManager(tanjun.dependencies.InMemoryCooldownManager): mock_loop.create_task.assert_called_once_with(mock_gc.return_value) mock_gc.assert_called_once_with() - def test_open_when_already_active(self): + def test_open_when_already_active(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() manager._gc_task = mock.Mock() with pytest.raises(RuntimeError, match="Cooldown manager is already running"): manager.open() - def test_disable_bucket(self): + def test_disable_bucket(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() default_bucket = manager._default_bucket @@ -1606,7 +1611,7 @@ def test_disable_bucket(self): assert cooldown.limit == -1 assert cooldown.reset_after == datetime.timedelta(-1) - def test_disable_bucket_when_is_default(self): + def test_disable_bucket_when_is_default(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with mock.patch.object(tanjun.dependencies.limiters, "_GlobalResource") as cooldown_bucket: @@ -1638,7 +1643,7 @@ def test_disable_bucket_when_is_default(self): tanjun.BucketResource.GUILD, ], ) - def test_set_bucket(self, resource_type: tanjun.BucketResource): + def test_set_bucket(self, resource_type: tanjun.BucketResource) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() default_bucket = manager._default_bucket @@ -1661,7 +1666,9 @@ def test_set_bucket(self, resource_type: tanjun.BucketResource): assert cooldown.reset_after == datetime.timedelta(seconds=43, milliseconds=123) @pytest.mark.parametrize("reset_after", [datetime.timedelta(seconds=69), 69, 69.0]) - def test_set_bucket_handles_different_reset_after_types(self, reset_after: datetime.timedelta | int | float): + def test_set_bucket_handles_different_reset_after_types( + self, reset_after: datetime.timedelta | int | float + ) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with mock.patch.object(tanjun.dependencies.limiters, "_FlatResource") as cooldown_bucket: @@ -1680,7 +1687,7 @@ def test_set_bucket_handles_different_reset_after_types(self, reset_after: datet assert cooldown.limit == 444 assert cooldown.reset_after == datetime.timedelta(seconds=69) - def test_set_bucket_for_member_resource(self): + def test_set_bucket_for_member_resource(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with mock.patch.object(tanjun.dependencies.limiters, "_MemberResource") as cooldown_bucket: @@ -1698,7 +1705,7 @@ def test_set_bucket_for_member_resource(self): assert cooldown.limit == 64 assert cooldown.reset_after == datetime.timedelta(seconds=42.0) - def test_set_bucket_for_global_resource(self): + def test_set_bucket_for_global_resource(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with mock.patch.object(tanjun.dependencies.limiters, "_GlobalResource") as cooldown_bucket: @@ -1716,7 +1723,7 @@ def test_set_bucket_for_global_resource(self): assert cooldown.limit == 420 assert cooldown.reset_after == datetime.timedelta(seconds=69, milliseconds=420) - def test_set_bucket_when_is_default(self): + def test_set_bucket_when_is_default(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with mock.patch.object(tanjun.dependencies.limiters, "_FlatResource") as cooldown_bucket: @@ -1740,13 +1747,13 @@ def test_set_bucket_when_is_default(self): assert cooldown.reset_after == datetime.timedelta(seconds=666) @pytest.mark.parametrize("reset_after", [datetime.timedelta(seconds=-42), -431, -0.123]) - def test_set_bucket_when_reset_after_is_negative(self, reset_after: datetime.timedelta | float | int): + def test_set_bucket_when_reset_after_is_negative(self, reset_after: datetime.timedelta | float | int) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with pytest.raises(ValueError, match="reset_after must be greater than 0 seconds"): manager.set_bucket("gay catgirl", tanjun.BucketResource.USER, 123, reset_after) - def test_set_bucket_when_limit_is_negative(self): + def test_set_bucket_when_limit_is_negative(self) -> None: manager = tanjun.dependencies.InMemoryCooldownManager() with pytest.raises(ValueError, match="limit must be greater than 0"): @@ -1755,7 +1762,7 @@ def test_set_bucket_when_limit_is_negative(self): class TestCooldownPreExecution: @pytest.mark.asyncio - async def test_call(self): + async def test_call(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "yuri catgirls", owners_exempt=False, error=mock.Mock() ) @@ -1770,7 +1777,7 @@ async def test_call(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_owners_exempt(self): + async def test_call_when_owners_exempt(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("yuri catgirls", owners_exempt=True, error=mock.Mock()) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -1783,7 +1790,7 @@ async def test_call_when_owners_exempt(self): mock_owner_check.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) @pytest.mark.asyncio - async def test_call_when_owners_exempt_but_owner_check_is_none(self): + async def test_call_when_owners_exempt_but_owner_check_is_none(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("yuri catgirls", owners_exempt=True, error=mock.Mock()) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -1795,7 +1802,7 @@ async def test_call_when_owners_exempt_but_owner_check_is_none(self): assert pre_execution._owners_exempt is False @pytest.mark.asyncio - async def test_call_when_owners_exempt_and_not_owner(self): + async def test_call_when_owners_exempt_and_not_owner(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("catgirls", owners_exempt=True, error=mock.Mock()) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -1809,12 +1816,12 @@ async def test_call_when_owners_exempt_and_not_owner(self): mock_owner_check.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) @pytest.mark.asyncio - async def test_call_when_owners_exempt_still_leads_to_wait_until(self): + async def test_call_when_owners_exempt_still_leads_to_wait_until(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("yuri", owners_exempt=True) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2012, 1, 14, 12, 1, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2012, 1, 14, 12, 1, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() mock_owner_check.check_ownership.return_value = False @@ -1828,7 +1835,7 @@ async def test_call_when_owners_exempt_still_leads_to_wait_until(self): mock_owner_check.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) @pytest.mark.asyncio - async def test_call_when_owners_exempt_still_leads_to_wait_until_with_unknown_date(self): + async def test_call_when_owners_exempt_still_leads_to_wait_until_with_unknown_date(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("yuri", owners_exempt=True) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -1843,7 +1850,7 @@ async def test_call_when_owners_exempt_still_leads_to_wait_until_with_unknown_da mock_owner_check.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) @pytest.mark.asyncio - async def test_call_when_owners_exempt_still_leads_to_wait_until_and_error_callback(self): + async def test_call_when_owners_exempt_still_leads_to_wait_until_and_error_callback(self) -> None: class MockException(Exception): ... mock_error_callback = mock.Mock(return_value=MockException()) @@ -1851,7 +1858,7 @@ class MockException(Exception): ... mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2012, 1, 14, 12, 1, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2012, 1, 14, 12, 1, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() mock_owner_check.check_ownership.return_value = False @@ -1862,11 +1869,11 @@ class MockException(Exception): ... mock_cooldown_manager.try_acquire.assert_awaited_once_with("yuri", mock_context) mock_owner_check.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) mock_error_callback.assert_called_once_with( - "yuri", datetime.datetime(2012, 1, 14, 12, 1, 9, 420000, tzinfo=datetime.timezone.utc) + "yuri", datetime.datetime(2012, 1, 14, 12, 1, 9, 420000, tzinfo=datetime.UTC) ) @pytest.mark.asyncio - async def test_call_when_owners_exempt_still_leads_to_wait_until_and_error_callback_with_unknown_date(self): + async def test_call_when_owners_exempt_still_leads_to_wait_until_and_error_callback_with_unknown_date(self) -> None: class MockException(Exception): ... mock_error_callback = mock.Mock(return_value=MockException()) @@ -1885,12 +1892,12 @@ class MockException(Exception): ... mock_error_callback.assert_called_once_with("yuri", None) @pytest.mark.asyncio - async def test_call_when_wait_until(self): + async def test_call_when_wait_until(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("catgirls yuri", owners_exempt=False) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() @@ -1903,14 +1910,14 @@ async def test_call_when_wait_until(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_custom_message(self): + async def test_call_when_wait_until_custom_message(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", owners_exempt=False, error_message="Boopity boop {cooldown}." ) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() @@ -1921,7 +1928,7 @@ async def test_call_when_wait_until_custom_message(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_localised(self): + async def test_call_when_wait_until_localised(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -1935,7 +1942,7 @@ async def test_call_when_wait_until_localised(self): mock_context.interaction.locale = hikari.Locale.ES_ES mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() @@ -1946,7 +1953,7 @@ async def test_call_when_wait_until_localised(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_localised_but_not_app_command_defaults(self): + async def test_call_when_wait_until_localised_but_not_app_command_defaults(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -1959,7 +1966,7 @@ async def test_call_when_wait_until_localised_but_not_app_command_defaults(self) mock_context = mock.Mock(tanjun.abc.Context) mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() @@ -1970,7 +1977,7 @@ async def test_call_when_wait_until_localised_but_not_app_command_defaults(self) mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_localised_defaults(self): + async def test_call_when_wait_until_localised_defaults(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -1984,7 +1991,7 @@ async def test_call_when_wait_until_localised_defaults(self): mock_context.interaction.locale = hikari.Locale.HR mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() @@ -1995,7 +2002,7 @@ async def test_call_when_wait_until_localised_defaults(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_localised_by_localiser(self): + async def test_call_when_wait_until_localised_by_localiser(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2010,7 +2017,7 @@ async def test_call_when_wait_until_localised_by_localiser(self): mock_context.interaction.locale = hikari.Locale.FR mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() localiser = tanjun.dependencies.BasicLocaliser().set_variants( @@ -2027,7 +2034,7 @@ async def test_call_when_wait_until_localised_by_localiser(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_localised_but_localiser_not_found(self): + async def test_call_when_wait_until_localised_but_localiser_not_found(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2042,7 +2049,7 @@ async def test_call_when_wait_until_localised_but_localiser_not_found(self): mock_context.interaction.locale = hikari.Locale.ES_ES mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() localiser = tanjun.dependencies.BasicLocaliser().set_variants( @@ -2059,7 +2066,7 @@ async def test_call_when_wait_until_localised_but_localiser_not_found(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_defaults_with_localiser(self): + async def test_call_when_wait_until_defaults_with_localiser(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2075,7 +2082,7 @@ async def test_call_when_wait_until_defaults_with_localiser(self): mock_context.interaction.locale = hikari.Locale.PT_BR mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() localiser = tanjun.dependencies.BasicLocaliser().set_variants( @@ -2092,7 +2099,7 @@ async def test_call_when_wait_until_defaults_with_localiser(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_wait_until_and_error_callback(self): + async def test_call_when_wait_until_and_error_callback(self) -> None: class MockException(Exception): ... mock_error_callback = mock.Mock(return_value=MockException()) @@ -2102,7 +2109,7 @@ class MockException(Exception): ... mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted( - datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) mock_owner_check = mock.AsyncMock() @@ -2112,11 +2119,11 @@ class MockException(Exception): ... mock_cooldown_manager.try_acquire.assert_awaited_once_with("catgirls yuri", mock_context) mock_owner_check.check_ownership.assert_not_called() mock_error_callback.assert_called_once_with( - "catgirls yuri", datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.timezone.utc) + "catgirls yuri", datetime.datetime(2016, 1, 16, 12, 8, 9, 420000, tzinfo=datetime.UTC) ) @pytest.mark.asyncio - async def test_call_when_unknown_wait_until(self): + async def test_call_when_unknown_wait_until(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution("catgirls yuri", owners_exempt=False) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -2130,7 +2137,7 @@ async def test_call_when_unknown_wait_until(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_custom_default(self): + async def test_call_when_unknown_wait_until_custom_default(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", owners_exempt=False, error_message="Boopers {cooldown}." ) @@ -2146,7 +2153,7 @@ async def test_call_when_unknown_wait_until_custom_default(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_custom_message(self): + async def test_call_when_unknown_wait_until_custom_message(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", owners_exempt=False, unknown_message="Meep moop." ) @@ -2162,7 +2169,7 @@ async def test_call_when_unknown_wait_until_custom_message(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_localised(self): + async def test_call_when_unknown_wait_until_localised(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", unknown_message={hikari.Locale.CS: "yeet", hikari.Locale.FR: "eep", hikari.Locale.ES_ES: "i am meow"}, @@ -2181,7 +2188,7 @@ async def test_call_when_unknown_wait_until_localised(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_localised_but_not_app_command_defaults(self): + async def test_call_when_unknown_wait_until_localised_but_not_app_command_defaults(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", unknown_message={hikari.Locale.FR: "eep", "default": "meow meow nyaa", hikari.Locale.ES_ES: "i am meow"}, @@ -2199,7 +2206,7 @@ async def test_call_when_unknown_wait_until_localised_but_not_app_command_defaul mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_localised_defaults(self): + async def test_call_when_unknown_wait_until_localised_defaults(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", unknown_message={ @@ -2222,7 +2229,7 @@ async def test_call_when_unknown_wait_until_localised_defaults(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_localised_by_localiser(self): + async def test_call_when_unknown_wait_until_localised_by_localiser(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", unknown_message={hikari.Locale.CS: "yeet", hikari.Locale.FR: "eep", hikari.Locale.ES_ES: "i am meow"}, @@ -2248,7 +2255,7 @@ async def test_call_when_unknown_wait_until_localised_by_localiser(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_localised_but_localiser_not_found(self): + async def test_call_when_unknown_wait_until_localised_but_localiser_not_found(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", unknown_message={hikari.Locale.CS: "yeet", hikari.Locale.FR: "eep", hikari.Locale.ES_ES: "meow meow"}, @@ -2274,7 +2281,7 @@ async def test_call_when_unknown_wait_until_localised_but_localiser_not_found(se mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_defaults_with_localiser(self): + async def test_call_when_unknown_wait_until_defaults_with_localiser(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2305,7 +2312,7 @@ async def test_call_when_unknown_wait_until_defaults_with_localiser(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_fallback_localised(self): + async def test_call_when_unknown_wait_until_fallback_localised(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2328,7 +2335,7 @@ async def test_call_when_unknown_wait_until_fallback_localised(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_fallback_localised_but_not_app_command_defaults(self): + async def test_call_when_unknown_wait_until_fallback_localised_but_not_app_command_defaults(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2350,7 +2357,7 @@ async def test_call_when_unknown_wait_until_fallback_localised_but_not_app_comma mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_fallback_localised_defaults(self): + async def test_call_when_unknown_wait_until_fallback_localised_defaults(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2373,7 +2380,7 @@ async def test_call_when_unknown_wait_until_fallback_localised_defaults(self): mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_fallback_localised_by_localiser(self): + async def test_call_when_unknown_wait_until_fallback_localised_by_localiser(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2403,7 +2410,7 @@ async def test_call_when_unknown_wait_until_fallback_localised_by_localiser(self mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_fallback_localised_but_localiser_not_found(self): + async def test_call_when_unknown_wait_until_fallback_localised_but_localiser_not_found(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2433,7 +2440,7 @@ async def test_call_when_unknown_wait_until_fallback_localised_but_localiser_not mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_fallback_defaults_with_localiser(self): + async def test_call_when_unknown_wait_until_fallback_defaults_with_localiser(self) -> None: pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", error_message={ @@ -2464,7 +2471,7 @@ async def test_call_when_unknown_wait_until_fallback_defaults_with_localiser(sel mock_owner_check.check_ownership.assert_not_called() @pytest.mark.asyncio - async def test_call_when_unknown_wait_until_and_error_callback(self): + async def test_call_when_unknown_wait_until_and_error_callback(self) -> None: class MockException(Exception): ... mock_error_callback = mock.Mock(return_value=MockException()) @@ -2486,7 +2493,7 @@ class MockException(Exception): ... class TestCooldownPostExecution: @pytest.mark.asyncio - async def test_call(self): + async def test_call(self) -> None: mock_ctx = mock.Mock() mock_cooldown_manager = mock.AsyncMock() post_execution = tanjun.dependencies.CooldownPostExecution("blam") @@ -2496,7 +2503,7 @@ async def test_call(self): mock_cooldown_manager.release.assert_awaited_once_with("blam", mock_ctx) @pytest.mark.asyncio - async def test_call_when_not_tracked(self): + async def test_call_when_not_tracked(self) -> None: mock_ctx = mock.Mock() mock_cooldown_manager = mock.AsyncMock() mock_cooldown_manager.side_effect = tanjun.dependencies.ResourceNotTracked() @@ -2507,7 +2514,7 @@ async def test_call_when_not_tracked(self): mock_cooldown_manager.release.assert_awaited_once_with("blam", mock_ctx) -def test_with_cooldown(): +def test_with_cooldown() -> None: mock_command = mock.Mock() mock_error_callback = mock.Mock() @@ -2533,7 +2540,7 @@ def test_with_cooldown(): mock_command.wrapped_command.set_hooks.assert_not_called() -def test_with_cooldown_when_no_set_hooks(): +def test_with_cooldown_when_no_set_hooks() -> None: mock_command = mock.Mock(hooks=None) mock_error_callback = mock.Mock() @@ -2564,7 +2571,7 @@ def test_with_cooldown_when_no_set_hooks(): mock_command.wrapped_command.set_hooks.assert_not_called() -def test_with_cooldown_when_follow_wrapping(): +def test_with_cooldown_when_follow_wrapping() -> None: mock_command = mock.Mock() mock_command.wrapped_command.hooks = None mock_command.wrapped_command.wrapped_command.hooks = None @@ -2609,7 +2616,7 @@ def test_with_cooldown_when_follow_wrapping(): ) -def test_with_cooldown_when_follow_wrapping_and_not_wrapping(): +def test_with_cooldown_when_follow_wrapping_and_not_wrapping() -> None: mock_command = mock.Mock(wrapped_command=None) mock_error_callback = mock.Mock() @@ -2633,7 +2640,7 @@ def test_with_cooldown_when_follow_wrapping_and_not_wrapping(): mock_command.hooks.add_pre_execution.assert_called_once_with(mock_pre_execution.return_value) -def test_with_cooldown_when_follow_wrapping_and_unsupported_command(): +def test_with_cooldown_when_follow_wrapping_and_unsupported_command() -> None: mock_command = mock.Mock(tanjun.abc.SlashCommand) mock_error_callback = mock.Mock() with pytest.raises(AttributeError): @@ -2659,7 +2666,7 @@ def test_with_cooldown_when_follow_wrapping_and_unsupported_command(): mock_command.hooks.add_pre_execution.assert_called_once_with(mock_pre_execution.return_value) -def test_with_cooldown_when_follow_wrapping_and_wrapping_unsupported_command(): +def test_with_cooldown_when_follow_wrapping_and_wrapping_unsupported_command() -> None: mock_command = mock.Mock(wrapped_command=mock.Mock(tanjun.abc.SlashCommand)) mock_error_callback = mock.Mock() with pytest.raises(AttributeError): @@ -2692,7 +2699,7 @@ def test_with_cooldown_when_follow_wrapping_and_wrapping_unsupported_command(): class TestConcurrencyLimit: - def test_acquire(self): + def test_acquire(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(2) result = limit.acquire() @@ -2700,7 +2707,7 @@ def test_acquire(self): assert result is True assert limit.counter == 1 - def test_acquire_when_couldnt_acquire(self): + def test_acquire_when_couldnt_acquire(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(2) limit.counter = 2 @@ -2709,7 +2716,7 @@ def test_acquire_when_couldnt_acquire(self): assert result is False assert limit.counter == 2 - def test_acquire_when_limit_is_negative_1(self): + def test_acquire_when_limit_is_negative_1(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(-1) limit.counter = 2 @@ -2718,7 +2725,7 @@ def test_acquire_when_limit_is_negative_1(self): assert result is True assert limit.counter == 2 - def test_release(self): + def test_release(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(2) limit.counter = 2 @@ -2726,13 +2733,13 @@ def test_release(self): assert limit.counter == 1 - def test_release_when_not_acquired(self): + def test_release_when_not_acquired(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(2) with pytest.raises(RuntimeError, match="Cannot release a limit that has not been acquired"): limit.release("", mock.Mock()) - def test_release_when_limit_is_negative_1(self): + def test_release_when_limit_is_negative_1(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(-1) limit.counter = 0 @@ -2740,13 +2747,13 @@ def test_release_when_limit_is_negative_1(self): assert limit.counter == 0 - def test_has_expired(self): + def test_has_expired(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(2) limit.counter = 1 assert limit.has_expired() is False - def test_has_expired_when_has_expired(self): + def test_has_expired_when_has_expired(self) -> None: limit = tanjun.dependencies.limiters._ConcurrencyLimit(2) limit.counter = 0 @@ -2755,7 +2762,7 @@ def test_has_expired_when_has_expired(self): class TestInMemoryConcurrencyLimiter: @pytest.mark.asyncio - async def test__gc(self): + async def test__gc(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() mock_bucket_1 = mock.Mock() mock_bucket_2 = mock.Mock() @@ -2774,12 +2781,12 @@ async def test__gc(self): mock_bucket_2.cleanup.assert_has_calls([mock.call(), mock.call()]) mock_bucket_3.cleanup.assert_has_calls([mock.call(), mock.call()]) - def test_add_to_client(self): + def test_add_to_client(self) -> None: mock_client = mock.Mock(tanjun.Client, is_alive=False) mock_open = mock.Mock() class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): - open = mock_open # noqa: VNE003 + open = mock_open manager = StubManager() manager.add_to_client(mock_client) @@ -2792,12 +2799,12 @@ class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): ) mock_open.assert_not_called() - def test_add_to_client_when_client_is_active(self): + def test_add_to_client_when_client_is_active(self) -> None: mock_client = mock.Mock(tanjun.Client, is_alive=True) mock_open = mock.Mock() class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): - open = mock_open # noqa: VNE003 + open = mock_open manager = StubManager() manager.add_to_client(mock_client) @@ -2810,7 +2817,7 @@ class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): ) mock_open.assert_called_once_with(_loop=mock_client.loop) - def test_close(self): + def test_close(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() mock_gc_task = mock.Mock() manager._gc_task = mock_gc_task @@ -2819,13 +2826,13 @@ def test_close(self): mock_gc_task.cancel.assert_called_once_with() - def test_close_when_not_active(self): + def test_close_when_not_active(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() with pytest.raises(RuntimeError, match="Concurrency manager is not active"): manager.close() - def test_open(self): + def test_open(self) -> None: mock_gc = mock.Mock() class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): @@ -2841,7 +2848,7 @@ class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): get_running_loop.return_value.create_task.assert_called_once_with(mock_gc.return_value) mock_gc.assert_called_once_with() - def test_open_with_passed_through_loop(self): + def test_open_with_passed_through_loop(self) -> None: mock_gc = mock.Mock() mock_loop = mock.Mock() @@ -2856,7 +2863,7 @@ class StubManager(tanjun.dependencies.InMemoryConcurrencyLimiter): mock_loop.create_task.assert_called_once_with(mock_gc.return_value) mock_gc.assert_called_once_with() - def test_open_when_already_active(self): + def test_open_when_already_active(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() manager._gc_task = mock.Mock() @@ -2864,7 +2871,7 @@ def test_open_when_already_active(self): manager.open() @pytest.mark.asyncio - async def test_try_acquire(self): + async def test_try_acquire(self) -> None: mock_bucket = mock.Mock(into_inner=mock.AsyncMock(return_value=mock.Mock())) mock_inner: typing.Any = mock_bucket.into_inner.return_value mock_inner.acquire.return_value = True @@ -2879,10 +2886,10 @@ async def test_try_acquire(self): assert manager._acquiring_ctxs[("aye", mock_context)] is mock_inner @pytest.mark.asyncio - async def test_try_acquire_with_custom_bucket(self): ... + async def test_try_acquire_with_custom_bucket(self) -> None: ... @pytest.mark.asyncio - async def test_try_acquire_when_failed_to_acquire(self): + async def test_try_acquire_when_failed_to_acquire(self) -> None: mock_bucket = mock.Mock(into_inner=mock.AsyncMock(return_value=mock.Mock())) mock_inner: typing.Any = mock_bucket.into_inner.return_value mock_inner.acquire.return_value = False @@ -2898,7 +2905,7 @@ async def test_try_acquire_when_failed_to_acquire(self): assert ("nya", mock_context) not in manager._acquiring_ctxs @pytest.mark.asyncio - async def test_try_acquire_for_already_acquired_context(self): + async def test_try_acquire_for_already_acquired_context(self) -> None: mock_bucket = mock.Mock() mock_context = mock.Mock() mock_limiter = mock.Mock() @@ -2913,7 +2920,7 @@ async def test_try_acquire_for_already_acquired_context(self): assert manager._acquiring_ctxs[("ayee", mock_context)] is mock_limiter @pytest.mark.asyncio - async def test_try_acquire_falls_back_to_default_bucket(self): + async def test_try_acquire_falls_back_to_default_bucket(self) -> None: mock_bucket = mock.Mock(into_inner=mock.AsyncMock(return_value=mock.Mock())) mock_inner: typing.Any = mock_bucket.into_inner.return_value mock_inner.acquire.return_value = True @@ -2929,10 +2936,10 @@ async def test_try_acquire_falls_back_to_default_bucket(self): assert manager._buckets["yeet"] is mock_bucket @pytest.mark.asyncio - async def test_release_with_custom_bucket(self): ... + async def test_release_with_custom_bucket(self) -> None: ... @pytest.mark.asyncio - async def test_release(self): + async def test_release(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() mock_context = mock.Mock() mock_limiter = mock.Mock() @@ -2944,14 +2951,14 @@ async def test_release(self): mock_limiter.release.assert_called_once_with("nya", mock_context) @pytest.mark.asyncio - async def test_release_for_unknown_context(self): + async def test_release_for_unknown_context(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() mock_context = mock.Mock() with pytest.raises(tanjun.dependencies.ResourceNotTracked): await manager.release("meow", mock_context) - def test_disable_bucket(self): + def test_disable_bucket(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() default_bucket = manager._default_bucket @@ -2971,7 +2978,7 @@ def test_disable_bucket(self): assert isinstance(cooldown, tanjun.dependencies.limiters._ConcurrencyLimit) assert cooldown.limit == -1 - def test_disable_bucket_when_is_default(self): + def test_disable_bucket_when_is_default(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() with mock.patch.object(tanjun.dependencies.limiters, "_GlobalResource") as cooldown_bucket: @@ -3002,7 +3009,7 @@ def test_disable_bucket_when_is_default(self): tanjun.BucketResource.GUILD, ], ) - def test_set_bucket(self, resource_type: tanjun.BucketResource): + def test_set_bucket(self, resource_type: tanjun.BucketResource) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() default_bucket = manager._default_bucket @@ -3023,7 +3030,7 @@ def test_set_bucket(self, resource_type: tanjun.BucketResource): assert isinstance(cooldown, tanjun.dependencies.limiters._ConcurrencyLimit) assert cooldown.limit == 321 - def test_set_bucket_for_member_resource(self): + def test_set_bucket_for_member_resource(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() with mock.patch.object(tanjun.dependencies.limiters, "_MemberResource") as cooldown_bucket: @@ -3040,7 +3047,7 @@ def test_set_bucket_for_member_resource(self): assert isinstance(cooldown, tanjun.dependencies.limiters._ConcurrencyLimit) assert cooldown.limit == 69 - def test_set_bucket_for_global_resource(self): + def test_set_bucket_for_global_resource(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() with mock.patch.object(tanjun.dependencies.limiters, "_GlobalResource") as cooldown_bucket: @@ -3057,7 +3064,7 @@ def test_set_bucket_for_global_resource(self): assert isinstance(cooldown, tanjun.dependencies.limiters._ConcurrencyLimit) assert cooldown.limit == 42069 - def test_set_bucket_when_is_default(self): + def test_set_bucket_when_is_default(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() with mock.patch.object(tanjun.dependencies.limiters, "_FlatResource") as cooldown_bucket: @@ -3079,7 +3086,7 @@ def test_set_bucket_when_is_default(self): assert isinstance(cooldown, tanjun.dependencies.limiters._ConcurrencyLimit) assert cooldown.limit == 697 - def test_set_bucket_when_limit_is_negative(self): + def test_set_bucket_when_limit_is_negative(self) -> None: manager = tanjun.dependencies.InMemoryConcurrencyLimiter() with pytest.raises(ValueError, match="limit must be greater than 0"): @@ -3088,7 +3095,7 @@ def test_set_bucket_when_limit_is_negative(self): class TestConcurrencyPreExecution: @pytest.mark.asyncio - async def test_call(self): + async def test_call(self) -> None: mock_context = mock.Mock() mock_limiter = mock.AsyncMock() hook = tanjun.dependencies.ConcurrencyPreExecution("bucket boobs", error=KeyError) @@ -3098,7 +3105,7 @@ async def test_call(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket boobs", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails(self): + async def test_call_when_acquire_fails(self) -> None: mock_context = mock.Mock() mock_limiter = mock.AsyncMock() mock_limiter.try_acquire.side_effect = tanjun.dependencies.ResourceDepleted @@ -3110,7 +3117,7 @@ async def test_call_when_acquire_fails(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_localised(self): + async def test_call_when_acquire_fails_localised(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="yeetus beatus") mock_context.interaction.locale = hikari.Locale.HU mock_context.type = hikari.CommandType.MESSAGE @@ -3131,7 +3138,7 @@ async def test_call_when_acquire_fails_localised(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_localised_but_not_app_command_defaults(self): + async def test_call_when_acquire_fails_localised_but_not_app_command_defaults(self) -> None: mock_context = mock.Mock(tanjun.abc.Context, triggering_name="yeetus beatus") mock_limiter = mock.AsyncMock() mock_limiter.try_acquire.side_effect = tanjun.dependencies.ResourceDepleted @@ -3151,7 +3158,7 @@ async def test_call_when_acquire_fails_localised_but_not_app_command_defaults(se mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_localised_defaults(self): + async def test_call_when_acquire_fails_localised_defaults(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="yeetus beatus") mock_context.interaction.locale = hikari.Locale.FR mock_context.type = hikari.CommandType.MESSAGE @@ -3172,7 +3179,7 @@ async def test_call_when_acquire_fails_localised_defaults(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_localised_by_localiser(self): + async def test_call_when_acquire_fails_localised_by_localiser(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="epic flintstones") mock_context.interaction.locale = hikari.Locale.DA mock_context.type = hikari.CommandType.MESSAGE @@ -3197,7 +3204,7 @@ async def test_call_when_acquire_fails_localised_by_localiser(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_localised_but_localiser_not_found(self): + async def test_call_when_acquire_fails_localised_but_localiser_not_found(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="epic flintstones") mock_context.interaction.locale = hikari.Locale.EN_GB mock_context.type = hikari.CommandType.MESSAGE @@ -3222,7 +3229,7 @@ async def test_call_when_acquire_fails_localised_but_localiser_not_found(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_defaults_with_localiser(self): + async def test_call_when_acquire_fails_defaults_with_localiser(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="epic flintstones") mock_context.interaction.locale = hikari.Locale.JA mock_context.type = hikari.CommandType.MESSAGE @@ -3248,7 +3255,7 @@ async def test_call_when_acquire_fails_defaults_with_localiser(self): mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @pytest.mark.asyncio - async def test_call_when_acquire_fails_and_error_callback(self): + async def test_call_when_acquire_fails_and_error_callback(self) -> None: class MockException(Exception): ... mock_concurrency_callback = mock.Mock(return_value=MockException()) @@ -3267,7 +3274,7 @@ class MockException(Exception): ... class TestConcurrencyPostExecution: @pytest.mark.asyncio - async def test_call(self): + async def test_call(self) -> None: mock_context = mock.Mock() mock_limiter = mock.AsyncMock() hook = tanjun.dependencies.ConcurrencyPostExecution("aye bucket") @@ -3277,7 +3284,7 @@ async def test_call(self): mock_limiter.release.assert_awaited_once_with("aye bucket", mock_context) @pytest.mark.asyncio - async def test_call_when_resource_not_tracked(self): + async def test_call_when_resource_not_tracked(self) -> None: mock_context = mock.Mock() mock_limiter = mock.AsyncMock(side_effect=tanjun.dependencies.ResourceNotTracked) hook = tanjun.dependencies.ConcurrencyPostExecution("aye bucket") @@ -3287,7 +3294,7 @@ async def test_call_when_resource_not_tracked(self): mock_limiter.release.assert_awaited_once_with("aye bucket", mock_context) -def test_with_concurrency_limit(): +def test_with_concurrency_limit() -> None: mock_command = mock.Mock() mock_command.hooks.add_pre_execution.return_value = mock_command.hooks mock_command.hooks.add_post_execution.return_value = mock_command.hooks @@ -3311,7 +3318,7 @@ def test_with_concurrency_limit(): mock_command.wrapped_command.set_hooks.assert_not_called() -def test_with_concurrency_limit_makes_new_hooks(): +def test_with_concurrency_limit_makes_new_hooks() -> None: mock_command = mock.Mock(hooks=None) mock_error_callback = mock.Mock() @@ -3339,7 +3346,7 @@ def test_with_concurrency_limit_makes_new_hooks(): mock_command.wrapped_command.set_hooks.assert_not_called() -def test_with_concurrency_limit_when_follow_wrapping(): +def test_with_concurrency_limit_when_follow_wrapping() -> None: mock_command = mock.Mock() mock_command.hooks.add_pre_execution.return_value = mock_command.hooks mock_command.hooks.add_post_execution.return_value = mock_command.hooks @@ -3398,7 +3405,7 @@ def test_with_concurrency_limit_when_follow_wrapping(): ) -def test_with_concurrency_limit_when_follow_wrapping_and_not_wrapping(): +def test_with_concurrency_limit_when_follow_wrapping_and_not_wrapping() -> None: mock_command = mock.Mock(wrapped_command=None) mock_command.hooks.add_pre_execution.return_value = mock_command.hooks mock_command.hooks.add_post_execution.return_value = mock_command.hooks @@ -3419,7 +3426,7 @@ def test_with_concurrency_limit_when_follow_wrapping_and_not_wrapping(): post_execution.assert_called_once_with("bucket me") -def test_with_concurrency_limit_when_follow_wrapping_and_unsupported_command(): +def test_with_concurrency_limit_when_follow_wrapping_and_unsupported_command() -> None: mock_command = mock.Mock(tanjun.abc.ExecutableCommand) mock_command.hooks.add_pre_execution.return_value = mock_command.hooks mock_command.hooks.add_post_execution.return_value = mock_command.hooks @@ -3442,7 +3449,7 @@ def test_with_concurrency_limit_when_follow_wrapping_and_unsupported_command(): post_execution.assert_called_once_with("bucket me") -def test_with_concurrency_limit_when_follow_wrapping_and_wrapping_unsupported_command(): +def test_with_concurrency_limit_when_follow_wrapping_and_wrapping_unsupported_command() -> None: mock_command = mock.Mock(wrapped_command=mock.Mock(tanjun.abc.SlashCommand)) mock_command.hooks.add_pre_execution.return_value = mock_command.hooks mock_command.hooks.add_post_execution.return_value = mock_command.hooks diff --git a/tests/dependencies/test_locales.py b/tests/dependencies/test_locales.py index 6adbb48a2..cadbe041c 100644 --- a/tests/dependencies/test_locales.py +++ b/tests/dependencies/test_locales.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -38,7 +37,7 @@ class TestBasicLocaliser: - def test_add_to_client(self): + def test_add_to_client(self) -> None: client = tanjun.Client(mock.AsyncMock()) localiser = tanjun.dependencies.BasicLocaliser() @@ -47,7 +46,7 @@ def test_add_to_client(self): assert client.injector.get_type_dependency(tanjun.dependencies.AbstractLocaliser) is localiser assert client.injector.get_type_dependency(tanjun.dependencies.AbstractLocalizer) is localiser - def test_get_all_variants(self): + def test_get_all_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "yeet", {hikari.Locale.BG: "BIGGIE CHEESE", hikari.Locale.CS: "COMPUTER SENTIENT", hikari.Locale.EN_GB: "no"}, @@ -63,7 +62,7 @@ def test_get_all_variants(self): "boom": "NO", } - def test_get_all_variants_ignores_default(self): + def test_get_all_variants_ignores_default(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "ayanami", {hikari.Locale.ES_ES: "que?", hikari.Locale.DA: "Danken", "default": "yeet", hikari.Locale.FR: "for real"}, @@ -75,7 +74,7 @@ def test_get_all_variants_ignores_default(self): hikari.Locale.FR: "for real", } - def test_get_all_variants_when_format(self): + def test_get_all_variants_when_format(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "rei", { @@ -93,10 +92,10 @@ def test_get_all_variants_when_format(self): hikari.Locale.JA: "bye bye bye", } - def test_get_all_variants_when_not_known(self): + def test_get_all_variants_when_not_known(self) -> None: assert tanjun.dependencies.BasicLocaliser().get_all_variants("nope") == {} - def test_get_all_variants_for_check_format(self): + def test_get_all_variants_for_check_format(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "slash:nyaa:check:DmOnly", {hikari.Locale.BG: "BIGGIE CHEESE", hikari.Locale.CS: "COMPUTER SENTIENT", hikari.Locale.EN_GB: "yes"}, @@ -112,7 +111,7 @@ def test_get_all_variants_for_check_format(self): "boom": "bleep", } - def test_get_all_variants_when_using_global_by_command_type_variants(self): + def test_get_all_variants_when_using_global_by_command_type_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "*:commandy:check:OpOpOpOp", {"boopers": "boopity", hikari.Locale.BG: "see", hikari.Locale.EN_GB: "noooo"}, @@ -147,7 +146,7 @@ def test_get_all_variants_when_using_global_by_command_type_variants(self): } assert localiser.get_all_variants("user_menu:command:check:OpOpOpOp") == {} - def test_get_all_variants_when_using_global_by_command_name_variants(self): + def test_get_all_variants_when_using_global_by_command_name_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "user_menu:*:check:OpOpOpOp", {"fr": "pac", hikari.Locale.FI: "man"}, en_gb="tighty", da="boorf" ) @@ -166,7 +165,7 @@ def test_get_all_variants_when_using_global_by_command_name_variants(self): } assert localiser.get_all_variants("message_menu:beep:check:OpOpOpOp") == {} - def test_get_all_variants_when_using_global_by_command_name_and_type_variants(self): + def test_get_all_variants_when_using_global_by_command_name_and_type_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "*:*:check:OpOpOpOp", {hikari.Locale.BG: "Big", hikari.Locale.EL: "ELLA"}, es_es="bon", fr="jour" ) @@ -197,7 +196,7 @@ def test_get_all_variants_when_using_global_by_command_name_and_type_variants(se } assert localiser.get_all_variants("slash:snork:check:OpOpOp") == {} - def test_get_all_variants_when_using_global_varients_mixed_with_specific(self): + def test_get_all_variants_when_using_global_varients_mixed_with_specific(self) -> None: localiser = ( tanjun.dependencies.BasicLocaliser() .set_variants("*:*:check:OpOpOpOp", {hikari.Locale.BG: "op"}, es_es="on") @@ -214,14 +213,14 @@ def test_get_all_variants_when_using_global_varients_mixed_with_specific(self): hikari.Locale.ES_ES: "on", } - def test_localise(self): + def test_localise(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "the end", {hikari.Locale.FI: "bye"}, vi="echo", fi="meow" ) assert localiser.localise("the end", "vi") == "echo" - def test_localise_when_format(self): + def test_localise_when_format(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "ANDER", {hikari.Locale.EN_GB: "nyaa", hikari.Locale.FR: "ashley {now}", hikari.Locale.IT: "op"}, @@ -230,22 +229,22 @@ def test_localise_when_format(self): assert localiser.localise("ANDER", hikari.Locale.FR, now="444") == "ashley 444" - def test_localise_when_tag_unknown(self): + def test_localise_when_tag_unknown(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants("NERV", {hikari.Locale.BG: "nom"}) assert localiser.localise("NERV", hikari.Locale.EN_GB) is None - def test_localise_when_id_unknown(self): + def test_localise_when_id_unknown(self) -> None: assert tanjun.dependencies.BasicLocaliser().localise("foo", hikari.Locale.FR) is None - def test_localize(self): + def test_localize(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "the end", {hikari.Locale.FI: "bye"}, vi="echo", fi="meow" ) assert localiser.localize("the end", "vi") == "echo" - def test_localize_when_format(self): + def test_localize_when_format(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "ANDER", {hikari.Locale.EN_GB: "nyaa", hikari.Locale.FR: "ashley {now}", hikari.Locale.IT: "op"}, @@ -254,22 +253,22 @@ def test_localize_when_format(self): assert localiser.localize("ANDER", hikari.Locale.FR, now="444") == "ashley 444" - def test_localize_when_tag_unknown(self): + def test_localize_when_tag_unknown(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants("NERV", {hikari.Locale.BG: "nom"}) assert localiser.localize("NERV", hikari.Locale.EN_GB) is None - def test_localize_when_id_unknown(self): + def test_localize_when_id_unknown(self) -> None: assert tanjun.dependencies.BasicLocaliser().localize("foo", hikari.Locale.FR) is None - def test_localise_for_check_format(self): + def test_localise_for_check_format(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "message_menu:meow:check:tanjun.GuildOnly", {hikari.Locale.FI: "bye"}, vi="beeee", fi="meow" ) assert localiser.localise("message_menu:meow:check:tanjun.GuildOnly", "vi") == "beeee" - def test_localize_when_using_global_by_command_type_variants(self): + def test_localize_when_using_global_by_command_type_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "*:yeet:check:OpCheck", {hikari.Locale.BG: "nom", hikari.Locale.CS: "book em", hikari.Locale.HI: "."} ) @@ -279,7 +278,7 @@ def test_localize_when_using_global_by_command_type_variants(self): assert localiser.localize("user_menu:yeet:check:OpCheck", hikari.Locale.CS) == "book em" assert localiser.localize("user_menu:yeetn:check:OpCheck", hikari.Locale.CS) is None - def test_localize_when_using_global_by_command_name_variants(self): + def test_localize_when_using_global_by_command_name_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "slash:*:check:OpCheck", {hikari.Locale.BG: "nom", hikari.Locale.CS: "book em", hikari.Locale.HI: "."} ) @@ -289,7 +288,7 @@ def test_localize_when_using_global_by_command_name_variants(self): assert localiser.localize("slash:heat:check:OpCheck", hikari.Locale.CS) == "book em" assert localiser.localize("user_menu:heat:check:OpCheck", hikari.Locale.CS) is None - def test_localize_when_using_global_by_command_name_and_type_variants(self): + def test_localize_when_using_global_by_command_name_and_type_variants(self) -> None: localiser = tanjun.dependencies.BasicLocaliser().set_variants( "*:*:check:OpCheck", {hikari.Locale.DA: "us", hikari.Locale.DE: "board", hikari.Locale.EL: "sleep"} ) @@ -306,7 +305,7 @@ def test_localize_when_using_global_by_command_name_and_type_variants(self): assert localiser.localize("user_menu:meat:check:OpCheck", hikari.Locale.DE) == "board" assert localiser.localize("user_menu:meat:check:NotOpCheck", hikari.Locale.DE) is None - def test_localize_when_using_global_by_command_name_and_type_variant_as_fallbackd(self): + def test_localize_when_using_global_by_command_name_and_type_variant_as_fallbackd(self) -> None: localiser = ( tanjun.dependencies.BasicLocaliser() .set_variants("*:*:check:OpCheck", {hikari.Locale.DA: "beep"}) diff --git a/tests/dependencies/test_owners.py b/tests/dependencies/test_owners.py index d71c65d60..e408fbfda 100644 --- a/tests/dependencies/test_owners.py +++ b/tests/dependencies/test_owners.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -45,12 +44,12 @@ class TestOwners: @pytest.mark.parametrize("value", [0, -1.0, datetime.timedelta(seconds=-2)]) - def test_init_with_invalid_expire_after(self, value: int | float | datetime.timedelta): + def test_init_with_invalid_expire_after(self, value: int | float | datetime.timedelta) -> None: with pytest.raises(ValueError, match="Expire after must be greater than 0 seconds"): tanjun.dependencies.Owners(expire_after=-1) @pytest.mark.asyncio - async def test_check_ownership_when_user_in_owner_ids(self): + async def test_check_ownership_when_user_in_owner_ids(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) @@ -61,7 +60,7 @@ async def test_check_ownership_when_user_in_owner_ids(self): mock_client.get_type_dependency.assert_not_called() @pytest.mark.asyncio - async def test_check_ownership_when_not_falling_back_to_application(self): + async def test_check_ownership_when_not_falling_back_to_application(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634], fallback_to_application=False) mock_client = mock.Mock(tanjun.Client) result = await check.check_ownership(mock_client, mock.Mock(id=54123123)) @@ -71,7 +70,7 @@ async def test_check_ownership_when_not_falling_back_to_application(self): mock_client.get_type_dependency.assert_not_called() @pytest.mark.asyncio - async def test_check_ownership_when_async_cache_and_application_owner(self): + async def test_check_ownership_when_async_cache_and_application_owner(self) -> None: check = tanjun.dependencies.Owners(owners=[432, 1221]) application = mock.Mock(owner=mock.Mock(id=4442322), team=None) mock_cache = mock.AsyncMock() @@ -89,7 +88,7 @@ async def test_check_ownership_when_async_cache_and_application_owner(self): mock_cache.get.assert_awaited_once_with(default=None) @pytest.mark.asyncio - async def test_check_ownership_when_async_cache_but_not_application_owner(self): + async def test_check_ownership_when_async_cache_but_not_application_owner(self) -> None: check = tanjun.dependencies.Owners(owners=[234321123, 5432123]) application = mock.Mock(owner=mock.Mock(id=12345322), team=None) mock_cache = mock.AsyncMock() @@ -107,7 +106,7 @@ async def test_check_ownership_when_async_cache_but_not_application_owner(self): mock_cache.get.assert_awaited_once_with(default=None) @pytest.mark.asyncio - async def test_check_ownership_when_when_async_cache_and_application_team_member(self): + async def test_check_ownership_when_when_async_cache_and_application_team_member(self) -> None: check = tanjun.dependencies.Owners(owners=[6543456, 345234]) application = mock.Mock( owner=mock.Mock(id=65456234), team=mock.Mock(members={8656: mock.Mock(), 55555544444: mock.Mock()}) @@ -127,7 +126,7 @@ async def test_check_ownership_when_when_async_cache_and_application_team_member mock_cache.get.assert_awaited_once_with(default=None) @pytest.mark.asyncio - async def test_check_ownership_when_async_cache_but_not_team_member(self): + async def test_check_ownership_when_async_cache_but_not_team_member(self) -> None: check = tanjun.dependencies.Owners(owners=[87456234123, 12365234]) application = mock.Mock( @@ -148,7 +147,7 @@ async def test_check_ownership_when_async_cache_but_not_team_member(self): mock_cache.get.assert_awaited_once_with(default=None) @pytest.mark.asyncio - async def test_check_ownership_when_async_cache_returns_none_application_owner(self): + async def test_check_ownership_when_async_cache_returns_none_application_owner(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_cache = mock.AsyncMock() mock_cache.get.return_value = None @@ -168,7 +167,7 @@ async def test_check_ownership_when_async_cache_returns_none_application_owner(s mock_client.rest.fetch_application.assert_awaited_once_with() @pytest.mark.asyncio - async def test_check_ownership_when_token_type_is_not_bot(self): + async def test_check_ownership_when_token_type_is_not_bot(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None @@ -183,7 +182,7 @@ async def test_check_ownership_when_token_type_is_not_bot(self): ) @pytest.mark.asyncio - async def test_check_ownership_when_application_owner(self): + async def test_check_ownership_when_application_owner(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None @@ -200,7 +199,7 @@ async def test_check_ownership_when_application_owner(self): ) @pytest.mark.asyncio - async def test_check_ownership_when_not_application_owner(self): + async def test_check_ownership_when_not_application_owner(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None @@ -217,7 +216,7 @@ async def test_check_ownership_when_not_application_owner(self): ) @pytest.mark.asyncio - async def test_check_ownership_when_application_team_member(self): + async def test_check_ownership_when_application_team_member(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None @@ -236,7 +235,7 @@ async def test_check_ownership_when_application_team_member(self): ) @pytest.mark.asyncio - async def test_check_ownership_when_not_team_member(self): + async def test_check_ownership_when_not_team_member(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None @@ -255,7 +254,7 @@ async def test_check_ownership_when_not_team_member(self): ) @pytest.mark.asyncio - async def test_check_ownership_application_caching_behaviour(self): + async def test_check_ownership_application_caching_behaviour(self) -> None: check = tanjun.dependencies.Owners(owners=[123, 7634]) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None @@ -265,14 +264,16 @@ async def test_check_ownership_application_caching_behaviour(self): mock_client.rest.fetch_application = mock.AsyncMock(return_value=application) mock_client.rest.token_type = hikari.TokenType.BOT - results = await asyncio.gather(*(check.check_ownership(mock_client, mock.Mock(id=64123)) for _ in range(0, 20))) + results = await asyncio.gather(*(check.check_ownership(mock_client, mock.Mock(id=64123)) for _ in range(20))) assert all(result is True for result in results) mock_client.rest.fetch_application.assert_awaited_once_with() @pytest.mark.parametrize("expire_after", [datetime.timedelta(seconds=60), 60, 60.0]) @pytest.mark.asyncio - async def test_check_ownership_application_expires_cache(self, expire_after: float | int | datetime.timedelta): + async def test_check_ownership_application_expires_cache( + self, expire_after: float | int | datetime.timedelta + ) -> None: check = tanjun.dependencies.Owners(expire_after=expire_after) mock_client = mock.Mock(tanjun.Client) mock_client.get_type_dependency.return_value = None diff --git a/tests/dependencies/test_reloaders.py b/tests/dependencies/test_reloaders.py index 17f87e4e1..dcbc49135 100644 --- a/tests/dependencies/test_reloaders.py +++ b/tests/dependencies/test_reloaders.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -34,54 +33,54 @@ @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test(): ... +async def test() -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test_when_redeclare_cmds_after(): ... +async def test_when_redeclare_cmds_after() -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test_add_modules_async_when_str_module_doesnt_exist(): ... +async def test_add_modules_async_when_str_module_doesnt_exist() -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test_add_modules_async_when_str_module_doesnt_have_file(): ... +async def test_add_modules_async_when_str_module_doesnt_have_file() -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test_add_modules_async_when_path_module_doesnt_exist(): ... +async def test_add_modules_async_when_path_module_doesnt_exist() -> None: ... @pytest.mark.skip(reason="TODO") -def test_add_to_client_when_client_is_already_alive(): ... +def test_add_to_client_when_client_is_already_alive() -> None: ... @pytest.mark.skip(reason="TODO") -def test_add_modules_when_str_module_doesnt_exist(): ... +def test_add_modules_when_str_module_doesnt_exist() -> None: ... @pytest.mark.skip(reason="TODO") -def test_add_modules_when_str_module_doesnt_have_file(): ... +def test_add_modules_when_str_module_doesnt_have_file() -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test_add_directory_async_when_directory_doesnt_exist(): ... +async def test_add_directory_async_when_directory_doesnt_exist() -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio -async def test_add_directory_async_when_targets_file(): ... +async def test_add_directory_async_when_targets_file() -> None: ... @pytest.mark.skip(reason="TODO") -def test_add_directory_when_directory_doesnt_exist(): ... +def test_add_directory_when_directory_doesnt_exist() -> None: ... @pytest.mark.skip(reason="TODO") -def test_add_directory_when_targets_file(): ... +def test_add_directory_when_targets_file() -> None: ... diff --git a/tests/test__internal/__init__.py b/tests/test__internal/__init__.py index 279f959a8..0b621117b 100644 --- a/tests/test__internal/__init__.py +++ b/tests/test__internal/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding diff --git a/tests/test__internal/test_cache.py b/tests/test__internal/test_cache.py index e4d3be573..0b8bcc1c6 100644 --- a/tests/test__internal/test_cache.py +++ b/tests/test__internal/test_cache.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -42,7 +41,7 @@ @pytest.mark.asyncio -async def test_get_perm_channel_when_hikari_cached_channel(): +async def test_get_perm_channel_when_hikari_cached_channel() -> None: mock_cache = mock.Mock() mock_rest = mock.AsyncMock() mock_rest.fetch_channel.side_effect = RuntimeError @@ -63,7 +62,7 @@ async def test_get_perm_channel_when_hikari_cached_channel(): @pytest.mark.asyncio -async def test_get_perm_channel_when_hikari_cached_channel_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_hikari_cached_channel_and_other_caches_not_implemented() -> None: mock_cache = mock.Mock() mock_rest = mock.AsyncMock() mock_rest.fetch_channel.side_effect = RuntimeError @@ -76,7 +75,7 @@ async def test_get_perm_channel_when_hikari_cached_channel_and_other_caches_not_ @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_channel(): +async def test_get_perm_channel_when_async_cached_channel() -> None: mock_cache = mock.Mock() mock_cache.get_guild_channel.return_value = None mock_rest = mock.AsyncMock() @@ -97,7 +96,7 @@ async def test_get_perm_channel_when_async_cached_channel(): @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_channel_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_async_cached_channel_and_other_caches_not_implemented() -> None: mock_rest = mock.AsyncMock() mock_rest.fetch_channel.side_effect = RuntimeError mock_async_channel_cache = mock.AsyncMock() @@ -112,7 +111,7 @@ async def test_get_perm_channel_when_async_cached_channel_and_other_caches_not_i @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_channel(): +async def test_get_perm_channel_when_rest_channel() -> None: mock_cache = mock.Mock() mock_cache.get_guild_channel.return_value = None mock_rest = mock.AsyncMock() @@ -135,7 +134,7 @@ async def test_get_perm_channel_when_rest_channel(): @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_channel_and_caches_not_implemented(): +async def test_get_perm_channel_when_rest_channel_and_caches_not_implemented() -> None: mock_rest = mock.AsyncMock() mock_rest.fetch_channel.return_value = mock.Mock(hikari.PermissibleGuildChannel) mock_rest.fetch_channel.return_value.type = hikari.ChannelType.GUILD_TEXT @@ -148,7 +147,7 @@ async def test_get_perm_channel_when_rest_channel_and_caches_not_implemented(): @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_thread_and_hikari_cached_parent(): +async def test_get_perm_channel_when_async_cached_thread_and_hikari_cached_parent() -> None: mock_channel = mock.Mock() mock_cache = mock.Mock() mock_cache.get_guild_channel.side_effect = [None, mock_channel] @@ -172,7 +171,9 @@ async def test_get_perm_channel_when_async_cached_thread_and_hikari_cached_paren @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_thread_and_hikari_cached_parent_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_async_cached_thread_and_hikari_cached_parent_and_other_caches_not_implemented() -> ( + None +): mock_channel = mock.Mock() mock_cache = mock.Mock() mock_cache.get_guild_channel.side_effect = [None, mock_channel] @@ -192,7 +193,7 @@ async def test_get_perm_channel_when_async_cached_thread_and_hikari_cached_paren @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_thread_and_async_cached_parent(): +async def test_get_perm_channel_when_async_cached_thread_and_async_cached_parent() -> None: mock_cache = mock.Mock() mock_cache.get_guild_channel.return_value = None mock_rest = mock.AsyncMock() @@ -214,7 +215,9 @@ async def test_get_perm_channel_when_async_cached_thread_and_async_cached_parent @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_thread_and_async_cached_parent_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_async_cached_thread_and_async_cached_parent_and_other_caches_not_implemented() -> ( + None +): mock_rest = mock.AsyncMock() mock_rest.fetch_channel.side_effect = RuntimeError mock_async_channel_cache = mock.AsyncMock() @@ -234,7 +237,7 @@ async def test_get_perm_channel_when_async_cached_thread_and_async_cached_parent @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_thread_and_rest_parent(): +async def test_get_perm_channel_when_async_cached_thread_and_rest_parent() -> None: mock_cache = mock.Mock() mock_cache.get_guild_channel.return_value = None mock_rest = mock.AsyncMock() @@ -257,7 +260,7 @@ async def test_get_perm_channel_when_async_cached_thread_and_rest_parent(): @pytest.mark.asyncio -async def test_get_perm_channel_when_async_cached_thread_and_rest_parent_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_async_cached_thread_and_rest_parent_and_other_caches_not_implemented() -> None: mock_rest = mock.AsyncMock() mock_rest.fetch_channel.return_value = mock.Mock(hikari.PermissibleGuildChannel) mock_async_thread_cache = mock.AsyncMock() @@ -274,7 +277,7 @@ async def test_get_perm_channel_when_async_cached_thread_and_rest_parent_and_oth @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_thread_and_hikari_cached_parent(): +async def test_get_perm_channel_when_rest_thread_and_hikari_cached_parent() -> None: mock_channel = mock.Mock() mock_cache = mock.Mock() mock_cache.get_guild_channel.side_effect = [None, mock_channel] @@ -299,7 +302,7 @@ async def test_get_perm_channel_when_rest_thread_and_hikari_cached_parent(): @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_thread_and_hikari_cached_parent_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_rest_thread_and_hikari_cached_parent_and_other_caches_not_implemented() -> None: mock_channel = mock.Mock() mock_cache = mock.Mock() mock_cache.get_guild_channel.side_effect = [None, mock_channel] @@ -316,7 +319,7 @@ async def test_get_perm_channel_when_rest_thread_and_hikari_cached_parent_and_ot @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_thread_and_async_cached_parent(): +async def test_get_perm_channel_when_rest_thread_and_async_cached_parent() -> None: mock_channel = mock.Mock() mock_cache = mock.Mock() mock_cache.get_guild_channel.return_value = None @@ -343,7 +346,7 @@ async def test_get_perm_channel_when_rest_thread_and_async_cached_parent(): @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_thread_and_async_cached_parent_and_other_caches_not_implemented(): +async def test_get_perm_channel_when_rest_thread_and_async_cached_parent_and_other_caches_not_implemented() -> None: mock_channel = mock.Mock() mock_rest = mock.AsyncMock() mock_rest.fetch_channel.return_value = mock.Mock(hikari.GuildThreadChannel, parent_id=76656345) @@ -364,7 +367,7 @@ async def test_get_perm_channel_when_rest_thread_and_async_cached_parent_and_oth @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_thread_and_rest_parent(): +async def test_get_perm_channel_when_rest_thread_and_rest_parent() -> None: mock_channel = mock.Mock(hikari.PermissibleGuildChannel) mock_thread = mock.Mock(hikari.GuildThreadChannel, parent_id=342234234) mock_thread.type = hikari.ChannelType.GUILD_PUBLIC_THREAD @@ -389,7 +392,7 @@ async def test_get_perm_channel_when_rest_thread_and_rest_parent(): @pytest.mark.asyncio -async def test_get_perm_channel_when_rest_thread_and_rest_parent_and_caches_not_implemented(): +async def test_get_perm_channel_when_rest_thread_and_rest_parent_and_caches_not_implemented() -> None: mock_channel = mock.Mock(hikari.PermissibleGuildChannel) mock_thread = mock.Mock(hikari.GuildThreadChannel, parent_id=342234234) mock_thread.type = hikari.ChannelType.GUILD_PUBLIC_THREAD diff --git a/tests/test__internal/test_init.py b/tests/test__internal/test_init.py index 7b56b89ca..5895d1650 100644 --- a/tests/test__internal/test_init.py +++ b/tests/test__internal/test_init.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -44,7 +43,7 @@ @pytest.mark.asyncio -async def test_gather_checks_handles_no_checks(): +async def test_gather_checks_handles_no_checks() -> None: mock_ctx = mock.AsyncMock() assert await _internal.gather_checks(mock_ctx, ()) is True @@ -52,7 +51,7 @@ async def test_gather_checks_handles_no_checks(): @pytest.mark.asyncio -async def test_gather_checks_handles_failed_check(): +async def test_gather_checks_handles_failed_check() -> None: mock_ctx = mock.Mock() mock_ctx.call_with_async_di = mock.AsyncMock(side_effect=[True, False, True]) check_1 = mock.Mock() @@ -67,7 +66,7 @@ async def test_gather_checks_handles_failed_check(): @pytest.mark.asyncio -async def test_gather_checks_handles_check_failed_by_raise(): +async def test_gather_checks_handles_check_failed_by_raise() -> None: mock_ctx = mock.Mock() mock_ctx.call_with_async_di = mock.AsyncMock(side_effect=[True, tanjun.FailedCheck, True]) check_1 = mock.Mock() @@ -82,7 +81,7 @@ async def test_gather_checks_handles_check_failed_by_raise(): @pytest.mark.asyncio -async def test_gather_checks(): +async def test_gather_checks() -> None: mock_ctx = mock.Mock() mock_ctx.call_with_async_di = mock.AsyncMock(side_effect=[True, True, True]) check_1 = mock.Mock() @@ -97,7 +96,7 @@ async def test_gather_checks(): class TestCastedView: - def test___getitem___for_non_existant_entry(self): + def test___getitem___for_non_existant_entry(self) -> None: mock_cast = mock.Mock() view = _internal.CastedView[typing.Any, typing.Any]({}, mock_cast) @@ -106,7 +105,7 @@ def test___getitem___for_non_existant_entry(self): mock_cast.assert_not_called() - def test___getitem___for_buffered_entry(self): + def test___getitem___for_buffered_entry(self) -> None: mock_cast = mock.Mock() mock_value = mock.MagicMock() view = _internal.CastedView[typing.Any, str]({"a": "b"}, mock_cast) @@ -117,7 +116,7 @@ def test___getitem___for_buffered_entry(self): assert result is mock_value mock_cast.assert_not_called() - def test___getitem___for_not_buffered_entry(self): + def test___getitem___for_not_buffered_entry(self) -> None: mock_cast = mock.Mock() mock_value = mock.MagicMock() view = _internal.CastedView[typing.Any, typing.Any]({"a": mock_value}, mock_cast) @@ -128,21 +127,21 @@ def test___getitem___for_not_buffered_entry(self): assert view._buffer["a"] is mock_cast.return_value mock_cast.assert_called_once_with(mock_value) - def test___iter__(self): + def test___iter__(self) -> None: mock_iter = mock.Mock(return_value=iter((1, 2, 3))) mock_dict = mock.Mock(__iter__=mock_iter) view = _internal.CastedView[int, int](mock_dict, mock.Mock()) assert iter(view) is mock_iter.return_value - def test___len___(self): + def test___len___(self) -> None: mock_dict = mock.Mock(__len__=mock.Mock(return_value=43123)) view = _internal.CastedView[int, int](mock_dict, mock.Mock()) assert len(view) == 43123 -def test_ensure_parse_channel_types_has_every_channel_class(): +def test_ensure_parse_channel_types_has_every_channel_class() -> None: for _, attribute in inspect.getmembers(hikari): if isinstance(attribute, type) and issubclass(attribute, hikari.PartialChannel): result = _internal.parse_channel_types(attribute) @@ -150,7 +149,7 @@ def test_ensure_parse_channel_types_has_every_channel_class(): assert result -def test_ensure_repr_channel_has_every_real_channel_type(): +def test_ensure_repr_channel_has_every_real_channel_type() -> None: for channel_type in hikari.ChannelType: result = _internal.repr_channel(channel_type) @@ -159,5 +158,5 @@ def test_ensure_repr_channel_has_every_real_channel_type(): assert result != "Unknown" -def test_ensure_repr_channel_defaults_to_unknown(): +def test_ensure_repr_channel_defaults_to_unknown() -> None: assert _internal.repr_channel(hikari.ChannelType(-1)) == "Unknown" diff --git a/tests/test_annotations.py b/tests/test_annotations.py index 2d325dcc1..4e3237c50 100644 --- a/tests/test_annotations.py +++ b/tests/test_annotations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -49,19 +48,19 @@ class TestChoices: - def test_choices_property(self): + def test_choices_property(self) -> None: choices = annotations.Choices({"beep": "boop", "cat": "girls", "are": "sexy"}) assert choices.choices == {"beep": "boop", "cat": "girls", "are": "sexy"} - def test_choices_property_for_sequence(self): + def test_choices_property_for_sequence(self) -> None: choices = annotations.Choices([("ok", "no"), ("meow", "nyaa")]) assert choices.choices == {"ok": "no", "meow": "nyaa"} class TestConverted: - def test_converters_property(self): + def test_converters_property(self) -> None: converter_1 = mock.Mock() converter_2 = mock.Mock() converter_3 = mock.AsyncMock() @@ -71,33 +70,33 @@ def test_converters_property(self): class TestDefault: - def test_default_property(self): + def test_default_property(self) -> None: value = object() default = annotations.Default(value) assert default.default is value - def test_default_property_with_default_value(self): + def test_default_property_with_default_value(self) -> None: default = annotations.Default() assert default.default is tanjun.abc.NO_DEFAULT class TestFlag: - def test_properties(self): + def test_properties(self) -> None: flag = annotations.Flag(aliases=("yeet", "meat", "meow"), empty_value="nom") assert flag.aliases == ("yeet", "meat", "meow") assert flag.empty_value == "nom" - def test_properties_with_default_values(self): + def test_properties_with_default_values(self) -> None: flag = annotations.Flag() assert flag.aliases is None assert flag.empty_value is tanjun.abc.NO_DEFAULT - def test_deprecated_default(self): + def test_deprecated_default(self) -> None: value = object() with pytest.warns( @@ -110,13 +109,13 @@ def test_deprecated_default(self): class TestLength: - def test_properties(self): + def test_properties(self) -> None: length = annotations.Length(321) assert length.min_length == 0 assert length.max_length == 321 - def test_properties_when_min_specified(self): + def test_properties_when_min_specified(self) -> None: length = annotations.Length(554, 6545) assert length.min_length == 554 @@ -124,32 +123,32 @@ def test_properties_when_min_specified(self): class TestMax: - def test_value_property(self): + def test_value_property(self) -> None: max_ = annotations.Max(32221) assert max_.value == 32221 class TestMin: - def test_value_property(self): + def test_value_property(self) -> None: min_ = annotations.Min(3112222) assert min_.value == 3112222 class TestName: - def test_properties_when_both(self): + def test_properties_when_both(self) -> None: names = annotations.Name("meow_ok") assert names.message_name == "--meow-ok" assert names.slash_name == "meow_ok" - def test_properties_with_defaults(self): + def test_properties_with_defaults(self) -> None: names = annotations.Name() assert names.message_name is None assert names.slash_name is None - def test_properties_when_different(self): + def test_properties_when_different(self) -> None: names = annotations.Name(message="--__echo", slash="__-nyaa") assert names.message_name == "--__echo" @@ -157,7 +156,7 @@ def test_properties_when_different(self): class TestRanged: - def test_properties(self): + def test_properties(self) -> None: ranged = annotations.Ranged(123, 543) assert ranged.max_value == 543 @@ -165,21 +164,21 @@ def test_properties(self): class TestSnowflakeOr: - def test_parser_id_property(self): + def test_parser_id_property(self) -> None: mock_callback = mock.Mock() snowflake_or = annotations.SnowflakeOr(parse_id=mock_callback) assert snowflake_or.parse_id is mock_callback - def test_parser_id_property_with_default(self): + def test_parser_id_property_with_default(self) -> None: snowflake_or = annotations.SnowflakeOr() assert snowflake_or.parse_id == tanjun.conversion.parse_snowflake class TestTheseChannels: - def test_channel_types_property(self): + def test_channel_types_property(self) -> None: these_channels = annotations.TheseChannels( hikari.DMChannel, hikari.GuildChannel, hikari.ChannelType.GUILD_STAGE ) @@ -187,7 +186,7 @@ def test_channel_types_property(self): assert these_channels.channel_types == (hikari.DMChannel, hikari.GuildChannel, hikari.ChannelType.GUILD_STAGE) -def test_where_no_signature(): +def test_where_no_signature() -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -203,7 +202,7 @@ def test_where_no_signature(): assert command.wrapped_command._tracked_options == {} -def test_where_no_signature_with_parser_already_set(): +def test_where_no_signature_with_parser_already_set() -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -221,11 +220,11 @@ def test_where_no_signature_with_parser_already_set(): assert command.wrapped_command._tracked_options == {} -def test_with_message_command_and_incompatible_parser_set(): +def test_with_message_command_and_incompatible_parser_set() -> None: mock_parser = mock.Mock(tanjun.abc.MessageParser) @tanjun.as_message_command("command") - async def command(ctx: tanjun.abc.MessageContext, foo: annotations.Int): ... + async def command(ctx: tanjun.abc.MessageContext, foo: annotations.Int) -> None: ... command.set_parser(mock_parser) @@ -233,12 +232,12 @@ async def command(ctx: tanjun.abc.MessageContext, foo: annotations.Int): ... annotations.with_annotated_args(command) -def test_with_nested_message_command_and_incompatible_parser_set(): +def test_with_nested_message_command_and_incompatible_parser_set() -> None: mock_parser = mock.Mock(tanjun.abc.MessageParser) @tanjun.as_message_command("command") @tanjun.as_slash_command("command", "description") - async def command(ctx: tanjun.abc.Context, foo: typing.Annotated[annotations.Int, "desc"]): ... + async def command(ctx: tanjun.abc.Context, foo: typing.Annotated[annotations.Int, "desc"]) -> None: ... command.set_parser(mock_parser) @@ -246,7 +245,7 @@ async def command(ctx: tanjun.abc.Context, foo: typing.Annotated[annotations.Int annotations.parse_annotated_args(command, follow_wrapped=True) -def test_with_no_annotations(): +def test_with_no_annotations() -> None: @annotations.with_annotated_args # pyright: ignore[reportUnknownArgumentType] @tanjun.as_slash_command("meow", "nyaa") @tanjun.as_message_command("meow") @@ -263,7 +262,7 @@ async def command( assert command.wrapped_command.parser is None -def test_with_no_annotations_but_message_parser_already_set(): +def test_with_no_annotations_but_message_parser_already_set() -> None: @tanjun.as_message_command("meow") async def command( ctx: tanjun.abc.Context, @@ -281,7 +280,7 @@ async def command( assert command.parser.options == [] -def test_with_slash_command_missing_option_description(): +def test_with_slash_command_missing_option_description() -> None: @tanjun.as_slash_command("meep", "description") async def callback( ctx: tanjun.abc.Context, @@ -294,7 +293,7 @@ async def callback( annotations.with_annotated_args(callback) -def test_when_wrapping_slash_but_not_follow_wrapped(): +def test_when_wrapping_slash_but_not_follow_wrapped() -> None: @annotations.with_annotated_args @tanjun.as_message_command("meep") @tanjun.as_slash_command("boop", "description") @@ -302,7 +301,7 @@ async def command( ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"], other_field: typing.Annotated[annotations.Str, "yo"] = "", - ): ... + ) -> None: ... assert isinstance(command.wrapped_command, tanjun.SlashCommand) assert isinstance(command.parser, tanjun.ShlexParser) @@ -312,11 +311,11 @@ async def command( assert command.wrapped_command._tracked_options == {} -def test_when_wrapping_message_but_not_follow_wrapped(): +def test_when_wrapping_message_but_not_follow_wrapped() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("boop", "description") @tanjun.as_message_command("meep") - async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]): ... + async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]) -> None: ... assert command.build().options assert command._tracked_options @@ -324,10 +323,10 @@ async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.I assert command.wrapped_command.parser is None -def test_when_wrapping_message_but_not_follow_wrapped_parser_already_set(): +def test_when_wrapping_message_but_not_follow_wrapped_parser_already_set() -> None: @tanjun.as_slash_command("boop", "description") @tanjun.as_message_command("meep") - async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]): ... + async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]) -> None: ... assert isinstance(command.wrapped_command, tanjun.MessageCommand) command.wrapped_command.set_parser(tanjun.ShlexParser()) @@ -341,7 +340,7 @@ async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.I assert command.wrapped_command.parser.options == [] -def test_when_follow_wrapping_and_wrapping_unsupported_command(): +def test_when_follow_wrapping_and_wrapping_unsupported_command() -> None: async def mock_callback( ctx: tanjun.abc.MessageContext, value: annotations.Str, other_value: annotations.Bool = False ) -> None: ... @@ -359,7 +358,7 @@ async def mock_callback( assert len(command.parser.options) == 1 -def test_with_with_std_range(): +def test_with_with_std_range() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -367,7 +366,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, range(123, 345), "nyaa"], other_value: typing.Annotated[annotations.Int, range(22, 5568), "sex"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -419,7 +418,7 @@ async def callback( assert option.max_value == 5567 -def test_with_with_backwards_std_range(): +def test_with_with_backwards_std_range() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -427,7 +426,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, range(542, 111, -1), "nyaa"], other_value: typing.Annotated[annotations.Int, range(3334, 43, -1), "sex"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -479,7 +478,7 @@ async def callback( assert option.max_value == 3334 -def test_with_std_slice(): +def test_with_std_slice() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -487,7 +486,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, 324:653, "meow"], other_value: typing.Annotated[annotations.Int, 444:555, "blam"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -539,7 +538,7 @@ async def callback( assert option.max_value == 554 -def test_with_backwards_std_slice(): +def test_with_backwards_std_slice() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -547,7 +546,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, 444:233:-1, "meow"], other_value: typing.Annotated[annotations.Int, 664:422:-1, "blam"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -715,14 +714,14 @@ def test_choices( option_type: hikari.OptionType, choices: collections.Sequence[_ChoiceT], result: collections.Sequence[hikari.CommandChoice], -): +) -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") async def callback( ctx: tanjun.abc.Context, nope: typing.Annotated[type_cls, annotations.Choices(choices), "default"], boo: typing.Annotated[type_cls, annotations.Choices(choices), "be"] = typing.cast("_ChoiceT", "hi"), - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -783,7 +782,7 @@ def test_choices_and_mixed_values( collections.Sequence[_ChoiceT], collections.Sequence[tuple[str, _ChoiceT]], collections.Mapping[str, _ChoiceT] ], mismatched_type: type[typing.Any], -): +) -> None: @tanjun.as_slash_command("command", "description") async def callback( ctx: tanjun.abc.Context, nom: typing.Annotated[type_, annotations.Choices(choices), "description"] @@ -795,7 +794,7 @@ async def callback( annotations.with_annotated_args(callback) -def test_with_generic_float_choices(): +def test_with_generic_float_choices() -> None: class Choices(float, enum.Enum): Foo = 123.321 Bar = 543.123 @@ -811,7 +810,7 @@ async def callback( ctx: tanjun.abc.Context, nom: typing.Annotated[annotations.Choices[Choices], "description"], # type: ignore boom: typing.Annotated[annotations.Choices[Choices], "bag"] = Choices.Blam, # type: ignore - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -890,7 +889,7 @@ async def callback( assert option.max_value is None -def test_with_generic_int_choices(): +def test_with_generic_int_choices() -> None: class Choices(int, enum.Enum): Fooman = 321 Batman = 123 @@ -905,7 +904,7 @@ async def callback( ctx: tanjun.abc.Context, nat: typing.Annotated[annotations.Choices[Choices], "meow"], # type: ignore bag: typing.Annotated[annotations.Choices[Choices], "bagette"] = Choices.Bazman, # type: ignore - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -982,7 +981,7 @@ async def callback( assert option.max_value is None -def test_with_generic_str_choices(): +def test_with_generic_str_choices() -> None: class Choices(str, enum.Enum): Meow = "ok" Bro = "no" @@ -998,7 +997,7 @@ async def callback( ctx: tanjun.abc.Context, ny: typing.Annotated[annotations.Choices[Choices], "fat"], # type: ignore aa: typing.Annotated[annotations.Choices[Choices], "bat"] = Choices.Sis, # type: ignore - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -1077,7 +1076,7 @@ async def callback( assert option.max_value is None -def test_with_generic_choices_when_enum_has_no_other_base(): +def test_with_generic_choices_when_enum_has_no_other_base() -> None: class Choices(enum.Enum): ... with ( @@ -1087,7 +1086,7 @@ class Choices(enum.Enum): ... annotations.Choices[Choices] -def test_with_generic_choices_when_enum_isnt_int_str_or_float(): +def test_with_generic_choices_when_enum_isnt_int_str_or_float() -> None: class Choices(bytes, enum.Enum): ... with ( @@ -1097,7 +1096,7 @@ class Choices(bytes, enum.Enum): ... annotations.Choices[Choices] -def test_with_converted(): +def test_with_converted() -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_callback_3 = mock.Mock() @@ -1108,9 +1107,7 @@ def test_with_converted(): async def command( ctx: tanjun.abc.Context, boo: typing.Annotated[str, annotations.Converted(mock_callback_1, mock_callback_2), "description"], - bam: typing.Annotated[ - typing.Optional[int], annotations.Converted(mock_callback_3), "nom" # noqa: NU002 - ] = None, + bam: typing.Annotated[typing.Optional[int], annotations.Converted(mock_callback_3), "nom"] = None, ) -> None: ... assert command.build().options == [ @@ -1170,7 +1167,7 @@ async def command( assert option.max_value is None -def test_with_generic_converted(): +def test_with_generic_converted() -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_callback_3 = mock.Mock() @@ -1241,7 +1238,7 @@ async def command( assert option.max_value is None -def test_with_converted_type_miss_match(): +def test_with_converted_type_miss_match() -> None: mock_callback_1 = mock.Mock() with pytest.raises( @@ -1260,7 +1257,7 @@ async def _( ) -> None: ... -def test_with_default(): +def test_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1301,7 +1298,7 @@ async def command( assert option.max_value is None -def test_with_generic_default(): +def test_with_generic_default() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1347,13 +1344,12 @@ async def command( assert option.max_value is None -def test_with_default_overriding_signature_default(): +def test_with_default_overriding_signature_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( - ctx: tanjun.abc.Context, - argument: typing.Annotated[annotations.Str, annotations.Default("yeet"), "meow"] = "m", # noqa: F821 + ctx: tanjun.abc.Context, argument: typing.Annotated[annotations.Str, annotations.Default("yeet"), "meow"] = "m" ) -> None: ... assert command.build().options == [ @@ -1389,7 +1385,7 @@ async def command( assert option.max_value is None -def test_with_default_unsetting_signature_default(): +def test_with_default_unsetting_signature_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1429,7 +1425,7 @@ async def command( assert argument.max_value is None -def test_with_flag(): +def test_with_flag() -> None: empty_value = mock.Mock() @annotations.with_annotated_args(follow_wrapped=True) @@ -1485,7 +1481,7 @@ async def callback( assert option.default is tanjun.abc.NO_PASS -def test_with_flag_and_deprecated_default(): +def test_with_flag_and_deprecated_default() -> None: with pytest.warns( DeprecationWarning, match=re.escape("Flag.__init__'s `default` argument is deprecated, use Default instead") ): @@ -1518,7 +1514,7 @@ async def callback( assert option.default == 1231 -def test_with_flag_and_default(): +def test_with_flag_and_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("meow") @tanjun.as_slash_command("ea", "meow") @@ -1553,7 +1549,7 @@ async def callback( assert option.default is tanjun.abc.NO_PASS -def test_with_flag_missing_default(): +def test_with_flag_missing_default() -> None: @tanjun.as_message_command("meow") async def callback( ctx: tanjun.abc.MessageContext, @@ -1565,7 +1561,7 @@ async def callback( annotations.with_annotated_args(callback) -def test_with_positional(): +def test_with_positional() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("name") @tanjun.as_slash_command("boop", "description") @@ -1597,7 +1593,7 @@ async def callback( assert option.default is tanjun.abc.NO_DEFAULT -def test_with_generic_positional(): +def test_with_generic_positional() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1631,10 +1627,12 @@ async def callback( assert option.default is tanjun.abc.NO_DEFAULT -def test_with_greedy(): +def test_with_greedy() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") - async def callback(ctx: tanjun.abc.Context, meep: typing.Annotated[annotations.Int, annotations.Greedy()]): ... + async def callback( + ctx: tanjun.abc.Context, meep: typing.Annotated[annotations.Int, annotations.Greedy()] + ) -> None: ... assert isinstance(callback.parser, tanjun.ShlexParser) assert len(callback.parser.arguments) == 1 @@ -1650,12 +1648,12 @@ async def callback(ctx: tanjun.abc.Context, meep: typing.Annotated[annotations.I assert argument.max_value is None -def test_with_generic_greedy(): +def test_with_generic_greedy() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") - async def callback(ctx: tanjun.abc.Context, meep: annotations.Greedy[annotations.Str]): # type: ignore + async def callback(ctx: tanjun.abc.Context, meep: annotations.Greedy[annotations.Str]) -> None: # type: ignore ... assert isinstance(callback.parser, tanjun.ShlexParser) @@ -1672,7 +1670,7 @@ async def callback(ctx: tanjun.abc.Context, meep: annotations.Greedy[annotations assert argument.max_value is None -def test_with_length(): +def test_with_length() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1751,7 +1749,7 @@ async def callback( assert option.max_value is None -def test_with_length_when_min_specificed(): +def test_with_length_when_min_specificed() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1830,7 +1828,7 @@ async def callback( assert option.max_value is None -def test_with_generic_length(): +def test_with_generic_length() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1911,7 +1909,7 @@ async def callback( assert option.max_value is None -def test_with_generic_length_when_min_specificed(): +def test_with_generic_length_when_min_specificed() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1992,7 +1990,7 @@ async def callback( assert option.max_value is None -def test_with_int_max(): +def test_with_int_max() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2000,7 +1998,7 @@ async def callback( ctx: tanjun.abc.Context, bee: typing.Annotated[annotations.Int, annotations.Max(543), "eee"], yeet_no: typing.Annotated[typing.Union[annotations.Int, None], annotations.Max(543), "eep"] = None, - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2070,7 +2068,7 @@ async def callback( assert option.max_value == 543 -def test_with_float_max(): +def test_with_float_max() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2078,7 +2076,7 @@ async def callback( ctx: tanjun.abc.Context, bee: typing.Annotated[annotations.Float, annotations.Max(234.432), "eee"], yeet_no: typing.Annotated[typing.Union[annotations.Float, None], annotations.Max(234.432), "eep"] = None, - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2154,7 +2152,7 @@ async def callback( ) def test_with_generic_max( value: typing.Union[int, float], converter: typing.Union[type[int], type[float]], option_type: hikari.OptionType -): +) -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -2164,7 +2162,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[annotations.Max[value], "eee"], # type: ignore other_number: typing.Annotated[annotations.Max[value], "eep"] = 54234, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2234,7 +2232,7 @@ async def callback( assert option.max_value == value -def test_with_max_when_float_for_int(): +def test_with_max_when_float_for_int() -> None: @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") async def callback( @@ -2245,7 +2243,7 @@ async def callback( annotations.parse_annotated_args(callback, follow_wrapped=True) -def test_with_max_when_int_for_float(): +def test_with_max_when_int_for_float() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2335,7 +2333,7 @@ def test_with_min( raw_type: type[typing.Union[int, float]], option_type: hikari.OptionType, value: typing.Union[int, float], -): +) -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2343,7 +2341,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[type_, annotations.Max(value), "eee"], # pyright: ignore other_number: typing.Annotated[type_, annotations.Max(value), "eep"] = 54234, # pyright: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2419,7 +2417,7 @@ async def callback( ) def test_with_generic_min( value: typing.Union[int, float], converter: typing.Union[type[int], type[float]], option_type: hikari.OptionType -): +) -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -2429,7 +2427,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[annotations.Min[value], "bee"], # type: ignore other_number: typing.Annotated[annotations.Min[value], "buzz"] = 321, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2499,7 +2497,7 @@ async def callback( assert option.max_value is None -def test_with_min_when_float_for_int(): +def test_with_min_when_float_for_int() -> None: @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") async def callback( @@ -2510,7 +2508,7 @@ async def callback( annotations.parse_annotated_args(callback, follow_wrapped=True) -def test_with_min_when_int_for_float(): +def test_with_min_when_int_for_float() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2588,7 +2586,7 @@ async def callback( assert option.max_value is None -def test_with_overridden_name(): +def test_with_overridden_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2596,7 +2594,7 @@ async def callback( ctx: tanjun.abc.Context, nyaa: typing.Annotated[annotations.Int, annotations.Name("boop"), "Nope"], meow: typing.Annotated[annotations.Str, annotations.Name("meep_meep"), "Description"] = "meowow", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2666,7 +2664,7 @@ async def callback( assert option.max_value is None -def test_with_individually_overridden_name(): +def test_with_individually_overridden_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2676,7 +2674,7 @@ async def callback( meow: typing.Annotated[ annotations.Str, annotations.Name("nom2", slash="n", message="--boop-oop"), "Description" ] = "meowow", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2746,7 +2744,7 @@ async def callback( assert option.max_value is None -def test_with_overridden_slash_name(): +def test_with_overridden_slash_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2754,7 +2752,7 @@ async def callback( ctx: tanjun.abc.Context, necc: typing.Annotated[annotations.Int, annotations.Name(slash="nom"), "EEEE"], nya: typing.Annotated[annotations.Str, annotations.Name(slash="sex"), "AAAA"] = "meow", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2824,14 +2822,14 @@ async def callback( assert option.max_value is None -def test_with_overridden_message_name(): +def test_with_overridden_message_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") async def callback( ctx: tanjun.abc.Context, meow_meow: typing.Annotated[annotations.Str, annotations.Name(message="--blam-blam"), "Description"] = "neko", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2872,7 +2870,7 @@ async def callback( assert option.max_value is None -def test_with_ranged(): +def test_with_ranged() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2880,7 +2878,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, annotations.Ranged(44, 55), "meow"], other_value: typing.Annotated[annotations.Float, annotations.Ranged(5433, 6524.32), "bye bye"] = 5, - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2946,7 +2944,7 @@ def test_with_generic_ranged( max_value: typing.Union[float, int], converter: typing.Union[type[float], type[int]], option_type: hikari.OptionType, -): +) -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -2956,7 +2954,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[annotations.Ranged[min_value, max_value], "meow"], # type: ignore other_number: typing.Annotated[annotations.Ranged[min_value, max_value], "nom"] = 443, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -3026,7 +3024,7 @@ async def callback( assert option.max_value == max_value -def test_with_snowflake_or(): +def test_with_snowflake_or() -> None: mock_callback = mock.Mock() @annotations.with_annotated_args(follow_wrapped=True) @@ -3107,7 +3105,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_channel(): +def test_with_generic_snowflake_or_for_channel() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3188,7 +3186,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_member(): +def test_with_generic_snowflake_or_for_member() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3269,7 +3267,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_mentionable(): +def test_with_generic_snowflake_or_for_mentionable() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3352,7 +3350,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_role(): +def test_with_generic_snowflake_or_for_role() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3433,7 +3431,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_user(): +def test_with_generic_snowflake_or_for_user() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3514,7 +3512,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or(): +def test_with_generic_snowflake_or() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3623,7 +3621,7 @@ async def callback( def test_with_these_channels( channel_types: collections.Sequence[typing.Union[hikari.ChannelType, type[hikari.PartialChannel]]], expected_types: set[hikari.ChannelType], -): +) -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -3633,7 +3631,7 @@ async def command( bar: typing.Annotated[ typing.Optional[annotations.Channel], annotations.TheseChannels(*channel_types), "boom" ] = None, - ): ... + ) -> None: ... assert isinstance(command.wrapped_command, tanjun.MessageCommand) assert isinstance(command.wrapped_command.parser, tanjun.ShlexParser) @@ -3714,7 +3712,7 @@ async def command( assert option.max_value is None -def test_with_generic_these_channels(): # noqa: CFQ001 +def test_with_generic_these_channels() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3726,7 +3724,7 @@ async def command( bat: typing.Annotated[ typing.Optional[annotations.TheseChannels[hikari.GuildVoiceChannel, hikari.PrivateChannel]], "bip" # type: ignore ] = None, - ): ... + ) -> None: ... expected_types_1 = { hikari.ChannelType.GUILD_CATEGORY, @@ -3820,7 +3818,7 @@ async def command( assert option.max_value is None -def test_for_attachment_option(): +def test_for_attachment_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("meow", "nom") async def command( @@ -3870,7 +3868,7 @@ async def command( assert tracked_option.type is hikari.OptionType.ATTACHMENT -def test_for_attachment_option_on_message_command(): +def test_for_attachment_option_on_message_command() -> None: @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: annotations.Attachment) -> None: ... @@ -3880,7 +3878,7 @@ async def command(ctx: tanjun.abc.Context, arg: annotations.Attachment) -> None: annotations.parse_annotated_args(command, follow_wrapped=True) -def test_for_attachment_option_on_message_command_with_default(): +def test_for_attachment_option_on_message_command_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Attachment] = None) -> None: ... @@ -3888,7 +3886,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Atta assert command.parser is None -def test_for_attachment_option_on_message_command_with_default_and_pre_set_parser(): +def test_for_attachment_option_on_message_command_with_default_and_pre_set_parser() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.with_parser @tanjun.as_message_command("command") @@ -3899,7 +3897,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Atta assert not command.parser.arguments -def test_for_bool_option(): +def test_for_bool_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -3978,7 +3976,7 @@ async def command( assert tracked_option.type is hikari.OptionType.BOOLEAN -def test_for_channel_option(): +def test_for_channel_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4059,7 +4057,7 @@ async def command( assert tracked_option.type is hikari.OptionType.CHANNEL -def test_for_interaction_channel_option(): +def test_for_interaction_channel_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("meow", "nom") async def command( @@ -4109,7 +4107,7 @@ async def command( assert tracked_option.type is hikari.OptionType.CHANNEL -def test_for_interaction_channel_option_on_message_command(): +def test_for_interaction_channel_option_on_message_command() -> None: @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionChannel) -> None: ... @@ -4123,7 +4121,7 @@ async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionChannel) annotations.parse_annotated_args(command, follow_wrapped=True) -def test_for_interaction_channel_option_on_message_command_with_default(): +def test_for_interaction_channel_option_on_message_command_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.InteractionChannel] = None) -> None: ... @@ -4131,7 +4129,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert command.parser is None -def test_for_interaction_channel_option_on_message_command_with_default_and_pre_set_parser(): +def test_for_interaction_channel_option_on_message_command_with_default_and_pre_set_parser() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.with_parser @tanjun.as_message_command("command") @@ -4142,7 +4140,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert not command.parser.arguments -def test_for_float_option(): +def test_for_float_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4221,7 +4219,7 @@ async def command( assert tracked_option.type is hikari.OptionType.FLOAT -def test_for_int_option(): +def test_for_int_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4300,7 +4298,7 @@ async def command( assert tracked_option.type is hikari.OptionType.INTEGER -def test_for_member_option(): +def test_for_member_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4379,7 +4377,7 @@ async def command( assert tracked_option.type is hikari.OptionType.USER -def test_for_interaction_member_option(): +def test_for_interaction_member_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("meow", "nom") async def command( @@ -4429,7 +4427,7 @@ async def command( assert tracked_option.type is hikari.OptionType.USER -def test_for_interaction_member_option_on_message_command(): +def test_for_interaction_member_option_on_message_command() -> None: @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionMember) -> None: ... @@ -4442,7 +4440,7 @@ async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionMember) - annotations.parse_annotated_args(command, follow_wrapped=True) -def test_for_interaction_member_option_on_message_command_with_default(): +def test_for_interaction_member_option_on_message_command_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.InteractionMember] = None) -> None: ... @@ -4450,7 +4448,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert command.parser is None -def test_for_interaction_member_option_on_message_command_with_default_and_pre_set_parser(): +def test_for_interaction_member_option_on_message_command_with_default_and_pre_set_parser() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.with_parser @tanjun.as_message_command("command") @@ -4461,7 +4459,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert not command.parser.arguments -def test_for_mentionable_option(): +def test_for_mentionable_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4540,7 +4538,7 @@ async def command( assert tracked_option.type is hikari.OptionType.MENTIONABLE -def test_for_role_option(): +def test_for_role_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4619,7 +4617,7 @@ async def command( assert tracked_option.type is hikari.OptionType.ROLE -def test_for_str_option(): +def test_for_str_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4698,7 +4696,7 @@ async def command( assert tracked_option.type is hikari.OptionType.STRING -def test_for_user_option(): +def test_for_user_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4777,7 +4775,7 @@ async def command( assert tracked_option.type is hikari.OptionType.USER -def test_when_annotated_not_top_level_typing_union(): +def test_when_annotated_not_top_level_typing_union() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4849,7 +4847,7 @@ async def command( assert option.max_value is None -def test_when_annotated_not_top_level_3_10_union(): +def test_when_annotated_not_top_level_3_10_union() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4921,7 +4919,7 @@ async def command( assert option.max_value is None -def test_when_annotated_handles_typing_unions(): +def test_when_annotated_handles_typing_unions() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4993,7 +4991,7 @@ async def command( assert option.max_value is None -def test_when_annotated_handles_3_10_unions(): +def test_when_annotated_handles_3_10_unions() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -5065,7 +5063,7 @@ async def command( assert option.max_value is None -def test_parse_annotated_args_with_descriptions_argument(): +def test_parse_annotated_args_with_descriptions_argument() -> None: @tanjun.as_slash_command("name", "description") async def command(ctx: tanjun.abc.Context, *, echo: annotations.Str, foxy: annotations.Int = 232) -> None: raise NotImplementedError @@ -5085,7 +5083,7 @@ async def command(ctx: tanjun.abc.Context, *, echo: annotations.Str, foxy: annot ] -def test_parse_annotated_args_with_descriptions_argument_overrides_annotation_strings(): +def test_parse_annotated_args_with_descriptions_argument_overrides_annotation_strings() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, @@ -5103,7 +5101,7 @@ async def command( ] -def test_parse_annotated_args_with_descriptions_argument_for_wrapped_slash_command(): +def test_parse_annotated_args_with_descriptions_argument_for_wrapped_slash_command() -> None: @tanjun.as_message_command("ignore me") @tanjun.as_slash_command("name", "description") async def command( @@ -5122,7 +5120,7 @@ async def command( ] -def test_attachment_field(): +def test_attachment_field() -> None: @tanjun.as_slash_command("name", "description") async def command(ctx: tanjun.abc.Context, field: hikari.Attachment = annotations.attachment_field()) -> None: ... @@ -5143,7 +5141,7 @@ async def command(ctx: tanjun.abc.Context, field: hikari.Attachment = annotation assert tracked_option.type is hikari.OptionType.ATTACHMENT -def test_attachment_field_with_config(): +def test_attachment_field_with_config() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, @@ -5169,7 +5167,7 @@ async def command( assert tracked_option.type is hikari.OptionType.ATTACHMENT -def test_attachment_field_when_type_mismatch(): +def test_attachment_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, fobo: annotations.Bool = annotations.attachment_field(description="x") # type: ignore @@ -5185,7 +5183,7 @@ async def command( annotations.parse_annotated_args(command) -def test_attachment_field_when_type_match(): +def test_attachment_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _( @@ -5193,7 +5191,7 @@ async def _( ) -> None: ... -def test_bool_field(): +def test_bool_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, field: bool = annotations.bool_field()) -> None: ... @@ -5232,7 +5230,7 @@ async def command(ctx: tanjun.abc.Context, field: bool = annotations.bool_field( assert len(command.wrapped_command.parser.options) == 0 -def test_bool_field_with_config(): +def test_bool_field_with_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -5260,7 +5258,7 @@ async def command( assert len(command.parser.options) == 0 -def test_bool_field_when_default_marks_as_flag(): +def test_bool_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, fieldy: bool = annotations.bool_field(default=False)) -> None: ... @@ -5283,7 +5281,7 @@ async def command(ctx: tanjun.abc.Context, fieldy: bool = annotations.bool_field assert option.max_value is None -def test_bool_field_when_default_marks_as_flag_and_other_config(): +def test_bool_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -5311,7 +5309,7 @@ async def command( assert option.max_value is None -def test_bool_field_when_type_mismatch(): +def test_bool_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, me: annotations.Str = annotations.bool_field(description="x") # type: ignore @@ -5323,13 +5321,13 @@ async def command( annotations.parse_annotated_args(command) -def test_bool_field_when_type_match(): +def test_bool_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _(ctx: tanjun.abc.Context, field: annotations.Bool = annotations.bool_field(description="x")) -> None: ... -def test_channel_field(): +def test_channel_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, meow: hikari.PartialChannel = annotations.channel_field()) -> None: ... @@ -5370,7 +5368,7 @@ async def command(ctx: tanjun.abc.Context, meow: hikari.PartialChannel = annotat assert len(command.wrapped_command.parser.options) == 0 -def test_channel_field_with_config(): +def test_channel_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -5427,7 +5425,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_channel_field_when_default_marks_as_flag(): +def test_channel_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, meow: typing.Optional[hikari.PartialChannel] = annotations.channel_field(default=None) @@ -5454,7 +5452,7 @@ async def command( assert option.max_value is None -def test_channel_field_when_default_marks_as_flag_and_other_config(): +def test_channel_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -5486,7 +5484,7 @@ async def command( assert option.max_value is None -def test_channel_field_when_type_mismatch(): +def test_channel_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, xf: annotations.Float = annotations.channel_field(description="x") # type: ignore @@ -5502,7 +5500,7 @@ async def command( annotations.parse_annotated_args(command) -def test_channel_field_when_type_match(): +def test_channel_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _( @@ -5510,7 +5508,7 @@ async def _( ) -> None: ... -def test_float_field(): +def test_float_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, special: float = annotations.float_field()) -> None: ... @@ -5553,7 +5551,7 @@ async def command(ctx: tanjun.abc.Context, special: float = annotations.float_fi assert len(command.wrapped_command.parser.options) == 0 -def test_float_field_with_config(): +def test_float_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -5618,7 +5616,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_float_field_when_default_marks_as_flag(): +def test_float_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, meow: typing.Optional[float] = annotations.float_field(default=None) @@ -5643,7 +5641,7 @@ async def command( assert option.max_value is None -def test_float_field_when_default_marks_as_flag_and_other_config(): +def test_float_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -5675,7 +5673,7 @@ async def command( assert option.max_value == 123.543 -def test_float_field_when_type_mismatch(): +def test_float_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, call: annotations.Int = annotations.float_field(description="x") # type: ignore @@ -5687,7 +5685,7 @@ async def command( annotations.parse_annotated_args(command) -def test_float_field_when_type_match(): +def test_float_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _( @@ -5695,7 +5693,7 @@ async def _( ) -> None: ... -def test_int_field(): +def test_int_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, ni: int = annotations.int_field()) -> None: ... @@ -5734,7 +5732,7 @@ async def command(ctx: tanjun.abc.Context, ni: int = annotations.int_field()) -> assert len(command.wrapped_command.parser.options) == 0 -def test_int_field_with_config(): +def test_int_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -5793,7 +5791,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_int_field_when_default_marks_as_flag(): +def test_int_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, nyaa: typing.Optional[int] = annotations.int_field(default=None) @@ -5818,7 +5816,7 @@ async def command( assert option.max_value is None -def test_int_field_when_default_marks_as_flag_and_other_config(): +def test_int_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -5846,7 +5844,7 @@ async def command( assert option.max_value == 666 -def test_int_field_when_type_mismatch(): +def test_int_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, meow: annotations.Float = annotations.int_field(description="x") @@ -5858,13 +5856,13 @@ async def command( annotations.parse_annotated_args(command) -def test_int_field_when_type_match(): +def test_int_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _(ctx: tanjun.abc.Context, field: annotations.Int = annotations.int_field(description="x")) -> None: ... -def test_member_field(): +def test_member_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, nope: hikari.Member = annotations.member_field()) -> None: ... @@ -5903,7 +5901,7 @@ async def command(ctx: tanjun.abc.Context, nope: hikari.Member = annotations.mem assert len(command.wrapped_command.parser.options) == 0 -def test_member_field_with_config(): +def test_member_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -5947,7 +5945,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_member_field_when_default_marks_as_flag(): +def test_member_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, nep: typing.Optional[hikari.Member] = annotations.member_field(default=None) @@ -5972,7 +5970,7 @@ async def command( assert option.max_value is None -def test_member_field_when_default_marks_as_flag_and_other_config(): +def test_member_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -6000,7 +5998,7 @@ async def command( assert option.max_value is None -def test_member_field_when_type_mismatch(): +def test_member_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, freaky: annotations.User = annotations.member_field(description="x") @@ -6016,7 +6014,7 @@ async def command( annotations.parse_annotated_args(command) -def test_member_field_when_type_match(): +def test_member_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _( @@ -6024,7 +6022,7 @@ async def _( ) -> None: ... -def test_mentionable_field(): +def test_mentionable_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -6065,7 +6063,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_mentionable_field_with_config(): +def test_mentionable_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -6114,7 +6112,7 @@ async def command( assert argument.max_value is None -def test_mentionable_field_when_default_marks_as_flag(): +def test_mentionable_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -6140,7 +6138,7 @@ async def command( assert option.max_value is None -def test_mentionable_field_when_default_marks_as_flag_and_other_config(): +def test_mentionable_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -6168,7 +6166,7 @@ async def command( assert option.max_value is None -def test_mentionable_field_when_type_mismatch(): +def test_mentionable_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, @@ -6185,7 +6183,7 @@ async def command( annotations.parse_annotated_args(command) -def test_mentionable_field_when_type_match(): +def test_mentionable_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _( @@ -6193,7 +6191,7 @@ async def _( ) -> None: ... -def test_role_field(): +def test_role_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, arg: hikari.Role = annotations.role_field()) -> None: ... @@ -6232,7 +6230,7 @@ async def command(ctx: tanjun.abc.Context, arg: hikari.Role = annotations.role_f assert len(command.wrapped_command.parser.options) == 0 -def test_role_field_with_config(): +def test_role_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -6276,7 +6274,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_role_field_when_default_marks_as_flag(): +def test_role_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, nep: typing.Union[hikari.Role, None] = annotations.role_field(default=None) @@ -6301,7 +6299,7 @@ async def command( assert option.max_value is None -def test_role_field_when_default_marks_as_flag_and_other_config(): +def test_role_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -6332,7 +6330,7 @@ async def command( assert option.max_value is None -def test_role_field_when_type_mismatch(): +def test_role_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, cappy: annotations.Int = annotations.role_field(description="x") # type: ignore @@ -6345,13 +6343,13 @@ async def command( annotations.parse_annotated_args(command) -def test_role_field_when_type_match(): +def test_role_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _(ctx: tanjun.abc.Context, field: annotations.Role = annotations.role_field(description="x")) -> None: ... -def test_str_field(): +def test_str_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, field: str = annotations.str_field()) -> None: ... @@ -6390,7 +6388,7 @@ async def command(ctx: tanjun.abc.Context, field: str = annotations.str_field()) assert len(command.wrapped_command.parser.options) == 0 -def test_str_field_with_config(): +def test_str_field_with_config() -> None: def mock_converter_1(_: str) -> int: raise NotImplementedError @@ -6456,7 +6454,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_str_field_with_single_converter(): +def test_str_field_with_single_converter() -> None: def mock_converter(_: str) -> bool: raise NotImplementedError @@ -6487,7 +6485,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_str_field_when_default_marks_as_flag(): +def test_str_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, poison: typing.Union[str, None] = annotations.str_field(default=None) @@ -6512,7 +6510,7 @@ async def command( assert option.max_value is None -def test_str_field_when_default_marks_as_flag_and_other_config(): +def test_str_field_when_default_marks_as_flag_and_other_config() -> None: def mock_converter_1(_: str) -> int: raise NotImplementedError @@ -6551,7 +6549,7 @@ async def command( assert option.max_value is None -def test_str_field_when_default_marks_as_flag_and_single_converter(): +def test_str_field_when_default_marks_as_flag_and_single_converter() -> None: def mock_converter(_: str) -> str: raise NotImplementedError @@ -6572,7 +6570,7 @@ async def command( assert option.converters == [mock_converter] -def test_str_field_when_type_mismatch(): +def test_str_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, bust: annotations.Int = annotations.str_field(description="x") # type: ignore @@ -6584,13 +6582,13 @@ async def command( annotations.parse_annotated_args(command) -def test_str_field_when_type_match(): +def test_str_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _(ctx: tanjun.abc.Context, field: annotations.Str = annotations.str_field(description="x")) -> None: ... -def test_user_field(): +def test_user_field() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command(ctx: tanjun.abc.Context, of: hikari.User = annotations.user_field()) -> None: ... @@ -6629,7 +6627,7 @@ async def command(ctx: tanjun.abc.Context, of: hikari.User = annotations.user_fi assert len(command.wrapped_command.parser.options) == 0 -def test_user_field_with_config(): +def test_user_field_with_config() -> None: @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( @@ -6678,7 +6676,7 @@ async def command( assert len(command.wrapped_command.parser.options) == 0 -def test_user_field_when_default_marks_as_flag(): +def test_user_field_when_default_marks_as_flag() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, sl: typing.Union[hikari.User, None] = annotations.user_field(default=None) @@ -6703,7 +6701,7 @@ async def command( assert option.max_value is None -def test_user_field_when_default_marks_as_flag_and_other_config(): +def test_user_field_when_default_marks_as_flag_and_other_config() -> None: @tanjun.as_message_command("name") async def command( ctx: tanjun.abc.Context, @@ -6731,7 +6729,7 @@ async def command( assert option.max_value is None -def test_user_field_when_type_mismatch(): +def test_user_field_when_type_mismatch() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, fed: annotations.Member = annotations.user_field(description="x") # type: ignore @@ -6747,13 +6745,13 @@ async def command( annotations.parse_annotated_args(command) -def test_user_field_when_type_match(): +def test_user_field_when_type_match() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("name", "description") async def _(ctx: tanjun.abc.Context, field: annotations.User = annotations.user_field(description="x")) -> None: ... -def test_with_unpacked_stdlib_typed_dict(): +def test_with_unpacked_stdlib_typed_dict() -> None: class TypedDict(typing.TypedDict): amber: typing.Annotated[annotations.User, "umfy"] candy: str @@ -6816,8 +6814,8 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert argument.max_value is None -def test_with_unpacked_other_syntax_typed_dict(): - TypedDict = typing.TypedDict( # noqa: N806 +def test_with_unpacked_other_syntax_typed_dict() -> None: + TypedDict = typing.TypedDict( "TypedDict", { "baz": typing.NotRequired[typing.Annotated[annotations.Float, "eep"]], @@ -6907,7 +6905,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_empty_unpacked_typed_dict(): +def test_with_empty_unpacked_typed_dict() -> None: class TypedDict(typing.TypedDict): pickle: str @@ -6925,7 +6923,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert not command.wrapped_command.parser -def test_with_empty_unpacked_typed_dict_where_total_is_false(): +def test_with_empty_unpacked_typed_dict_where_total_is_false() -> None: class TypedDict(typing.TypedDict, total=False): me: typing.Annotated[annotations.Role, "c"] too: typing.Required[typing.Annotated[annotations.Bool, "b"]] @@ -7013,7 +7011,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_other_args(): +def test_with_unpacked_typed_dict_and_other_args() -> None: class TypedDict(typing.TypedDict): other: typing.NotRequired[typing.Annotated[annotations.Int, "bat"]] value: typing.Annotated[annotations.User, "meow"] @@ -7100,7 +7098,7 @@ async def command( assert option.max_value is None -def test_with_unpacked_typed_dict_and_attachment(): +def test_with_unpacked_typed_dict_and_attachment() -> None: class TypedDict(typing.TypedDict): field: typing.Annotated[annotations.Attachment, "meow"] other: typing.NotRequired[typing.Annotated[annotations.Attachment, "nyaa"]] @@ -7135,7 +7133,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert tracked_option.type is hikari.OptionType.ATTACHMENT -def test_with_unpacked_typed_dict_and_bool(): +def test_with_unpacked_typed_dict_and_bool() -> None: class TypedDict(typing.TypedDict): fi: typing.Annotated[annotations.Bool, "nn"] to: typing.NotRequired[typing.Annotated[annotations.Bool, "xn"]] @@ -7199,7 +7197,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_channel(): +def test_with_unpacked_typed_dict_and_channel() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Channel, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Channel, "xat"]] @@ -7265,7 +7263,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_choices(): +def test_with_unpacked_typed_dict_and_choices() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Str, annotations.Choices({"hi": "meow", "blam": "xd"}), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Int, annotations.Choices({"m": 1, "ddd": 420}), "xat"]] @@ -7341,7 +7339,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_color(): +def test_with_unpacked_typed_dict_and_color() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Color, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Color, "xat"]] @@ -7405,7 +7403,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_converted(): +def test_with_unpacked_typed_dict_and_converted() -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() @@ -7472,7 +7470,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_datetime(): +def test_with_unpacked_typed_dict_and_datetime() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Datetime, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Datetime, "xat"]] @@ -7536,7 +7534,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_default(): +def test_with_unpacked_typed_dict_and_default() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Int, annotations.Default(0), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Float, annotations.Default(0.1), "xat"]] @@ -7600,7 +7598,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_flag(): +def test_with_unpacked_typed_dict_and_flag() -> None: class TypedDict(typing.TypedDict): of: typing.NotRequired[ typing.Annotated[annotations.Int, annotations.Flag(aliases=["-o"], empty_value="aaaa"), "maaaa"] @@ -7645,7 +7643,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_float(): +def test_with_unpacked_typed_dict_and_float() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Float, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Float, "xat"]] @@ -7709,7 +7707,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_greedy(): +def test_with_unpacked_typed_dict_and_greedy() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Str, annotations.Greedy(), "maaaa"] @@ -7751,7 +7749,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert len(command.wrapped_command.parser.options) == 0 -def test_with_unpacked_typed_dict_and_int(): +def test_with_unpacked_typed_dict_and_int() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Int, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Int, "xat"]] @@ -7815,7 +7813,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_interaction_channel(): +def test_with_unpacked_typed_dict_and_interaction_channel() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.InteractionChannel, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.InteractionChannel, "xat"]] @@ -7850,7 +7848,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert tracked_option.type is hikari.OptionType.CHANNEL -def test_with_unpacked_typed_dict_and_interaction_member(): +def test_with_unpacked_typed_dict_and_interaction_member() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.InteractionMember, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.InteractionMember, "xat"]] @@ -7885,7 +7883,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert tracked_option.type is hikari.OptionType.USER -def test_with_unpacked_typed_dict_and_length(): +def test_with_unpacked_typed_dict_and_length() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Str, annotations.Length(232), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Str, annotations.Length(4, 128), "xat"]] @@ -7958,7 +7956,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_max(): +def test_with_unpacked_typed_dict_and_max() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Int, annotations.Max(453), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Float, annotations.Max(69.420), "xat"]] @@ -8026,7 +8024,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value == 69.420 -def test_with_unpacked_typed_dict_and_member(): +def test_with_unpacked_typed_dict_and_member() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Member, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Member, "xat"]] @@ -8090,7 +8088,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_mentionable(): +def test_with_unpacked_typed_dict_and_mentionable() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Mentionable, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Mentionable, "xat"]] @@ -8154,7 +8152,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_min(): +def test_with_unpacked_typed_dict_and_min() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Float, annotations.Min(3.2), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Int, annotations.Min(32), "xat"]] @@ -8222,7 +8220,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_name(): +def test_with_unpacked_typed_dict_and_name() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Float, annotations.Name("hi"), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.User, annotations.Name("nye"), "xat"]] @@ -8286,7 +8284,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_positional(): +def test_with_unpacked_typed_dict_and_positional() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Int, annotations.Positional(), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Str, annotations.Positional(), "xat"]] @@ -8324,7 +8322,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert len(command.parser.options) == 0 -def test_with_unpacked_typed_dict_and_ranged(): +def test_with_unpacked_typed_dict_and_ranged() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Int, annotations.Ranged(4, 64), "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Float, annotations.Ranged(12.21, 54.34), "xat"]] @@ -8397,7 +8395,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value == 54.34 -def test_with_unpacked_typed_dict_and_role(): +def test_with_unpacked_typed_dict_and_role() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Role, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Role, "xat"]] @@ -8461,7 +8459,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_snowflake(): +def test_with_unpacked_typed_dict_and_snowflake() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Snowflake, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Snowflake, "xat"]] @@ -8525,7 +8523,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_snowflake_or(): +def test_with_unpacked_typed_dict_and_snowflake_or() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[ typing.Union[annotations.Role, hikari.Snowflake], @@ -8599,7 +8597,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_str(): +def test_with_unpacked_typed_dict_and_str() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.Str, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.Str, "xat"]] @@ -8663,7 +8661,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_these_channels(): +def test_with_unpacked_typed_dict_and_these_channels() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[ annotations.Channel, annotations.TheseChannels(hikari.ChannelType.DM, hikari.GuildThreadChannel), "maaaa" @@ -8757,7 +8755,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_with_unpacked_typed_dict_and_user(): +def test_with_unpacked_typed_dict_and_user() -> None: class TypedDict(typing.TypedDict): of: typing.Annotated[annotations.User, "maaaa"] oo: typing.NotRequired[typing.Annotated[annotations.User, "xat"]] @@ -8821,7 +8819,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - assert option.max_value is None -def test_ignores_non_typed_dict_class_in_kwargs_unpack(): +def test_ignores_non_typed_dict_class_in_kwargs_unpack() -> None: class CustomClass: of: typing.Annotated[annotations.User, "maaaa"] # pyright: ignore[reportUninitializedInstanceVariable] oo: typing.NotRequired[typing.Annotated[annotations.User, "xat"]] # type: ignore @@ -8839,7 +8837,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[CustomClass]) assert command.wrapped_command.parser is None -def test_ignores_non_unpack_kwargs(): +def test_ignores_non_unpack_kwargs() -> None: class TypedDict(typing.TypedDict): meow: typing.Annotated[annotations.User, "maaaa"] echo: typing.NotRequired[typing.Annotated[annotations.User, "xat"]] @@ -8857,7 +8855,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: TypedDict) -> None: assert command.wrapped_command.parser is None -def test_ignores_unpack_typed_dict_for_varargs(): +def test_ignores_unpack_typed_dict_for_varargs() -> None: class TypedDict(typing.TypedDict): meow: typing.Annotated[annotations.User, "maaaa"] echo: typing.NotRequired[typing.Annotated[annotations.User, "xat"]] @@ -8875,7 +8873,7 @@ async def command(ctx: tanjun.abc.Context, *args: typing.Unpack[TypedDict]) -> N assert command.wrapped_command.parser is None -def test_ignores_unpack_typed_dict_for_non_var_arg(): +def test_ignores_unpack_typed_dict_for_non_var_arg() -> None: class TypedDict(typing.TypedDict): meow: typing.Annotated[annotations.User, "maaaa"] echo: typing.NotRequired[typing.Annotated[annotations.User, "xat"]] @@ -8893,7 +8891,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Unpack[TypedDict]) -> Non assert command.wrapped_command.parser is None -def test_with_typing_extensions_unpacked_and_typed_dict(): +def test_with_typing_extensions_unpacked_and_typed_dict() -> None: class TypedDict(typing_extensions.TypedDict): pickle: typing.Annotated[annotations.Str, "MAMA"] dill: typing.Annotated[typing.NotRequired[annotations.Bool], "OHHHHHH"] @@ -8973,7 +8971,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing_extensions.Unpack[Ty assert option.max_value is None -def test_ignores_untyped_kwargs(): +def test_ignores_untyped_kwargs() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("a", "b") @tanjun.as_message_command("x", "3") diff --git a/tests/test_annotations_future_annotations.py b/tests/test_annotations_future_annotations.py index a06d8ab62..969d31acf 100644 --- a/tests/test_annotations_future_annotations.py +++ b/tests/test_annotations_future_annotations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -34,7 +33,6 @@ import inspect import re import typing -from collections import abc as collections from unittest import mock import alluka @@ -44,11 +42,14 @@ import tanjun from tanjun import annotations +if typing.TYPE_CHECKING: + from collections import abc as collections + # pyright: reportPrivateUsage=none # pyright: reportUnknownMemberType=none -def test_where_no_signature(): +def test_where_no_signature() -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -64,7 +65,7 @@ def test_where_no_signature(): assert command.wrapped_command._tracked_options == {} -def test_where_no_signature_with_parser_already_set(): +def test_where_no_signature_with_parser_already_set() -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -82,11 +83,11 @@ def test_where_no_signature_with_parser_already_set(): assert command.wrapped_command._tracked_options == {} -def test_with_message_command_and_incompatible_parser_set(): +def test_with_message_command_and_incompatible_parser_set() -> None: mock_parser = mock.Mock(tanjun.abc.MessageParser) @tanjun.as_message_command("command") - async def command(ctx: tanjun.abc.MessageContext, foo: annotations.Int): ... + async def command(ctx: tanjun.abc.MessageContext, foo: annotations.Int) -> None: ... command.set_parser(mock_parser) @@ -94,12 +95,12 @@ async def command(ctx: tanjun.abc.MessageContext, foo: annotations.Int): ... annotations.with_annotated_args(command) -def test_with_nested_message_command_and_incompatible_parser_set(): +def test_with_nested_message_command_and_incompatible_parser_set() -> None: mock_parser = mock.Mock(tanjun.abc.MessageParser) @tanjun.as_message_command("command") @tanjun.as_slash_command("command", "description") - async def command(ctx: tanjun.abc.Context, foo: typing.Annotated[annotations.Int, "desc"]): ... + async def command(ctx: tanjun.abc.Context, foo: typing.Annotated[annotations.Int, "desc"]) -> None: ... command.set_parser(mock_parser) @@ -107,7 +108,7 @@ async def command(ctx: tanjun.abc.Context, foo: typing.Annotated[annotations.Int annotations.with_annotated_args(follow_wrapped=True)(command) -def test_with_no_annotations(): +def test_with_no_annotations() -> None: @annotations.with_annotated_args # pyright: ignore[reportUnknownArgumentType] @tanjun.as_slash_command("meow", "nyaa") @tanjun.as_message_command("meow") @@ -124,7 +125,7 @@ async def command( assert command.wrapped_command.parser is None -def test_with_no_annotations_but_message_parser_already_set(): +def test_with_no_annotations_but_message_parser_already_set() -> None: @tanjun.as_message_command("meow") async def command( ctx: tanjun.abc.Context, @@ -142,7 +143,7 @@ async def command( assert command.parser.options == [] -def test_with_slash_command_missing_option_description(): +def test_with_slash_command_missing_option_description() -> None: @tanjun.as_slash_command("meep", "description") async def callback( ctx: tanjun.abc.Context, @@ -155,7 +156,7 @@ async def callback( annotations.with_annotated_args(callback) -def test_when_wrapping_slash_but_not_follow_wrapped(): +def test_when_wrapping_slash_but_not_follow_wrapped() -> None: @annotations.with_annotated_args @tanjun.as_message_command("meep") @tanjun.as_slash_command("boop", "description") @@ -163,7 +164,7 @@ async def command( ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"], other_field: typing.Annotated[annotations.Str, "yo"] = "", - ): ... + ) -> None: ... assert isinstance(command.wrapped_command, tanjun.SlashCommand) assert isinstance(command.parser, tanjun.ShlexParser) @@ -173,11 +174,11 @@ async def command( assert command.wrapped_command._tracked_options == {} -def test_when_wrapping_message_but_not_follow_wrapped(): +def test_when_wrapping_message_but_not_follow_wrapped() -> None: @annotations.with_annotated_args @tanjun.as_slash_command("boop", "description") @tanjun.as_message_command("meep") - async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]): ... + async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]) -> None: ... assert command.build().options assert command._tracked_options @@ -185,10 +186,10 @@ async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.I assert command.wrapped_command.parser is None -def test_when_wrapping_message_but_not_follow_wrapped_parser_already_set(): +def test_when_wrapping_message_but_not_follow_wrapped_parser_already_set() -> None: @tanjun.as_slash_command("boop", "description") @tanjun.as_message_command("meep") - async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]): ... + async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.Int, "description"]) -> None: ... assert isinstance(command.wrapped_command, tanjun.MessageCommand) command.wrapped_command.set_parser(tanjun.ShlexParser()) @@ -202,7 +203,7 @@ async def command(ctx: tanjun.abc.Context, field: typing.Annotated[annotations.I assert command.wrapped_command.parser.options == [] -def test_when_follow_wrapping_and_wrapping_unsupported_command(): +def test_when_follow_wrapping_and_wrapping_unsupported_command() -> None: async def mock_callback( ctx: tanjun.abc.MessageContext, value: annotations.Str, other_value: annotations.Bool = False ) -> None: ... @@ -220,7 +221,7 @@ async def mock_callback( assert len(command.parser.options) == 1 -def test_with_with_std_range(): +def test_with_with_std_range() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -228,7 +229,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, range(123, 345), "nyaa"], other_value: typing.Annotated[annotations.Int, range(22, 5568), "sex"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -280,7 +281,7 @@ async def callback( assert option.max_value == 5567 -def test_with_with_backwards_std_range(): +def test_with_with_backwards_std_range() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -288,7 +289,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, range(542, 111, -1), "nyaa"], other_value: typing.Annotated[annotations.Int, range(3334, 43, -1), "sex"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -340,7 +341,7 @@ async def callback( assert option.max_value == 3334 -def test_with_std_slice(): +def test_with_std_slice() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -348,7 +349,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, 324:653, "meow"], other_value: typing.Annotated[annotations.Int, 444:555, "blam"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -400,7 +401,7 @@ async def callback( assert option.max_value == 554 -def test_with_backwards_std_slice(): +def test_with_backwards_std_slice() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -408,7 +409,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, 444:233:-1, "meow"], other_value: typing.Annotated[annotations.Int, 664:422:-1, "blam"] = 44, - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -576,7 +577,7 @@ def test_choices( option_type: hikari.OptionType, choices: collections.Sequence[_ChoiceT], result: collections.Sequence[hikari.CommandChoice], -): +) -> None: global choices_ global type_cls_ choices_ = choices @@ -588,7 +589,7 @@ async def callback( ctx: tanjun.abc.Context, nope: typing.Annotated[type_cls_, annotations.Choices(choices_), "default"], boo: typing.Annotated[type_cls_, annotations.Choices(choices_), "be"] = typing.cast("_ChoiceT", "hi"), - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -649,7 +650,7 @@ def test_choices_and_mixed_values( collections.Sequence[_ChoiceT], collections.Sequence[tuple[str, _ChoiceT]], collections.Mapping[str, _ChoiceT] ], mismatched_type: type[typing.Any], -): +) -> None: global choices_ global type__ choices_ = choices @@ -667,7 +668,7 @@ async def callback( annotations.with_annotated_args(callback) # pyright: ignore[reportUnknownArgumentType] -def test_with_generic_float_choices(): +def test_with_generic_float_choices() -> None: global Choices1 class Choices1(float, enum.Enum): @@ -685,7 +686,7 @@ async def callback( ctx: tanjun.abc.Context, nom: typing.Annotated[annotations.Choices[Choices1], "description"], # type: ignore boom: typing.Annotated[annotations.Choices[Choices1], "bag"] = Choices1.Blam, # type: ignore - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -764,7 +765,7 @@ async def callback( assert option.max_value is None -def test_with_generic_int_choices(): +def test_with_generic_int_choices() -> None: global Choices2 class Choices2(int, enum.Enum): @@ -781,7 +782,7 @@ async def callback( ctx: tanjun.abc.Context, nat: typing.Annotated[annotations.Choices[Choices2], "meow"], # type: ignore bag: typing.Annotated[annotations.Choices[Choices2], "bagette"] = Choices2.Bazman, # type: ignore - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -858,7 +859,7 @@ async def callback( assert option.max_value is None -def test_with_generic_str_choices(): +def test_with_generic_str_choices() -> None: global Choices3 class Choices3(str, enum.Enum): @@ -876,7 +877,7 @@ async def callback( ctx: tanjun.abc.Context, ny: typing.Annotated[annotations.Choices[Choices3], "fat"], # type: ignore aa: typing.Annotated[annotations.Choices[Choices3], "bat"] = Choices3.Sis, # type: ignore - ): ... + ) -> None: ... assert callback.build().options == [ hikari.CommandOption( @@ -955,7 +956,7 @@ async def callback( assert option.max_value is None -def test_with_generic_choices_when_enum_has_no_other_base(): +def test_with_generic_choices_when_enum_has_no_other_base() -> None: class Choices(enum.Enum): ... with ( @@ -965,7 +966,7 @@ class Choices(enum.Enum): ... annotations.Choices[Choices] -def test_with_generic_choices_when_enum_isnt_int_str_or_float(): +def test_with_generic_choices_when_enum_isnt_int_str_or_float() -> None: class Choices(bytes, enum.Enum): ... with ( @@ -975,7 +976,7 @@ class Choices(bytes, enum.Enum): ... annotations.Choices[Choices] -def test_with_converted(): +def test_with_converted() -> None: global mock_callback_1 global mock_callback_2 global mock_callback_3 @@ -989,9 +990,7 @@ def test_with_converted(): async def command( ctx: tanjun.abc.Context, boo: typing.Annotated[str, annotations.Converted(mock_callback_1, mock_callback_2), "description"], - bam: typing.Annotated[ - typing.Optional[int], annotations.Converted(mock_callback_3), "nom" # noqa: NU002 - ] = None, + bam: typing.Annotated[typing.Optional[int], annotations.Converted(mock_callback_3), "nom"] = None, ) -> None: ... assert command.build().options == [ @@ -1051,7 +1050,7 @@ async def command( assert option.max_value is None -def test_with_generic_converted(): +def test_with_generic_converted() -> None: global mock_callback_1 global mock_callback_2 global mock_callback_3 @@ -1127,7 +1126,7 @@ async def command( assert option.max_value is None -def test_with_default(): +def test_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1168,7 +1167,7 @@ async def command( assert option.max_value is None -def test_with_generic_default(): +def test_with_generic_default() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1214,13 +1213,12 @@ async def command( assert option.max_value is None -def test_with_default_overriding_signature_default(): +def test_with_default_overriding_signature_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") async def command( - ctx: tanjun.abc.Context, - argument: typing.Annotated[annotations.Str, annotations.Default("yeet"), "meow"] = "m", # noqa: F821 + ctx: tanjun.abc.Context, argument: typing.Annotated[annotations.Str, annotations.Default("yeet"), "meow"] = "m" ) -> None: ... assert command.build().options == [ @@ -1256,7 +1254,7 @@ async def command( assert option.max_value is None -def test_with_default_unsetting_signature_default(): +def test_with_default_unsetting_signature_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1296,7 +1294,7 @@ async def command( assert argument.max_value is None -def test_with_flag(): +def test_with_flag() -> None: global empty_value empty_value = mock.Mock() @@ -1353,7 +1351,7 @@ async def callback( assert option.default is tanjun.abc.NO_PASS -def test_with_flag_and_deprecated_default(): +def test_with_flag_and_deprecated_default() -> None: with pytest.warns( DeprecationWarning, match=re.escape("Flag.__init__'s `default` argument is deprecated, use Default instead") ): @@ -1386,7 +1384,7 @@ async def callback( assert option.default == 1231 -def test_with_flag_and_default(): +def test_with_flag_and_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("meow") @tanjun.as_slash_command("ea", "meow") @@ -1421,7 +1419,7 @@ async def callback( assert option.default is tanjun.abc.NO_PASS -def test_with_flag_missing_default(): +def test_with_flag_missing_default() -> None: @tanjun.as_message_command("meow") async def callback( ctx: tanjun.abc.MessageContext, @@ -1433,7 +1431,7 @@ async def callback( annotations.with_annotated_args(callback) -def test_with_positional(): +def test_with_positional() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("name") @tanjun.as_slash_command("boop", "description") @@ -1465,7 +1463,7 @@ async def callback( assert option.default is tanjun.abc.NO_DEFAULT -def test_with_generic_positional(): +def test_with_generic_positional() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1499,10 +1497,12 @@ async def callback( assert option.default is tanjun.abc.NO_DEFAULT -def test_with_greedy(): +def test_with_greedy() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") - async def callback(ctx: tanjun.abc.Context, meep: typing.Annotated[annotations.Int, annotations.Greedy()]): ... + async def callback( + ctx: tanjun.abc.Context, meep: typing.Annotated[annotations.Int, annotations.Greedy()] + ) -> None: ... assert isinstance(callback.parser, tanjun.ShlexParser) assert len(callback.parser.arguments) == 1 @@ -1518,12 +1518,12 @@ async def callback(ctx: tanjun.abc.Context, meep: typing.Annotated[annotations.I assert argument.max_value is None -def test_with_generic_greedy(): +def test_with_generic_greedy() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") - async def callback(ctx: tanjun.abc.Context, meep: annotations.Greedy[annotations.Str]): # type: ignore + async def callback(ctx: tanjun.abc.Context, meep: annotations.Greedy[annotations.Str]) -> None: # type: ignore ... assert isinstance(callback.parser, tanjun.ShlexParser) @@ -1540,7 +1540,7 @@ async def callback(ctx: tanjun.abc.Context, meep: annotations.Greedy[annotations assert argument.max_value is None -def test_with_length(): +def test_with_length() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1619,7 +1619,7 @@ async def callback( assert option.max_value is None -def test_with_length_when_min_specificed(): +def test_with_length_when_min_specificed() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -1698,7 +1698,7 @@ async def callback( assert option.max_value is None -def test_with_generic_length(): +def test_with_generic_length() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1779,7 +1779,7 @@ async def callback( assert option.max_value is None -def test_with_generic_length_when_min_specificed(): +def test_with_generic_length_when_min_specificed() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -1872,7 +1872,7 @@ def test_with_max( value: typing.Union[int, float], raw_type: type[typing.Any], option_type: hikari.OptionType, -): +) -> None: global type__ global value_ type__ = type_ @@ -1885,7 +1885,7 @@ async def callback( ctx: tanjun.abc.Context, bee: typing.Annotated[type__, annotations.Max(value_), "eee"], # type: ignore yeet_no: typing.Annotated[typing.Union[type__, None], annotations.Max(value_), "eep"] = None, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -1960,8 +1960,8 @@ async def callback( [(543, int, hikari.OptionType.INTEGER), (234.432, float, hikari.OptionType.FLOAT)], ) def test_with_generic_max( - value: typing.Union[int, float], converter: typing.Union[type[int], type[float]], option_type: hikari.OptionType -): + value: typing.Union[int, float], converter: type[typing.Union[int, float]], option_type: hikari.OptionType +) -> None: global value_ value_ = value @@ -1974,7 +1974,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[annotations.Max[value_], "eee"], # type: ignore other_number: typing.Annotated[annotations.Max[value_], "eep"] = 54234, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2044,7 +2044,7 @@ async def callback( assert option.max_value == value -def test_with_max_when_float_for_int(): +def test_with_max_when_float_for_int() -> None: @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") async def callback( @@ -2055,7 +2055,7 @@ async def callback( annotations.with_annotated_args(follow_wrapped=True)(callback) -def test_with_max_when_int_for_float(): +def test_with_max_when_int_for_float() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2145,7 +2145,7 @@ def test_with_min( raw_type: type[typing.Union[int, float]], option_type: hikari.OptionType, value: typing.Union[int, float], -): +) -> None: global type__ global value_ type__ = type_ @@ -2158,7 +2158,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[type__, annotations.Max(value_), "eee"], # type: ignore other_number: typing.Annotated[type__, annotations.Max(value_), "eep"] = 54234, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2233,8 +2233,8 @@ async def callback( [(123, int, hikari.OptionType.INTEGER), (123.321, float, hikari.OptionType.FLOAT)], ) def test_with_generic_min( - value: typing.Union[int, float], converter: typing.Union[type[int], type[float]], option_type: hikari.OptionType -): + value: typing.Union[int, float], converter: type[typing.Union[int, float]], option_type: hikari.OptionType +) -> None: global value_ value_ = value @@ -2247,7 +2247,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[annotations.Min[value_], "bee"], # type: ignore other_number: typing.Annotated[annotations.Min[value_], "buzz"] = 321, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2317,7 +2317,7 @@ async def callback( assert option.max_value is None -def test_with_min_when_float_for_int(): +def test_with_min_when_float_for_int() -> None: @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") async def callback( @@ -2328,7 +2328,7 @@ async def callback( annotations.with_annotated_args(follow_wrapped=True)(callback) -def test_with_min_when_int_for_float(): +def test_with_min_when_int_for_float() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2406,7 +2406,7 @@ async def callback( assert option.max_value is None -def test_with_overridden_name(): +def test_with_overridden_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2414,7 +2414,7 @@ async def callback( ctx: tanjun.abc.Context, nyaa: typing.Annotated[annotations.Int, annotations.Name("boop"), "Nope"], meow: typing.Annotated[annotations.Str, annotations.Name("meep_meep"), "Description"] = "meowow", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2484,7 +2484,7 @@ async def callback( assert option.max_value is None -def test_with_individually_overridden_name(): +def test_with_individually_overridden_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2494,7 +2494,7 @@ async def callback( meow: typing.Annotated[ annotations.Str, annotations.Name("nom2", slash="n", message="--boop-oop"), "Description" ] = "meowow", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2564,7 +2564,7 @@ async def callback( assert option.max_value is None -def test_with_overridden_slash_name(): +def test_with_overridden_slash_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2572,7 +2572,7 @@ async def callback( ctx: tanjun.abc.Context, necc: typing.Annotated[annotations.Int, annotations.Name(slash="nom"), "EEEE"], nya: typing.Annotated[annotations.Str, annotations.Name(slash="sex"), "AAAA"] = "meow", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2642,14 +2642,14 @@ async def callback( assert option.max_value is None -def test_with_overridden_message_name(): +def test_with_overridden_message_name() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") async def callback( ctx: tanjun.abc.Context, meow_meow: typing.Annotated[annotations.Str, annotations.Name(message="--blam-blam"), "Description"] = "neko", - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2690,7 +2690,7 @@ async def callback( assert option.max_value is None -def test_with_ranged(): +def test_with_ranged() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("command", "description") @tanjun.as_message_command("command") @@ -2698,7 +2698,7 @@ async def callback( ctx: tanjun.abc.Context, value: typing.Annotated[annotations.Int, annotations.Ranged(44, 55), "meow"], other_value: typing.Annotated[annotations.Float, annotations.Ranged(5433, 6524.32), "bye bye"] = 5, - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2762,9 +2762,9 @@ async def callback( def test_with_generic_ranged( min_value: typing.Union[float, int], max_value: typing.Union[float, int], - converter: typing.Union[type[float], type[int]], + converter: type[typing.Union[float, int]], option_type: hikari.OptionType, -): +) -> None: global min_value_ global max_value_ min_value_ = min_value @@ -2779,7 +2779,7 @@ async def callback( ctx: tanjun.abc.Context, number: typing.Annotated[annotations.Ranged[min_value_, max_value_], "meow"], # type: ignore other_number: typing.Annotated[annotations.Ranged[min_value_, max_value_], "nom"] = 443, # type: ignore - ): ... + ) -> None: ... assert isinstance(callback.wrapped_command, tanjun.MessageCommand) assert isinstance(callback.wrapped_command.parser, tanjun.ShlexParser) @@ -2849,7 +2849,7 @@ async def callback( assert option.max_value == max_value -def test_with_snowflake_or(): +def test_with_snowflake_or() -> None: global mock_callback mock_callback = mock.Mock() @@ -2931,7 +2931,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_channel(): +def test_with_generic_snowflake_or_for_channel() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3012,7 +3012,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_member(): +def test_with_generic_snowflake_or_for_member() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3093,7 +3093,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_mentionable(): +def test_with_generic_snowflake_or_for_mentionable() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3176,7 +3176,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_role(): +def test_with_generic_snowflake_or_for_role() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3257,7 +3257,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or_for_user(): +def test_with_generic_snowflake_or_for_user() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3338,7 +3338,7 @@ async def callback( assert option.max_value is None -def test_with_generic_snowflake_or(): +def test_with_generic_snowflake_or() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3447,7 +3447,7 @@ async def callback( def test_with_these_channels( channel_types: collections.Sequence[typing.Union[hikari.ChannelType, type[hikari.PartialChannel]]], expected_types: set[hikari.ChannelType], -): +) -> None: global channel_types_ channel_types_ = channel_types @@ -3460,7 +3460,7 @@ async def command( bar: typing.Annotated[ typing.Optional[annotations.Channel], annotations.TheseChannels(*channel_types_), "boom" ] = None, - ): ... + ) -> None: ... assert isinstance(command.wrapped_command, tanjun.MessageCommand) assert isinstance(command.wrapped_command.parser, tanjun.ShlexParser) @@ -3541,7 +3541,7 @@ async def command( assert option.max_value is None -def test_with_generic_these_channels(): # noqa: CFQ001 +def test_with_generic_these_channels() -> None: with pytest.warns(DeprecationWarning): @annotations.with_annotated_args(follow_wrapped=True) @@ -3553,7 +3553,7 @@ async def command( bat: typing.Annotated[ typing.Optional[annotations.TheseChannels[hikari.GuildVoiceChannel, hikari.PrivateChannel]], "bip" # type: ignore ] = None, - ): ... + ) -> None: ... expected_types_1 = { hikari.ChannelType.GUILD_CATEGORY, @@ -3647,7 +3647,7 @@ async def command( assert option.max_value is None -def test_for_attachment_option(): +def test_for_attachment_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("meow", "nom") async def command( @@ -3697,7 +3697,7 @@ async def command( assert tracked_option.type is hikari.OptionType.ATTACHMENT -def test_for_attachment_option_on_message_command(): +def test_for_attachment_option_on_message_command() -> None: @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: annotations.Attachment) -> None: ... @@ -3707,7 +3707,7 @@ async def command(ctx: tanjun.abc.Context, arg: annotations.Attachment) -> None: annotations.with_annotated_args(follow_wrapped=True)(command) -def test_for_attachment_option_on_message_command_with_default(): +def test_for_attachment_option_on_message_command_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Attachment] = None) -> None: ... @@ -3715,7 +3715,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Atta assert command.parser is None -def test_for_attachment_option_on_message_command_with_default_and_pre_set_parser(): +def test_for_attachment_option_on_message_command_with_default_and_pre_set_parser() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.with_parser @tanjun.as_message_command("command") @@ -3726,7 +3726,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Atta assert not command.parser.arguments -def test_for_bool_option(): +def test_for_bool_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -3805,7 +3805,7 @@ async def command( assert tracked_option.type is hikari.OptionType.BOOLEAN -def test_for_channel_option(): +def test_for_channel_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -3886,7 +3886,7 @@ async def command( assert tracked_option.type is hikari.OptionType.CHANNEL -def test_for_interaction_channel_option(): +def test_for_interaction_channel_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("meow", "nom") async def command( @@ -3936,7 +3936,7 @@ async def command( assert tracked_option.type is hikari.OptionType.CHANNEL -def test_for_interaction_channel_option_on_message_command(): +def test_for_interaction_channel_option_on_message_command() -> None: @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionChannel) -> None: ... @@ -3950,7 +3950,7 @@ async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionChannel) annotations.with_annotated_args(follow_wrapped=True)(command) -def test_for_interaction_channel_option_on_message_command_with_default(): +def test_for_interaction_channel_option_on_message_command_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.InteractionChannel] = None) -> None: ... @@ -3958,7 +3958,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert command.parser is None -def test_for_interaction_channel_option_on_message_command_with_default_and_pre_set_parser(): +def test_for_interaction_channel_option_on_message_command_with_default_and_pre_set_parser() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.with_parser @tanjun.as_message_command("command") @@ -3969,7 +3969,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert not command.parser.arguments -def test_for_float_option(): +def test_for_float_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4048,7 +4048,7 @@ async def command( assert tracked_option.type is hikari.OptionType.FLOAT -def test_for_int_option(): +def test_for_int_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4127,7 +4127,7 @@ async def command( assert tracked_option.type is hikari.OptionType.INTEGER -def test_for_member_option(): +def test_for_member_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4206,7 +4206,7 @@ async def command( assert tracked_option.type is hikari.OptionType.USER -def test_for_interaction_member_option(): +def test_for_interaction_member_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("meow", "nom") async def command( @@ -4257,7 +4257,7 @@ async def command( assert tracked_option.type is hikari.OptionType.USER -def test_for_interaction_member_option_on_message_command(): +def test_for_interaction_member_option_on_message_command() -> None: @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionMember) -> None: ... @@ -4270,7 +4270,7 @@ async def command(ctx: tanjun.abc.Context, arg: annotations.InteractionMember) - annotations.with_annotated_args(follow_wrapped=True)(command) -def test_for_interaction_member_option_on_message_command_with_default(): +def test_for_interaction_member_option_on_message_command_with_default() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.InteractionMember] = None) -> None: ... @@ -4278,7 +4278,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert command.parser is None -def test_for_interaction_member_option_on_message_command_with_default_and_pre_set_parser(): +def test_for_interaction_member_option_on_message_command_with_default_and_pre_set_parser() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.with_parser @tanjun.as_message_command("command") @@ -4289,7 +4289,7 @@ async def command(ctx: tanjun.abc.Context, arg: typing.Optional[annotations.Inte assert not command.parser.arguments -def test_for_mentionable_option(): +def test_for_mentionable_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4368,7 +4368,7 @@ async def command( assert tracked_option.type is hikari.OptionType.MENTIONABLE -def test_for_role_option(): +def test_for_role_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4447,7 +4447,7 @@ async def command( assert tracked_option.type is hikari.OptionType.ROLE -def test_for_str_option(): +def test_for_str_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4526,7 +4526,7 @@ async def command( assert tracked_option.type is hikari.OptionType.STRING -def test_for_user_option(): +def test_for_user_option() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_message_command("command") @tanjun.as_slash_command("meow", "nom") @@ -4605,7 +4605,7 @@ async def command( assert tracked_option.type is hikari.OptionType.USER -def test_when_annotated_not_top_level_typing_union(): +def test_when_annotated_not_top_level_typing_union() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4677,7 +4677,7 @@ async def command( assert option.max_value is None -def test_when_annotated_not_top_level_3_10_union(): +def test_when_annotated_not_top_level_3_10_union() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4749,7 +4749,7 @@ async def command( assert option.max_value is None -def test_when_annotated_handles_typing_unions(): +def test_when_annotated_handles_typing_unions() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4821,7 +4821,7 @@ async def command( assert option.max_value is None -def test_when_annotated_handles_3_10_unions(): +def test_when_annotated_handles_3_10_unions() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("name", "description") @tanjun.as_message_command("name") @@ -4893,7 +4893,7 @@ async def command( assert option.max_value is None -def test_parse_annotated_args_with_descriptions_argument(): +def test_parse_annotated_args_with_descriptions_argument() -> None: @tanjun.as_slash_command("name", "description") async def command(ctx: tanjun.abc.Context, *, echo: annotations.Str, foxy: annotations.Int = 232) -> None: raise NotImplementedError @@ -4913,7 +4913,7 @@ async def command(ctx: tanjun.abc.Context, *, echo: annotations.Str, foxy: annot ] -def test_parse_annotated_args_with_descriptions_argument_overrides_annotation_strings(): +def test_parse_annotated_args_with_descriptions_argument_overrides_annotation_strings() -> None: @tanjun.as_slash_command("name", "description") async def command( ctx: tanjun.abc.Context, @@ -4931,7 +4931,7 @@ async def command( ] -def test_parse_annotated_args_with_descriptions_argument_for_wrapped_slash_command(): +def test_parse_annotated_args_with_descriptions_argument_for_wrapped_slash_command() -> None: @tanjun.as_message_command("ignore me") @tanjun.as_slash_command("name", "description") async def command( diff --git a/tests/test_checks.py b/tests/test_checks.py index 066a90c53..6c50a5f6c 100644 --- a/tests/test_checks.py +++ b/tests/test_checks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -60,7 +59,7 @@ def context() -> tanjun.abc.Context: @pytest.mark.asyncio class TestOwnerCheck: - async def test(self): + async def test(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = True mock_context = mock.Mock() @@ -71,7 +70,7 @@ async def test(self): assert result is True mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false(self): + async def test_when_false(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock() @@ -82,9 +81,9 @@ async def test_when_false(self): assert result is False mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error(self): + async def test_when_false_and_error(self) -> None: class MockException(Exception): - def __init__(self): ... + def __init__(self) -> None: ... mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False @@ -96,7 +95,7 @@ def __init__(self): ... mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message(self): + async def test_when_false_and_error_message(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock() @@ -107,7 +106,7 @@ async def test_when_false_and_error_message(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_dict(self): + async def test_when_false_and_error_message_dict(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.AppCommandContext) @@ -121,7 +120,7 @@ async def test_when_false_and_error_message_dict(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_dict_but_not_app_command(self): + async def test_when_false_and_error_message_dict_but_not_app_command(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.Context) @@ -134,7 +133,7 @@ async def test_when_false_and_error_message_dict_but_not_app_command(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_dict_defaults(self): + async def test_when_false_and_error_message_dict_defaults(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.AppCommandContext) @@ -148,7 +147,7 @@ async def test_when_false_and_error_message_dict_defaults(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_dict_explicit_default(self): + async def test_when_false_and_error_message_dict_explicit_default(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.AppCommandContext) @@ -167,7 +166,7 @@ async def test_when_false_and_error_message_dict_explicit_default(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_localiser(self): + async def test_when_false_and_error_message_localiser(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="eepers creepers") @@ -185,7 +184,7 @@ async def test_when_false_and_error_message_localiser(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_localiser_overridden_id(self): + async def test_when_false_and_error_message_localiser_overridden_id(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="eepers creepers") @@ -215,7 +214,7 @@ async def test_when_false_and_error_message_localiser_overridden_id(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_error_message_localiser_defaults(self): + async def test_when_false_and_error_message_localiser_defaults(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="eepers creepers") @@ -238,7 +237,7 @@ async def test_when_false_and_error_message_localiser_defaults(self): mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) - async def test_when_false_and_halt_execution(self): + async def test_when_false_and_halt_execution(self) -> None: mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock() @@ -252,7 +251,7 @@ async def test_when_false_and_halt_execution(self): @pytest.mark.asyncio class TestNsfwCheck: - async def test_when_is_dm(self): + async def test_when_is_dm(self) -> None: mock_context = mock.Mock(guild_id=None) mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.NsfwCheck(error=TypeError, error_message="meep", halt_execution=True) @@ -263,7 +262,7 @@ async def test_when_is_dm(self): assert result is True get_perm_channel.assert_not_called() - async def test(self): + async def test(self) -> None: mock_context = mock.Mock() mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.NsfwCheck(error_message=None) @@ -274,7 +273,7 @@ async def test(self): assert result is True get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false(self): + async def test_when_false(self) -> None: mock_context = mock.Mock(client=tanjun.Client(mock.AsyncMock(), cache=mock.Mock())) check = tanjun.checks.NsfwCheck(error_message=None) @@ -284,9 +283,9 @@ async def test_when_false(self): assert result is False get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_when_error(self): + async def test_when_false_when_error(self) -> None: class MockException(Exception): - def __init__(self): ... + def __init__(self) -> None: ... mock_context = mock.Mock(client=tanjun.Client(mock.AsyncMock(), cache=mock.Mock())) check = tanjun.checks.NsfwCheck(error=MockException, error_message="nye") @@ -299,7 +298,7 @@ def __init__(self): ... get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message(self): + async def test_when_false_and_error_message(self) -> None: mock_context = mock.Mock() mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.NsfwCheck(error_message="meow me") @@ -312,7 +311,7 @@ async def test_when_false_and_error_message(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_dict(self): + async def test_when_false_and_error_message_dict(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.locale = hikari.Locale.HU mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) @@ -328,7 +327,7 @@ async def test_when_false_and_error_message_dict(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_dict_but_not_app_command(self): + async def test_when_false_and_error_message_dict_but_not_app_command(self) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.NsfwCheck( @@ -348,7 +347,7 @@ async def test_when_false_and_error_message_dict_but_not_app_command(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_dict_defaults(self): + async def test_when_false_and_error_message_dict_defaults(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.locale = hikari.Locale.DA mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) @@ -368,7 +367,7 @@ async def test_when_false_and_error_message_dict_defaults(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_dict_explicit_default(self): + async def test_when_false_and_error_message_dict_explicit_default(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.locale = hikari.Locale.DA mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) @@ -389,7 +388,7 @@ async def test_when_false_and_error_message_dict_explicit_default(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_localiser(self): + async def test_when_false_and_error_message_localiser(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="meow meow") mock_context.type = hikari.CommandType.USER mock_context.interaction.locale = hikari.Locale.EN_GB @@ -414,7 +413,7 @@ async def test_when_false_and_error_message_localiser(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_localiser_overridden_id(self): + async def test_when_false_and_error_message_localiser_overridden_id(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="meow meow") mock_context.type = hikari.CommandType.USER mock_context.interaction.locale = hikari.Locale.EN_GB @@ -444,7 +443,7 @@ async def test_when_false_and_error_message_localiser_overridden_id(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_error_message_localiser_defaults(self): + async def test_when_false_and_error_message_localiser_defaults(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="meow meow") mock_context.type = hikari.CommandType.USER mock_context.interaction.locale = hikari.Locale.FR @@ -473,7 +472,7 @@ async def test_when_false_and_error_message_localiser_defaults(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_false_and_halt_execution(self): + async def test_when_false_and_halt_execution(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.NsfwCheck(error_message="yeet", halt_execution=True) @@ -489,7 +488,7 @@ async def test_when_false_and_halt_execution(self): @pytest.mark.asyncio class TestSfwCheck: - async def test_when_is_dm(self): + async def test_when_is_dm(self) -> None: mock_context = mock.Mock(guild_id=None) mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.SfwCheck(error=ValueError, error_message="lll", halt_execution=True) @@ -500,7 +499,7 @@ async def test_when_is_dm(self): assert result is True get_perm_channel.assert_not_called() - async def test(self): + async def test(self) -> None: mock_context = mock.Mock() mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.SfwCheck(error_message=None) @@ -511,7 +510,7 @@ async def test(self): assert result is True get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw(self): + async def test_when_is_nsfw(self) -> None: mock_context = mock.Mock(client=tanjun.Client(mock.AsyncMock(), cache=mock.Mock())) check = tanjun.checks.SfwCheck(error_message=None) @@ -521,9 +520,9 @@ async def test_when_is_nsfw(self): assert result is False get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error(self): + async def test_when_is_nsfw_and_error(self) -> None: class MockException(Exception): - def __init__(self): ... + def __init__(self) -> None: ... mock_context = mock.Mock(client=tanjun.Client(mock.AsyncMock(), cache=mock.Mock())) check = tanjun.checks.SfwCheck(error=MockException, error_message="bye") @@ -536,7 +535,7 @@ def __init__(self): ... get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message(self): + async def test_when_is_nsfw_and_error_message(self) -> None: mock_context = mock.Mock() mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.SfwCheck(error_message="meow me") @@ -549,7 +548,7 @@ async def test_when_is_nsfw_and_error_message(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_dict(self): + async def test_when_is_nsfw_and_error_message_dict(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.locale = hikari.Locale.DA mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) @@ -565,7 +564,7 @@ async def test_when_is_nsfw_and_error_message_dict(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_dict_but_not_app_command(self): + async def test_when_is_nsfw_and_error_message_dict_but_not_app_command(self) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.SfwCheck( @@ -585,7 +584,7 @@ async def test_when_is_nsfw_and_error_message_dict_but_not_app_command(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_dict_defaults(self): + async def test_when_is_nsfw_and_error_message_dict_defaults(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.locale = hikari.Locale.FR mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) @@ -601,7 +600,7 @@ async def test_when_is_nsfw_and_error_message_dict_defaults(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_dict_explicit_default(self): + async def test_when_is_nsfw_and_error_message_dict_explicit_default(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.locale = hikari.Locale.FR mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) @@ -622,7 +621,7 @@ async def test_when_is_nsfw_and_error_message_dict_explicit_default(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_localiser(self): + async def test_when_is_nsfw_and_error_message_localiser(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="oh no girl") mock_context.type = hikari.CommandType.USER mock_context.interaction.locale = hikari.Locale.DA @@ -642,7 +641,7 @@ async def test_when_is_nsfw_and_error_message_localiser(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_localiser_overridden_id(self): + async def test_when_is_nsfw_and_error_message_localiser_overridden_id(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="oh no girl") mock_context.type = hikari.CommandType.USER mock_context.interaction.locale = hikari.Locale.EN_GB @@ -681,7 +680,7 @@ async def test_when_is_nsfw_and_error_message_localiser_overridden_id(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_error_message_localiser_defaults(self): + async def test_when_is_nsfw_and_error_message_localiser_defaults(self) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="oh no girl") mock_context.type = hikari.CommandType.USER mock_context.interaction.locale = hikari.Locale.DE @@ -720,7 +719,7 @@ async def test_when_is_nsfw_and_error_message_localiser_defaults(self): get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) - async def test_when_is_nsfw_and_halt_execution(self): + async def test_when_is_nsfw_and_halt_execution(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.client = tanjun.Client(mock.AsyncMock(), cache=mock.Mock()) check = tanjun.checks.SfwCheck(error_message="yeet", halt_execution=True) @@ -735,16 +734,16 @@ async def test_when_is_nsfw_and_halt_execution(self): class TestDmCheck: - def test_for_dm(self): + def test_for_dm(self) -> None: check = tanjun.checks.DmCheck(error=ValueError, error_message="meow", halt_execution=True) assert check(mock.Mock(guild_id=None)) is True - def test_for_guild(self): + def test_for_guild(self) -> None: assert tanjun.checks.DmCheck(error_message=None)(mock.Mock(guild_id=3123)) is False - def test_for_guild_when_error(self): + def test_for_guild_when_error(self) -> None: class MockException(Exception): - def __init__(self): ... + def __init__(self) -> None: ... check = tanjun.checks.DmCheck(error=MockException, error_message="meow") mock_context = mock.Mock(guild_id=3123) @@ -752,21 +751,21 @@ def __init__(self): ... with pytest.raises(MockException): assert check(mock_context) - def test_for_guild_when_halt_execution(self): + def test_for_guild_when_halt_execution(self) -> None: check = tanjun.checks.DmCheck(error_message="beep", halt_execution=True) mock_context = mock.Mock(guild_id=3123) with pytest.raises(tanjun.HaltExecution): assert check(mock_context) - def test_for_guild_when_error_message(self): + def test_for_guild_when_error_message(self) -> None: check = tanjun.checks.DmCheck(error_message="message") mock_context = mock.Mock(guild_id=3123) with pytest.raises(tanjun.CommandError, match="message"): assert check(mock_context) - def test_for_guild_when_error_message_dict(self): + def test_for_guild_when_error_message_dict(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.ES_ES: "weeb girl", @@ -780,7 +779,7 @@ def test_for_guild_when_error_message_dict(self): with pytest.raises(tanjun.CommandError, match="tax girl"): assert check(mock_context) - def test_for_guild_when_error_message_dict_but_not_app_command(self): + def test_for_guild_when_error_message_dict_but_not_app_command(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.ES_ES: "weeb girl", @@ -794,7 +793,7 @@ def test_for_guild_when_error_message_dict_but_not_app_command(self): with pytest.raises(tanjun.CommandError, match="weeby girl"): assert check(mock_context) - def test_for_guild_when_error_message_dict_defaults(self): + def test_for_guild_when_error_message_dict_defaults(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.EN_GB: "tea girl", @@ -808,7 +807,7 @@ def test_for_guild_when_error_message_dict_defaults(self): with pytest.raises(tanjun.CommandError, match="tea girl"): assert check(mock_context) - def test_for_guild_when_error_message_dict_explicit_default(self): + def test_for_guild_when_error_message_dict_explicit_default(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.EN_GB: "tea girl", @@ -823,7 +822,7 @@ def test_for_guild_when_error_message_dict_explicit_default(self): with pytest.raises(tanjun.CommandError, match="man girl"): assert check(mock_context) - def test_for_guild_when_error_message_localiser(self): + def test_for_guild_when_error_message_localiser(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.EN_GB: "tea girl", @@ -842,7 +841,7 @@ def test_for_guild_when_error_message_localiser(self): with pytest.raises(tanjun.CommandError, match="me girl"): assert check(mock_context, localiser=localiser) - def test_for_guild_when_error_message_localiser_overridden_id(self): + def test_for_guild_when_error_message_localiser_overridden_id(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.EN_GB: "tea girl", @@ -869,7 +868,7 @@ def test_for_guild_when_error_message_localiser_overridden_id(self): with pytest.raises(tanjun.CommandError, match="my girl"): assert check(mock_context, localiser=localiser) - def test_for_guild_when_error_message_localiser_defaults(self): + def test_for_guild_when_error_message_localiser_defaults(self) -> None: check = tanjun.checks.DmCheck( error_message={ hikari.Locale.ES_ES: "weeb girl", @@ -890,38 +889,38 @@ def test_for_guild_when_error_message_localiser_defaults(self): class TestGuildCheck: - def test_for_guild(self): + def test_for_guild(self) -> None: check = tanjun.checks.GuildCheck(error=IndentationError, error_message="meow", halt_execution=True) assert check(mock.Mock(guild_id=123123)) is True - def test_for_dm(self): + def test_for_dm(self) -> None: assert tanjun.checks.GuildCheck(error_message=None)(mock.Mock(guild_id=None)) is False - def test_for_dm_when_error(self): + def test_for_dm_when_error(self) -> None: class MockException(Exception): - def __init__(self): ... + def __init__(self) -> None: ... check = tanjun.checks.GuildCheck(error=MockException, error_message="meep") with pytest.raises(MockException): assert check(mock.Mock(guild_id=None)) - def test_for_dm_when_halt_execution(self): + def test_for_dm_when_halt_execution(self) -> None: check = tanjun.checks.GuildCheck(error_message="beep", halt_execution=True) mock_context = mock.Mock(guild_id=None) with pytest.raises(tanjun.HaltExecution): check(mock_context) - def test_for_dm_when_error_message(self): + def test_for_dm_when_error_message(self) -> None: check = tanjun.checks.GuildCheck(error_message="hi") mock_context = mock.Mock(guild_id=None) with pytest.raises(tanjun.CommandError, match="hi"): check(mock_context) - def test_for_dm_when_error_message_dict(self): + def test_for_dm_when_error_message_dict(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.EN_GB: "hi", @@ -935,7 +934,7 @@ def test_for_dm_when_error_message_dict(self): with pytest.raises(tanjun.CommandError, match="Konnichiwa"): check(mock_context) - def test_for_dm_when_error_message_dict_but_not_app_command(self): + def test_for_dm_when_error_message_dict_but_not_app_command(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.EN_US: "*shoots*", @@ -949,7 +948,7 @@ def test_for_dm_when_error_message_dict_but_not_app_command(self): with pytest.raises(tanjun.CommandError, match=r"\*heals\*"): check(mock_context) - def test_for_dm_when_error_message_dict_defaults(self): + def test_for_dm_when_error_message_dict_defaults(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.SV_SE: "Blåhaj my beloved", @@ -964,7 +963,7 @@ def test_for_dm_when_error_message_dict_defaults(self): with pytest.raises(tanjun.CommandError, match="Blåhaj my beloved"): check(mock_context) - def test_for_dm_when_error_message_dict_explicit_default(self): + def test_for_dm_when_error_message_dict_explicit_default(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.SV_SE: "Blåhaj my beloved", @@ -980,7 +979,7 @@ def test_for_dm_when_error_message_dict_explicit_default(self): with pytest.raises(tanjun.CommandError, match="nyaa"): check(mock_context) - def test_for_dm_when_error_message_localiser(self): + def test_for_dm_when_error_message_localiser(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.SV_SE: "Blåhaj my beloved", @@ -1000,7 +999,7 @@ def test_for_dm_when_error_message_localiser(self): with pytest.raises(tanjun.CommandError, match="Please uwu me"): check(mock_context, localiser=localiser) - def test_for_dm_when_error_message_localiser_overridden_id(self): + def test_for_dm_when_error_message_localiser_overridden_id(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.SV_SE: "Blåhaj my beloved", @@ -1025,7 +1024,7 @@ def test_for_dm_when_error_message_localiser_overridden_id(self): with pytest.raises(tanjun.CommandError, match="Blåhaj fan 69"): check(mock_context, localiser=localiser) - def test_for_dm_when_error_message_localiser_defaults(self): + def test_for_dm_when_error_message_localiser_defaults(self) -> None: check = tanjun.checks.GuildCheck( error_message={ hikari.Locale.SV_SE: "Blåhaj my beloved", @@ -1172,7 +1171,7 @@ def _perm_combos(perms: hikari.Permissions) -> collections.Iterator[hikari.Permi @pytest.mark.asyncio class TestAuthorPermissionCheck: @pytest.mark.parametrize(*PERMISSIONS) - async def test(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions) -> None: mock_context = mock.Mock() check = tanjun.checks.AuthorPermissionCheck(required_perms, error=mock.Mock(), halt_execution=True) @@ -1187,7 +1186,7 @@ async def test(self, required_perms: hikari.Permissions, actual_perms: hikari.Pe @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock() check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message=None) @@ -1202,7 +1201,7 @@ async def test_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -1224,7 +1223,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock() check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message="yeet feet") @@ -1241,7 +1240,7 @@ async def test_when_missing_perms_and_error_message( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_error_message_dict( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock() check = tanjun.checks.AuthorPermissionCheck( required_perms, error_message={hikari.Locale.BG: "yeet", "default": "moop"} @@ -1260,7 +1259,7 @@ async def test_when_missing_perms_and_error_message_dict( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock() check = tanjun.checks.AuthorPermissionCheck(required_perms, halt_execution=True) @@ -1275,7 +1274,9 @@ async def test_when_missing_perms_and_halt_execution( ) @pytest.mark.parametrize(*PERMISSIONS) - async def test_for_interaction_member(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_for_interaction_member( + self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions + ) -> None: mock_context = mock.Mock(member=mock.Mock(hikari.InteractionMember, permissions=actual_perms)) check = tanjun.checks.AuthorPermissionCheck(required_perms, error=mock.Mock(), halt_execution=True) @@ -1286,7 +1287,7 @@ async def test_for_interaction_member(self, required_perms: hikari.Permissions, @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(member=mock.Mock(hikari.InteractionMember, permissions=actual_perms)) check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message=None) @@ -1297,7 +1298,7 @@ async def test_for_interaction_member_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -1312,7 +1313,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(member=mock.Mock(hikari.InteractionMember, permissions=actual_perms)) check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message="yeet feet") @@ -1322,7 +1323,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message_dict( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock( tanjun.abc.AppCommandContext, member=mock.Mock(hikari.InteractionMember, permissions=actual_perms) ) @@ -1338,7 +1339,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message_dict( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message_dict_defaults( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock( tanjun.abc.AppCommandContext, member=mock.Mock(hikari.InteractionMember, permissions=actual_perms) ) @@ -1354,7 +1355,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message_dict_ @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message_dict_explicit_default( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock( tanjun.abc.AppCommandContext, member=mock.Mock(hikari.InteractionMember, permissions=actual_perms) ) @@ -1375,7 +1376,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message_dict_ @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message_localiser( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock( tanjun.abc.AppCommandContext, member=mock.Mock(hikari.InteractionMember, permissions=actual_perms), @@ -1398,7 +1399,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message_local @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message_localiser_overridden_id( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock( tanjun.abc.AppCommandContext, member=mock.Mock(hikari.InteractionMember, permissions=actual_perms), @@ -1430,7 +1431,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message_local @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_error_message_localiser_defaults( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock( tanjun.abc.AppCommandContext, member=mock.Mock(hikari.InteractionMember, permissions=actual_perms), @@ -1463,7 +1464,7 @@ async def test_for_interaction_member_when_missing_perms_and_error_message_local @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_member_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(member=mock.Mock(hikari.InteractionMember, permissions=actual_perms)) check = tanjun.checks.AuthorPermissionCheck(required_perms, halt_execution=True) @@ -1471,7 +1472,7 @@ async def test_for_interaction_member_when_missing_perms_and_halt_execution( await check(mock_context) @pytest.mark.parametrize(*PERMISSIONS) - async def test_for_guild_user(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_for_guild_user(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions) -> None: mock_context = mock.Mock(member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, error=mock.Mock(), halt_execution=True) @@ -1488,7 +1489,7 @@ async def test_for_guild_user(self, required_perms: hikari.Permissions, actual_p @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_guild_user_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message=None) @@ -1505,7 +1506,7 @@ async def test_for_guild_user_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_guild_user_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -1528,7 +1529,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_guild_user_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message="beat yo meow") @@ -1547,7 +1548,7 @@ async def test_for_guild_user_when_missing_perms_and_error_message( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_guild_user_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, halt_execution=True) @@ -1564,7 +1565,7 @@ async def test_for_guild_user_when_missing_perms_and_halt_execution( ) @pytest.mark.parametrize(*DM_PERMISSIONS) - async def test_for_dm(self, required_perms: hikari.Permissions): + async def test_for_dm(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(guild_id=None, member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, error=mock.Mock(), halt_execution=True) @@ -1573,7 +1574,7 @@ async def test_for_dm(self, required_perms: hikari.Permissions): assert result is True @pytest.mark.parametrize(*INVALID_DM_PERMISSIONS) - async def test_for_dm_when_missing_perms(self, required_perms: hikari.Permissions): + async def test_for_dm_when_missing_perms(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(guild_id=None, member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message=None) @@ -1584,7 +1585,7 @@ async def test_for_dm_when_missing_perms(self, required_perms: hikari.Permission @pytest.mark.parametrize(*MISSING_DM_PERMISSIONS) async def test_for_dm_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -1597,7 +1598,7 @@ class StubError(Exception): ... mock_error_callback.assert_called_once_with(missing_perms) @pytest.mark.parametrize(*INVALID_DM_PERMISSIONS) - async def test_for_dm_when_missing_perms_and_error_message(self, required_perms: hikari.Permissions): + async def test_for_dm_when_missing_perms_and_error_message(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(guild_id=None, member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, error_message="aye lmao") @@ -1605,7 +1606,7 @@ async def test_for_dm_when_missing_perms_and_error_message(self, required_perms: await check(mock_context) @pytest.mark.parametrize(*INVALID_DM_PERMISSIONS) - async def test_for_dm_when_missing_perms_and_halt_execution(self, required_perms: hikari.Permissions): + async def test_for_dm_when_missing_perms_and_halt_execution(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(guild_id=None, member=None) check = tanjun.checks.AuthorPermissionCheck(required_perms, halt_execution=True) @@ -1616,7 +1617,7 @@ async def test_for_dm_when_missing_perms_and_halt_execution(self, required_perms @pytest.mark.asyncio class TestOwnPermissionCheck: @pytest.mark.parametrize(*PERMISSIONS) - async def test(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1637,7 +1638,7 @@ async def test(self, required_perms: hikari.Permissions, actual_perms: hikari.Pe mock_context.rest.fetch_member.assert_awaited_once_with(mock_context.guild_id, mock_own_user.id) @pytest.mark.parametrize(*PERMISSIONS) - async def test_when_no_cache(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_when_no_cache(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache = None mock_context.rest = mock.AsyncMock() @@ -1657,7 +1658,9 @@ async def test_when_no_cache(self, required_perms: hikari.Permissions, actual_pe mock_context.rest.fetch_member.assert_awaited_once_with(mock_context.guild_id, mock_own_user.id) @pytest.mark.parametrize(*PERMISSIONS) - async def test_when_no_async_cache(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_when_no_async_cache( + self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1675,7 +1678,7 @@ async def test_when_no_async_cache(self, required_perms: hikari.Permissions, act mock_context.rest.fetch_member.assert_awaited_once_with(mock_context.guild_id, mock_own_user.id) @pytest.mark.parametrize(*PERMISSIONS) - async def test_when_no_caches(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_when_no_caches(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache = None mock_context.rest = mock.AsyncMock() @@ -1694,7 +1697,7 @@ async def test_when_no_caches(self, required_perms: hikari.Permissions, actual_p @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1717,7 +1720,7 @@ async def test_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -1746,7 +1749,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1771,7 +1774,7 @@ async def test_when_missing_perms_and_error_message( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_error_message_dict( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1798,7 +1801,7 @@ async def test_when_missing_perms_and_error_message_dict( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1821,7 +1824,9 @@ async def test_when_missing_perms_and_halt_execution( mock_context.rest.fetch_member.assert_awaited_once_with(mock_context.guild_id, mock_own_user.id) @pytest.mark.parametrize(*PERMISSIONS) - async def test_for_cached_member(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_for_cached_member( + self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -1843,7 +1848,7 @@ async def test_for_cached_member(self, required_perms: hikari.Permissions, actua @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_cached_member_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -1865,7 +1870,7 @@ async def test_for_cached_member_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_cached_member_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -1893,7 +1898,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_cached_member_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -1917,7 +1922,7 @@ async def test_for_cached_member_when_missing_perms_and_error_message( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_cached_member_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -1939,7 +1944,9 @@ async def test_for_cached_member_when_missing_perms_and_halt_execution( mock_context.rest.fetch_member.assert_not_called() @pytest.mark.parametrize(*PERMISSIONS) - async def test_for_async_cached_member(self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions): + async def test_for_async_cached_member( + self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1961,7 +1968,7 @@ async def test_for_async_cached_member(self, required_perms: hikari.Permissions, @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_async_cached_member_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -1983,7 +1990,7 @@ async def test_for_async_cached_member_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_async_cached_member_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -2011,7 +2018,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_async_cached_member_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -2035,7 +2042,7 @@ async def test_for_async_cached_member_when_missing_perms_and_error_message( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_async_cached_member_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.Context) mock_context.cache.get_member.return_value = None mock_context.rest = mock.AsyncMock() @@ -2059,7 +2066,7 @@ async def test_for_async_cached_member_when_missing_perms_and_halt_execution( @pytest.mark.parametrize(*PERMISSIONS) async def test_for_interaction_context_with_app_permissions( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.rest = mock.AsyncMock() @@ -2079,7 +2086,7 @@ async def test_for_interaction_context_with_app_permissions( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.rest = mock.AsyncMock() @@ -2099,7 +2106,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms( @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -2122,7 +2129,7 @@ class StubError(Exception): ... @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.rest = mock.AsyncMock() @@ -2144,7 +2151,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message_dict( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.interaction.locale = hikari.Locale.EN_GB @@ -2170,7 +2177,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message_dict_defaults( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.interaction.locale = hikari.Locale.FR @@ -2196,7 +2203,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message_dict_explicit_default( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.interaction.locale = hikari.Locale.FR @@ -2227,7 +2234,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message_localiser( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="meow command") mock_context.interaction.app_permissions = actual_perms mock_context.interaction.locale = hikari.Locale.EN_US @@ -2258,7 +2265,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message_localiser_overridden_id( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="meow command") mock_context.interaction.app_permissions = actual_perms mock_context.interaction.locale = hikari.Locale.EN_US @@ -2298,7 +2305,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_error_message_localiser_defaults( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext, triggering_name="meow command") mock_context.interaction.app_permissions = actual_perms mock_context.interaction.locale = hikari.Locale.FR @@ -2334,7 +2341,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a @pytest.mark.parametrize(*MISSING_PERMISSIONS) async def test_for_interaction_context_with_app_permissions_when_missing_perms_and_halt_execution( self, required_perms: hikari.Permissions, actual_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: mock_context = mock.Mock(tanjun.abc.AppCommandContext) mock_context.interaction.app_permissions = actual_perms mock_context.rest = mock.AsyncMock() @@ -2354,7 +2361,7 @@ async def test_for_interaction_context_with_app_permissions_when_missing_perms_a mock_context.rest.fetch_member.assert_not_called() @pytest.mark.parametrize(*DM_PERMISSIONS) - async def test_for_dm(self, required_perms: hikari.Permissions): + async def test_for_dm(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context, guild_id=None) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -2371,7 +2378,7 @@ async def test_for_dm(self, required_perms: hikari.Permissions): mock_context.rest.fetch_member.assert_not_called() @pytest.mark.parametrize(*INVALID_DM_PERMISSIONS) - async def test_for_dm_when_missing_perms(self, required_perms: hikari.Permissions): + async def test_for_dm_when_missing_perms(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context, guild_id=None) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -2390,7 +2397,7 @@ async def test_for_dm_when_missing_perms(self, required_perms: hikari.Permission @pytest.mark.parametrize(*MISSING_DM_PERMISSIONS) async def test_for_dm_when_missing_perms_and_error_callback( self, required_perms: hikari.Permissions, missing_perms: hikari.Permissions - ): + ) -> None: class StubError(Exception): ... mock_error_callback = mock.Mock(side_effect=StubError) @@ -2410,7 +2417,7 @@ class StubError(Exception): ... mock_context.rest.fetch_member.assert_not_called() @pytest.mark.parametrize(*INVALID_DM_PERMISSIONS) - async def test_for_dm_when_missing_perms_and_error_message(self, required_perms: hikari.Permissions): + async def test_for_dm_when_missing_perms_and_error_message(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context, guild_id=None) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -2429,7 +2436,7 @@ async def test_for_dm_when_missing_perms_and_error_message(self, required_perms: mock_context.rest.fetch_member.assert_not_called() @pytest.mark.parametrize(*INVALID_DM_PERMISSIONS) - async def test_for_dm_when_missing_perms_and_halt_execution(self, required_perms: hikari.Permissions): + async def test_for_dm_when_missing_perms_and_halt_execution(self, required_perms: hikari.Permissions) -> None: mock_context = mock.Mock(tanjun.abc.Context, guild_id=None) mock_context.rest = mock.AsyncMock() mock_own_user = mock.Mock() @@ -2448,7 +2455,7 @@ async def test_for_dm_when_missing_perms_and_halt_execution(self, required_perms mock_context.rest.fetch_member.assert_not_called() -def test_with_dm_check(command: mock.Mock): +def test_with_dm_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "DmCheck") as dm_check: @@ -2461,7 +2468,7 @@ def test_with_dm_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_dm_check_with_keyword_arguments(command: mock.Mock): +def test_with_dm_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() @@ -2476,7 +2483,7 @@ def test_with_dm_check_with_keyword_arguments(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_dm_check_when_follow_wrapping(command: mock.Mock): +def test_with_dm_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -2491,7 +2498,7 @@ def test_with_dm_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_dm_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_dm_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "DmCheck") as dm_check: assert tanjun.checks.with_dm_check(follow_wrapped=True)(command) is command @@ -2502,7 +2509,7 @@ def test_with_dm_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) ) -def test_with_dm_check_when_follow_wrapping_and_unsupported_command(): +def test_with_dm_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.MessageCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2517,7 +2524,7 @@ def test_with_dm_check_when_follow_wrapping_and_unsupported_command(): ) -def test_with_dm_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_dm_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) with pytest.raises(AttributeError): command.wrapped_command.wrapped_command @@ -2532,7 +2539,7 @@ def test_with_dm_check_when_follow_wrapping_and_wrapping_unsupported_command(com ) -def test_with_guild_check(command: mock.Mock): +def test_with_guild_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "GuildCheck") as guild_check: @@ -2545,7 +2552,7 @@ def test_with_guild_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_guild_check_with_keyword_arguments(command: mock.Mock): +def test_with_guild_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() @@ -2560,7 +2567,7 @@ def test_with_guild_check_with_keyword_arguments(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_guild_check_when_follow_wrapping(command: mock.Mock): +def test_with_guild_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -2575,7 +2582,7 @@ def test_with_guild_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_guild_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_guild_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "GuildCheck") as guild_check: assert tanjun.checks.with_guild_check(follow_wrapped=True)(command) is command @@ -2586,7 +2593,7 @@ def test_with_guild_check_when_follow_wrapping_and_not_wrapping(command: mock.Mo ) -def test_with_guild_check_when_follow_wrapping_and_unsupported_command(): +def test_with_guild_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2601,7 +2608,7 @@ def test_with_guild_check_when_follow_wrapping_and_unsupported_command(): ) -def test_with_guild_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_guild_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) with pytest.raises(AttributeError): command.wrapped_command.wrapped_command @@ -2616,7 +2623,7 @@ def test_with_guild_check_when_follow_wrapping_and_wrapping_unsupported_command( ) -def test_with_nsfw_check(command: mock.Mock): +def test_with_nsfw_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "NsfwCheck", return_value=mock.AsyncMock()) as nsfw_check: @@ -2629,7 +2636,7 @@ def test_with_nsfw_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_nsfw_check_with_keyword_arguments(command: mock.Mock): +def test_with_nsfw_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() @@ -2644,7 +2651,7 @@ def test_with_nsfw_check_with_keyword_arguments(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_nsfw_check_when_follow_wrapping(command: mock.Mock): +def test_with_nsfw_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -2659,7 +2666,7 @@ def test_with_nsfw_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_nsfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_nsfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "NsfwCheck") as nsfw_check: assert tanjun.checks.with_nsfw_check(follow_wrapped=True)(command) is command @@ -2670,7 +2677,7 @@ def test_with_nsfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Moc ) -def test_with_nsfw_check_when_follow_wrapping_and_unsupported_command(): +def test_with_nsfw_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2685,7 +2692,7 @@ def test_with_nsfw_check_when_follow_wrapping_and_unsupported_command(): ) -def test_with_nsfw_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_nsfw_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) with pytest.raises(AttributeError): command.wrapped_command.wrapped_command @@ -2700,7 +2707,7 @@ def test_with_nsfw_check_when_follow_wrapping_and_wrapping_unsupported_command(c ) -def test_with_sfw_check(command: mock.Mock): +def test_with_sfw_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "SfwCheck", return_value=mock.AsyncMock()) as sfw_check: @@ -2713,7 +2720,7 @@ def test_with_sfw_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_sfw_check_with_keyword_arguments(command: mock.Mock): +def test_with_sfw_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() @@ -2728,7 +2735,7 @@ def test_with_sfw_check_with_keyword_arguments(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_sfw_check_when_follow_wrapping(command: mock.Mock): +def test_with_sfw_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -2743,7 +2750,7 @@ def test_with_sfw_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_sfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_sfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "SfwCheck") as sfw_check: assert tanjun.checks.with_sfw_check(follow_wrapped=True)(command) is command @@ -2754,7 +2761,7 @@ def test_with_sfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock ) -def test_with_sfw_check_when_follow_wrapping_and_unsupported_command(): +def test_with_sfw_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2769,7 +2776,7 @@ def test_with_sfw_check_when_follow_wrapping_and_unsupported_command(): ) -def test_with_sfw_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_sfw_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2785,7 +2792,7 @@ def test_with_sfw_check_when_follow_wrapping_and_wrapping_unsupported_command(co ) -def test_with_owner_check(command: mock.Mock): +def test_with_owner_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "OwnerCheck") as owner_check: @@ -2798,7 +2805,7 @@ def test_with_owner_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_owner_check_with_keyword_arguments(command: mock.Mock): +def test_with_owner_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() mock_check = object() @@ -2813,7 +2820,7 @@ def test_with_owner_check_with_keyword_arguments(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_owner_check_when_follow_wrapping(command: mock.Mock): +def test_with_owner_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -2828,7 +2835,7 @@ def test_with_owner_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_owner_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_owner_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "OwnerCheck") as owner_check: assert tanjun.checks.with_owner_check(follow_wrapped=True)(command) is command @@ -2839,7 +2846,7 @@ def test_with_owner_check_when_follow_wrapping_and_not_wrapping(command: mock.Mo ) -def test_with_owner_check_when_follow_wrapping_and_unsupported_command(): +def test_with_owner_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2854,7 +2861,7 @@ def test_with_owner_check_when_follow_wrapping_and_unsupported_command(): ) -def test_with_owner_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_owner_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) with pytest.raises(AttributeError): command.wrapped_command.wrapped_command @@ -2869,7 +2876,7 @@ def test_with_owner_check_when_follow_wrapping_and_wrapping_unsupported_command( ) -def test_with_author_permission_check(command: mock.Mock): +def test_with_author_permission_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "AuthorPermissionCheck") as author_permission_check: @@ -2886,7 +2893,7 @@ def test_with_author_permission_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_author_permission_check_with_keyword_arguments(command: mock.Mock): +def test_with_author_permission_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() @@ -2903,7 +2910,7 @@ def test_with_author_permission_check_with_keyword_arguments(command: mock.Mock) command.wrapped_command.add_check.assert_not_called() -def test_with_author_permission_check_when_follow_wrapping(command: mock.Mock): +def test_with_author_permission_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -2921,7 +2928,7 @@ def test_with_author_permission_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_author_permission_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_author_permission_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "AuthorPermissionCheck") as author_permission_check: assert tanjun.checks.with_author_permission_check(435213, follow_wrapped=True)(command) is command @@ -2935,7 +2942,7 @@ def test_with_author_permission_check_when_follow_wrapping_and_not_wrapping(comm ) -def test_with_author_permission_check_when_follow_wrapping_and_unsupported_command(): +def test_with_author_permission_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -2953,7 +2960,7 @@ def test_with_author_permission_check_when_follow_wrapping_and_unsupported_comma ) -def test_with_author_permission_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_author_permission_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) with pytest.raises(AttributeError): command.wrapped_command.wrapped_command @@ -2971,7 +2978,7 @@ def test_with_author_permission_check_when_follow_wrapping_and_wrapping_unsuppor ) -def test_with_own_permission_check(command: mock.Mock): +def test_with_own_permission_check(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) with mock.patch.object(tanjun.checks, "OwnPermissionCheck") as own_permission_check: @@ -2988,7 +2995,7 @@ def test_with_own_permission_check(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_own_permission_check_with_keyword_arguments(command: mock.Mock): +def test_with_own_permission_check_with_keyword_arguments(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.SlashCommand) mock_error_callback = mock.Mock() @@ -3005,7 +3012,7 @@ def test_with_own_permission_check_with_keyword_arguments(command: mock.Mock): command.wrapped_command.add_check.assert_not_called() -def test_with_own_permission_check_when_follow_wrapping(command: mock.Mock): +def test_with_own_permission_check_when_follow_wrapping(command: mock.Mock) -> None: command.wrapped_command = mock.Mock( tanjun.MessageCommand, wrapped_command=mock.Mock(tanjun.SlashCommand, wrapped_command=None) ) @@ -3023,7 +3030,7 @@ def test_with_own_permission_check_when_follow_wrapping(command: mock.Mock): ) -def test_with_own_permission_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock): +def test_with_own_permission_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) -> None: command.wrapped_command = None with mock.patch.object(tanjun.checks, "OwnPermissionCheck") as own_permission_check: assert tanjun.checks.with_own_permission_check(5412312, follow_wrapped=True)(command) is command @@ -3037,7 +3044,7 @@ def test_with_own_permission_check_when_follow_wrapping_and_not_wrapping(command ) -def test_with_own_permission_check_when_follow_wrapping_and_unsupported_command(): +def test_with_own_permission_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command with pytest.raises(AttributeError): @@ -3055,7 +3062,7 @@ def test_with_own_permission_check_when_follow_wrapping_and_unsupported_command( ) -def test_with_own_permission_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock): +def test_with_own_permission_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) with pytest.raises(AttributeError): command.wrapped_command.wrapped_command @@ -3073,7 +3080,7 @@ def test_with_own_permission_check_when_follow_wrapping_and_wrapping_unsupported ) -def test_with_check(command: mock.Mock): +def test_with_check(command: mock.Mock) -> None: mock_check = mock.Mock() result = tanjun.checks.with_check(mock_check)(command) @@ -3083,7 +3090,7 @@ def test_with_check(command: mock.Mock): @pytest.mark.asyncio -async def test_all_checks(): +async def test_all_checks() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3104,7 +3111,7 @@ async def test_all_checks(): @pytest.mark.asyncio -async def test_all_checks_when_check_raises(): +async def test_all_checks_when_check_raises() -> None: class MockError(Exception): ... mock_check_1 = mock.Mock() @@ -3123,7 +3130,7 @@ class MockError(Exception): ... @pytest.mark.asyncio -async def test_all_checks_when_first_fails(): +async def test_all_checks_when_first_fails() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3138,7 +3145,7 @@ async def test_all_checks_when_first_fails(): @pytest.mark.asyncio -async def test_all_checks_when_last_fails(): +async def test_all_checks_when_last_fails() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3159,7 +3166,7 @@ async def test_all_checks_when_last_fails(): @pytest.mark.asyncio -async def test_all_checks_when_any_check_fails(): +async def test_all_checks_when_any_check_fails() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3176,7 +3183,7 @@ async def test_all_checks_when_any_check_fails(): ) -def test_with_all_checks(): +def test_with_all_checks() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3191,7 +3198,7 @@ def test_with_all_checks(): @pytest.mark.asyncio -async def test_any_checks_when_first_check_passes(): +async def test_any_checks_when_first_check_passes() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3208,7 +3215,7 @@ async def test_any_checks_when_first_check_passes(): @pytest.mark.asyncio -async def test_any_checks_when_last_check_passes(): +async def test_any_checks_when_last_check_passes() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3231,7 +3238,7 @@ async def test_any_checks_when_last_check_passes(): @pytest.mark.asyncio -async def test_any_checks_when_check_passes(): +async def test_any_checks_when_check_passes() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3264,7 +3271,7 @@ async def test_any_checks_when_check_passes(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail(): +async def test_any_checks_when_all_fail() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3285,9 +3292,9 @@ async def test_any_checks_when_all_fail(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error(): +async def test_any_checks_when_all_fail_and_error() -> None: class MockException(Exception): - def __init__(self): ... + def __init__(self) -> None: ... mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() @@ -3309,7 +3316,7 @@ def __init__(self): ... @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_halt_execution(): +async def test_any_checks_when_all_fail_and_halt_execution() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3330,7 +3337,7 @@ async def test_any_checks_when_all_fail_and_halt_execution(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message(): +async def test_any_checks_when_all_fail_and_error_message() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3351,7 +3358,7 @@ async def test_any_checks_when_all_fail_and_error_message(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_dict(): +async def test_any_checks_when_all_fail_and_error_message_dict() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3378,7 +3385,7 @@ async def test_any_checks_when_all_fail_and_error_message_dict(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_dict_but_not_app_command(): +async def test_any_checks_when_all_fail_and_error_message_dict_but_not_app_command() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3410,7 +3417,7 @@ async def test_any_checks_when_all_fail_and_error_message_dict_but_not_app_comma @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_dict_defaults(): +async def test_any_checks_when_all_fail_and_error_message_dict_defaults() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3437,7 +3444,7 @@ async def test_any_checks_when_all_fail_and_error_message_dict_defaults(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_dict_explicit_default(): +async def test_any_checks_when_all_fail_and_error_message_dict_explicit_default() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3469,7 +3476,7 @@ async def test_any_checks_when_all_fail_and_error_message_dict_explicit_default( @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_localiser(): +async def test_any_checks_when_all_fail_and_error_message_localiser() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3500,7 +3507,7 @@ async def test_any_checks_when_all_fail_and_error_message_localiser(): @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_localiser_overridden_id(): +async def test_any_checks_when_all_fail_and_error_message_localiser_overridden_id() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3540,7 +3547,7 @@ async def test_any_checks_when_all_fail_and_error_message_localiser_overridden_i @pytest.mark.asyncio -async def test_any_checks_when_all_fail_and_error_message_localiser_defaults(): +async def test_any_checks_when_all_fail_and_error_message_localiser_defaults() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3576,7 +3583,7 @@ async def test_any_checks_when_all_fail_and_error_message_localiser_defaults(): @pytest.mark.asyncio -async def test_any_checks_when_generic_unsuppressed_error_raised(): +async def test_any_checks_when_generic_unsuppressed_error_raised() -> None: class MockError(Exception): ... mock_check_1 = mock.Mock() @@ -3595,7 +3602,7 @@ class MockError(Exception): ... @pytest.mark.asyncio -async def test_any_checks_when_generic_error_suppressed(): +async def test_any_checks_when_generic_error_suppressed() -> None: class MockError(Exception): ... mock_check_1 = mock.Mock() @@ -3620,7 +3627,7 @@ class MockError(Exception): ... @pytest.mark.asyncio -async def test_any_checks_when_halt_execution_not_suppressed(): +async def test_any_checks_when_halt_execution_not_suppressed() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3637,7 +3644,7 @@ async def test_any_checks_when_halt_execution_not_suppressed(): @pytest.mark.asyncio -async def test_any_checks_when_halt_execution_suppressed(): +async def test_any_checks_when_halt_execution_suppressed() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3658,7 +3665,7 @@ async def test_any_checks_when_halt_execution_suppressed(): @pytest.mark.asyncio -async def test_any_checks_when_command_error_not_suppressed(): +async def test_any_checks_when_command_error_not_suppressed() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3675,7 +3682,7 @@ async def test_any_checks_when_command_error_not_suppressed(): @pytest.mark.asyncio -async def test_any_checks_when_command_error_suppressed(): +async def test_any_checks_when_command_error_suppressed() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -3695,7 +3702,7 @@ async def test_any_checks_when_command_error_suppressed(): ) -def test_with_any_checks(): +def test_with_any_checks() -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() diff --git a/tests/test_clients.py b/tests/test_clients.py index 32b5e3bf1..c74ebd5bd 100644 --- a/tests/test_clients.py +++ b/tests/test_clients.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -61,24 +60,24 @@ class TestMessageAcceptsEnum: (tanjun.MessageAcceptsEnum.NONE, None), ], ) - def test_get_event_type(self, value: tanjun.MessageAcceptsEnum, expected_type: hikari.Event | None): + def test_get_event_type(self, value: tanjun.MessageAcceptsEnum, expected_type: hikari.Event | None) -> None: assert value.get_event_type() == expected_type class TestLoaderDescriptor: - def test_has_load_property(self): + def test_has_load_property(self) -> None: loader = tanjun.as_loader(mock.Mock()) assert isinstance(loader, tanjun.clients._LoaderDescriptor) assert loader.has_load is True - def test_has_unload_property(self): + def test_has_unload_property(self) -> None: loader = tanjun.as_loader(mock.Mock()) assert isinstance(loader, tanjun.clients._LoaderDescriptor) assert loader.has_unload is False - def test___call__(self): + def test___call__(self) -> None: mock_callback = mock.Mock() descriptor = tanjun.as_loader(mock_callback) @@ -86,7 +85,7 @@ def test___call__(self): mock_callback.assert_called_once_with(1, "3", 3, a=31, e="43") - def test_load(self): + def test_load(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock(tanjun.Client) descriptor = tanjun.as_loader(mock_callback) @@ -98,7 +97,7 @@ def test_load(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_load_when_called_as_decorator(self): + def test_load_when_called_as_decorator(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock(tanjun.Client) descriptor = tanjun.as_loader()(mock_callback) @@ -110,7 +109,7 @@ def test_load_when_called_as_decorator(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_load_when_called_as_decorator_and_args_passed(self): + def test_load_when_called_as_decorator_and_args_passed(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock(tanjun.Client) descriptor = tanjun.as_loader(standard_impl=True)(mock_callback) @@ -122,7 +121,7 @@ def test_load_when_called_as_decorator_and_args_passed(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_load_when_must_be_std_and_not_std(self): + def test_load_when_must_be_std_and_not_std(self) -> None: mock_callback = mock.Mock() descriptor = tanjun.as_loader(mock_callback) typing.assert_type(descriptor, collections.Callable[[tanjun.Client], None]) @@ -133,7 +132,7 @@ def test_load_when_must_be_std_and_not_std(self): mock_callback.assert_not_called() - def test_load_when_abc_allowed(self): + def test_load_when_abc_allowed(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() descriptor = tanjun.as_loader(mock_callback, standard_impl=False) @@ -145,7 +144,7 @@ def test_load_when_abc_allowed(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_load_when_abc_allowed_and_called_as_decorator(self): + def test_load_when_abc_allowed_and_called_as_decorator(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() descriptor = tanjun.as_loader(standard_impl=False)(mock_callback) @@ -157,7 +156,7 @@ def test_load_when_abc_allowed_and_called_as_decorator(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_unload(self): + def test_unload(self) -> None: mock_callback = mock.Mock() descriptor = tanjun.as_loader(mock_callback) assert isinstance(descriptor, tanjun.clients._LoaderDescriptor) @@ -169,19 +168,19 @@ def test_unload(self): class TestUnloaderDescriptor: - def test_has_load_property(self): + def test_has_load_property(self) -> None: loader = tanjun.as_unloader(mock.Mock()) assert isinstance(loader, tanjun.clients._UnloaderDescriptor) assert loader.has_load is False - def test_has_unload_property(self): + def test_has_unload_property(self) -> None: loader = tanjun.as_unloader(mock.Mock()) assert isinstance(loader, tanjun.clients._UnloaderDescriptor) assert loader.has_unload is True - def test___call__(self): + def test___call__(self) -> None: mock_callback = mock.Mock() descriptor = tanjun.as_unloader(mock_callback) @@ -189,7 +188,7 @@ def test___call__(self): mock_callback.assert_called_once_with(1, "2", 3, a=31, b="312") - def test_load(self): + def test_load(self) -> None: mock_callback = mock.Mock() descriptor = tanjun.as_unloader(mock_callback) assert isinstance(descriptor, tanjun.clients._UnloaderDescriptor) @@ -199,7 +198,7 @@ def test_load(self): assert result is False mock_callback.assert_not_called() - def test_unload(self): + def test_unload(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock(tanjun.Client) descriptor = tanjun.as_unloader(mock_callback) @@ -211,7 +210,7 @@ def test_unload(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_unload_when_called_as_decorator(self): + def test_unload_when_called_as_decorator(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock(tanjun.Client) descriptor = tanjun.as_unloader()(mock_callback) @@ -223,7 +222,7 @@ def test_unload_when_called_as_decorator(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_unload_called_as_decorator_and_args_passed(self): + def test_unload_called_as_decorator_and_args_passed(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock(tanjun.Client) descriptor = tanjun.as_unloader(standard_impl=True)(mock_callback) @@ -235,7 +234,7 @@ def test_unload_called_as_decorator_and_args_passed(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_unload_when_must_be_std_and_not_std(self): + def test_unload_when_must_be_std_and_not_std(self) -> None: mock_callback = mock.Mock() descriptor = tanjun.as_unloader(mock_callback) typing.assert_type(descriptor, collections.Callable[[tanjun.Client], None]) @@ -246,7 +245,7 @@ def test_unload_when_must_be_std_and_not_std(self): mock_callback.assert_not_called() - def test_unload_when_abc_allowed(self): + def test_unload_when_abc_allowed(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() descriptor = tanjun.as_unloader(mock_callback, standard_impl=False) @@ -258,7 +257,7 @@ def test_unload_when_abc_allowed(self): assert result is True mock_callback.assert_called_once_with(mock_client) - def test_unload_when_abc_allowed_and_called_as_decorator(self): + def test_unload_when_abc_allowed_and_called_as_decorator(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() descriptor = tanjun.as_unloader(standard_impl=False)(mock_callback) @@ -273,18 +272,18 @@ def test_unload_when_abc_allowed_and_called_as_decorator(self): class TestClient: @pytest.mark.skip(reason="TODO") - def test___init__(self): ... + def test___init__(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_from_gateway_bot(self): ... + def test_from_gateway_bot(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_from_gateway_bot_when_cache_aware(self): ... + def test_from_gateway_bot_when_cache_aware(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_from_rest_bot(self): ... + def test_from_rest_bot(self) -> None: ... - def test_from_rest_bot_when_bot_managed(self): + def test_from_rest_bot_when_bot_managed(self) -> None: mock_bot = mock.Mock() client = tanjun.Client.from_rest_bot(mock_bot, bot_managed=True) @@ -293,15 +292,15 @@ def test_from_rest_bot_when_bot_managed(self): mock_bot.add_shutdown_callback.assert_called_once_with(client._on_stopping) @pytest.mark.skip(reason="TODO") - def test___repr__(self): ... + def test___repr__(self) -> None: ... @pytest.mark.asyncio - async def test__on_starting(self): + async def test__on_starting(self) -> None: mock_open = mock.AsyncMock() mock_rest = mock.AsyncMock() class TestClient(tanjun.Client): - open = mock_open # noqa: VNE003 + open = mock_open client = TestClient(mock_rest) @@ -310,7 +309,7 @@ class TestClient(tanjun.Client): mock_open.assert_awaited_once_with() @pytest.mark.asyncio - async def test__on_stopping(self): + async def test__on_stopping(self) -> None: mock_close = mock.AsyncMock() mock_rest = mock.AsyncMock() @@ -324,10 +323,10 @@ class TestClient(tanjun.Client): mock_close.assert_awaited_once_with() @pytest.mark.skip(reason="TODO") - def test__schedule_startup_registers(self): ... + def test__schedule_startup_registers(self) -> None: ... @pytest.mark.asyncio - async def test__add_task(self): + async def test__add_task(self) -> None: mock_task_1 = mock.Mock() mock_task_2 = mock.Mock() mock_task_3 = mock.Mock() @@ -346,7 +345,7 @@ async def test__add_task(self): assert client._tasks == [mock_task_1, mock_task_2, mock_task_3] @pytest.mark.asyncio - async def test__add_task_when_empty(self): + async def test__add_task_when_empty(self) -> None: mock_task = asyncio.create_task(asyncio.sleep(50)) client = tanjun.Client(mock.AsyncMock()) @@ -361,7 +360,7 @@ async def test__add_task_when_empty(self): assert client._tasks == [] @pytest.mark.asyncio - async def test__add_task_when_task_already_done(self): + async def test__add_task_when_task_already_done(self) -> None: mock_task = asyncio.create_task(asyncio.sleep(50)) mock_task.cancel() # This is done to allow any finished tasks to be removed. @@ -373,12 +372,12 @@ async def test__add_task_when_task_already_done(self): assert client._tasks == [] @pytest.mark.asyncio - async def test_context_manager(self): + async def test_context_manager(self) -> None: open_ = mock.AsyncMock() close_ = mock.AsyncMock() class MockClient(tanjun.Client): - open = open_ # noqa: VNE003 + open = open_ close = close_ async with MockClient(mock.Mock()): @@ -395,7 +394,7 @@ async def test_async_context_manager(self) -> None: class StudClient(tanjun.Client): __slots__ = () - open = open_ # noqa: VNE003 + open = open_ close = close_ client = StudClient(mock.Mock()) @@ -526,7 +525,7 @@ def test_voice_property_when_none(self) -> None: assert client.voice is None @pytest.mark.asyncio - async def test_declare_application_command_when_command_id_provided(self): + async def test_declare_application_command_when_command_id_provided(self) -> None: rest = mock.AsyncMock() client = tanjun.Client(rest) rest.edit_application_command.return_value = mock.Mock() @@ -549,7 +548,7 @@ async def test_declare_application_command_when_command_id_provided(self): mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_when_command_id_provided_and_slash_command(self): + async def test_declare_application_command_when_command_id_provided_and_slash_command(self) -> None: rest = mock.AsyncMock() client = tanjun.Client(rest) rest.edit_application_command.return_value = mock.Mock(hikari.SlashCommand) @@ -571,7 +570,7 @@ async def test_declare_application_command_when_command_id_provided_and_slash_co mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_when_command_id_provided_for_slash_builder(self): + async def test_declare_application_command_when_command_id_provided_for_slash_builder(self) -> None: rest = mock.AsyncMock() client = tanjun.Client(rest) rest.edit_application_command.return_value = mock.Mock(hikari.SlashCommand) @@ -594,7 +593,7 @@ async def test_declare_application_command_when_command_id_provided_for_slash_bu mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_when_command_id_provided_and_cached_app_id(self): + async def test_declare_application_command_when_command_id_provided_and_cached_app_id(self) -> None: rest = mock.AsyncMock() rest.edit_application_command.return_value = mock.Mock(hikari.SlashCommand) client = tanjun.Client(rest) @@ -618,7 +617,7 @@ async def test_declare_application_command_when_command_id_provided_and_cached_a mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_when_command_id_provided_fetchs_app_id(self): + async def test_declare_application_command_when_command_id_provided_fetchs_app_id(self) -> None: fetch_rest_application_id_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -647,7 +646,7 @@ class StubClient(tanjun.Client): mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command(self): + async def test_declare_application_command(self) -> None: rest = mock.AsyncMock() client = tanjun.Client(rest) mock_command = mock.Mock() @@ -664,7 +663,7 @@ async def test_declare_application_command(self): mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_inherits_config(self): + async def test_declare_application_command_inherits_config(self) -> None: rest = mock.AsyncMock() client = tanjun.Client(rest).set_default_app_command_permissions(213321).set_dms_enabled_for_app_cmds(False) mock_command = mock.Mock() @@ -683,7 +682,7 @@ async def test_declare_application_command_inherits_config(self): mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_when_cached_app_id(self): + async def test_declare_application_command_when_cached_app_id(self) -> None: rest = mock.AsyncMock() client = tanjun.Client(rest) client._cached_application_id = hikari.Snowflake(54123123) @@ -699,7 +698,7 @@ async def test_declare_application_command_when_cached_app_id(self): mock_command.set_tracked_command.assert_not_called() @pytest.mark.asyncio - async def test_declare_application_command_fetchs_app_id(self): + async def test_declare_application_command_fetchs_app_id(self) -> None: fetch_rest_application_id_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -723,9 +722,9 @@ class StubClient(tanjun.Client): @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_declare_application_commands(self): ... + async def test_declare_application_commands(self) -> None: ... - def test_set_set_default_app_command_permissions(self): + def test_set_set_default_app_command_permissions(self) -> None: client = tanjun.Client(mock.Mock()) result = client.set_default_app_command_permissions(hikari.Permissions(5421123)) @@ -733,7 +732,7 @@ def test_set_set_default_app_command_permissions(self): assert result is client assert client.default_app_cmd_permissions == 5421123 - def test_set_default_app_command_permissions(self): + def test_set_default_app_command_permissions(self) -> None: client = tanjun.Client(mock.Mock()) result = client.set_dms_enabled_for_app_cmds(False) @@ -742,9 +741,9 @@ def test_set_default_app_command_permissions(self): assert client.dms_enabled_for_app_cmds is False @pytest.mark.skip(reason="TODO") - def test_set_hikari_trait_injectors(self): ... + def test_set_hikari_trait_injectors(self) -> None: ... - def test_set_interaction_not_found(self): + def test_set_interaction_not_found(self) -> None: mock_set_menu_not_found = mock.Mock() mock_set_slash_not_found = mock.Mock() mock_message = mock.Mock() @@ -763,7 +762,7 @@ class Client(tanjun.Client): mock_set_slash_not_found.assert_called_once_with(mock_message) @pytest.mark.asyncio - async def test_set_interaction_accepts_when_running(self): + async def test_set_interaction_accepts_when_running(self) -> None: client = tanjun.Client(mock.AsyncMock()) await client.open() @@ -771,14 +770,14 @@ async def test_set_interaction_accepts_when_running(self): client.set_interaction_accepts(tanjun.InteractionAcceptsEnum.NONE) @pytest.mark.asyncio - async def test_set_message_accepts_when_running(self): + async def test_set_message_accepts_when_running(self) -> None: client = tanjun.Client(mock.AsyncMock(), events=mock.Mock()) await client.open() with pytest.raises(RuntimeError, match="Cannot change this config while the client is running"): client.set_message_accepts(tanjun.MessageAcceptsEnum.NONE) - def test_set_metadata(self): + def test_set_metadata(self) -> None: client = tanjun.Client(mock.Mock()) key = mock.Mock() value = mock.Mock() @@ -789,15 +788,15 @@ def test_set_metadata(self): assert client.metadata[key] is value @pytest.mark.skip(reason="TODO") - async def test_clear_commands(self): ... + async def test_clear_commands(self) -> None: ... @pytest.mark.skip(reason="TODO") - async def test_set_global_commands(self): ... + async def test_set_global_commands(self) -> None: ... @pytest.mark.skip(reason="TODO") - async def test_declare_global_commands(self): ... + async def test_declare_global_commands(self) -> None: ... - def test_set_human_only(self): + def test_set_human_only(self) -> None: client = tanjun.Client(mock.Mock()).set_human_only(False) result = client.set_human_only(True) @@ -806,7 +805,7 @@ def test_set_human_only(self): assert client.is_human_only is True assert tanjun.clients._check_human in client.checks - def test_set_human_only_when_false(self): + def test_set_human_only_when_false(self) -> None: client = tanjun.Client(mock.Mock()).set_human_only(True).set_human_only(True) result = client.set_human_only(False) @@ -815,7 +814,7 @@ def test_set_human_only_when_false(self): assert client.is_human_only is False assert tanjun.clients._check_human not in client.checks - def test_set_human_only_with_dupped_true_calls(self): + def test_set_human_only_with_dupped_true_calls(self) -> None: client = tanjun.Client(mock.Mock()).set_human_only(False) client.set_human_only(True) @@ -825,7 +824,7 @@ def test_set_human_only_with_dupped_true_calls(self): assert client.is_human_only is True assert list(client.checks).count(tanjun.clients._check_human) == 1 - def test_add_check(self): + def test_add_check(self) -> None: mock_check = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -834,7 +833,7 @@ def test_add_check(self): assert result is client assert mock_check in client.checks - def test_add_check_when_already_present(self): + def test_add_check_when_already_present(self) -> None: mock_check = mock.Mock() client = tanjun.Client(mock.Mock()).add_check(mock_check) @@ -843,7 +842,7 @@ def test_add_check_when_already_present(self): assert result is client assert list(client.checks).count(mock_check) == 1 - def test_add_check_with_multiple_checks(self): + def test_add_check_with_multiple_checks(self) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -853,7 +852,7 @@ def test_add_check_with_multiple_checks(self): assert client.checks == [mock_check_2, mock_check_3, mock_check_1] - def test_remove_check(self): + def test_remove_check(self) -> None: mock_check = mock.Mock() client = tanjun.Client(mock.Mock()).add_check(mock_check) @@ -862,7 +861,7 @@ def test_remove_check(self): assert result is client assert mock_check not in client.checks - def test_remove_check_when_not_present(self): + def test_remove_check_when_not_present(self) -> None: mock_check = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -871,7 +870,7 @@ def test_remove_check_when_not_present(self): assert mock_check not in client.checks - def test_with_check(self): + def test_with_check(self) -> None: mock_check = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -880,7 +879,7 @@ def test_with_check(self): assert result is mock_check assert result in client.checks - def test_with_check_when_already_present(self): + def test_with_check_when_already_present(self) -> None: mock_check = mock.Mock() client = tanjun.Client(mock.Mock()).add_check(mock_check) @@ -890,7 +889,7 @@ def test_with_check_when_already_present(self): assert list(client.checks).count(mock_check) == 1 @pytest.mark.asyncio - async def test_check(self): + async def test_check(self) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -909,7 +908,7 @@ async def test_check(self): ) @pytest.mark.asyncio - async def test_check_when_one_returns_false(self): + async def test_check_when_one_returns_false(self) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -928,7 +927,7 @@ async def test_check_when_one_returns_false(self): ) @pytest.mark.asyncio - async def test_check_when_one_raises(self): + async def test_check_when_one_raises(self) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -951,7 +950,7 @@ async def test_check_when_one_raises(self): ) @pytest.mark.asyncio - async def test_check_when_one_raises_failed_check(self): + async def test_check_when_one_raises_failed_check(self) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -970,15 +969,15 @@ async def test_check_when_one_raises_failed_check(self): ) @pytest.mark.skip(reason="TODO") - def test_add_component(self): ... + def test_add_component(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_component_when_already_present(self): ... + def test_add_component_when_already_present(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_component_when_is_alive(self): ... + def test_add_component_when_is_alive(self) -> None: ... - def test_get_component_by_name(self): + def test_get_component_by_name(self) -> None: mock_component = mock.Mock() mock_component.name = "vader" client = ( @@ -990,19 +989,19 @@ def test_get_component_by_name(self): assert client.get_component_by_name("vader") is mock_component - def test_get_component_by_name_when_not_present(self): + def test_get_component_by_name_when_not_present(self) -> None: assert tanjun.Client(mock.AsyncMock()).get_component_by_name("test") is None @pytest.mark.skip(reason="TODO") - def test_remove_component(self): ... + def test_remove_component(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_remove_component_when_not_present(self): ... + def test_remove_component_when_not_present(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_remove_component_when_is_alive(self): ... + def test_remove_component_when_is_alive(self) -> None: ... - def test_remove_component_by_name(self): + def test_remove_component_by_name(self) -> None: remove_component_ = mock.Mock() mock_add_task = mock.Mock() @@ -1021,46 +1020,46 @@ class StubClient(tanjun.Client): remove_component_.assert_called_once_with(mock_component) mock_add_task.assert_not_called() - def test_remove_component_by_name_when_not_present(self): + def test_remove_component_by_name_when_not_present(self) -> None: client = tanjun.Client(mock.AsyncMock()) with pytest.raises(KeyError): client.remove_component_by_name("nyan") @pytest.mark.skip(reason="TODO") - def test_add_client_callback(self): ... + def test_add_client_callback(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_client_callback_when_already_present(self): ... + def test_add_client_callback_when_already_present(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_client_callback_for_multiple_callbacks(self): ... + def test_add_client_callback_for_multiple_callbacks(self) -> None: ... @pytest.mark.asyncio - async def test_dispatch_client_callback(self): ... + async def test_dispatch_client_callback(self) -> None: ... @pytest.mark.asyncio - async def test_dispatch_client_callback_when_name_not_found(self): ... + async def test_dispatch_client_callback_when_name_not_found(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_get_client_callbacks(self): ... + def test_get_client_callbacks(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_get_client_callbacks_when_name_not_found(self): ... + def test_get_client_callbacks_when_name_not_found(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_remove_client_callback(self): ... + def test_remove_client_callback(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_remove_client_callback_when_name_not_found(self): ... + def test_remove_client_callback_when_name_not_found(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_remove_client_callback_when_callback_not_found(self): ... + def test_remove_client_callback_when_callback_not_found(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_remove_client_callback_when_last_callback(self): ... + def test_remove_client_callback_when_last_callback(self) -> None: ... - def test_with_client_callback(self): + def test_with_client_callback(self) -> None: add_client_callback_ = mock.Mock() class StubClient(tanjun.Client): @@ -1076,24 +1075,24 @@ class StubClient(tanjun.Client): add_client_callback_.assert_called_once_with("aye", mock_callback) @pytest.mark.skip(reason="TODO") - def test_add_listener(self): ... + def test_add_listener(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_listener_when_already_present(self): ... + def test_add_listener_when_already_present(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_listener_for_multiple_callbacks(self): ... + def test_add_listener_for_multiple_callbacks(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_listener_when_alive(self): ... + def test_add_listener_when_alive(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_listener_when_alive_and_events(self): ... + def test_add_listener_when_alive_and_events(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_add_listener_when_events(self): ... + def test_add_listener_when_events(self) -> None: ... - def test_remove_listener(self): + def test_remove_listener(self) -> None: mock_callback = mock.Mock() client = ( tanjun.Client(mock.Mock()) @@ -1106,13 +1105,13 @@ def test_remove_listener(self): assert result is client assert mock_callback not in client.listeners[hikari.GuildTypingEvent] - def test_remove_listener_when_event_type_not_present(self): + def test_remove_listener_when_event_type_not_present(self) -> None: client = tanjun.Client(mock.Mock()) with pytest.raises(KeyError): client.remove_listener(hikari.GuildTypingEvent, mock.Mock()) - def test_remove_listener_when_callback_not_present(self): + def test_remove_listener_when_callback_not_present(self) -> None: mock_other_callback = mock.Mock() mock_injector = mock.Mock() client = tanjun.Client(mock.Mock(), injector=mock_injector).add_listener( @@ -1125,7 +1124,7 @@ def test_remove_listener_when_callback_not_present(self): assert client.listeners[hikari.GuildTypingEvent] == [mock_injector.auto_inject_async.return_value] mock_injector.auto_inject_async.assert_called_once_with(mock_other_callback) - def test_remove_listener_when_last_listener(self): + def test_remove_listener_when_last_listener(self) -> None: mock_callback = mock.Mock() client = tanjun.Client(mock.Mock()).add_listener(hikari.RoleEvent, mock_callback) @@ -1133,7 +1132,7 @@ def test_remove_listener_when_last_listener(self): assert hikari.RoleEvent not in client.listeners - def test_remove_listener_when_alive(self): + def test_remove_listener_when_alive(self) -> None: mock_callback = mock.Mock() client = tanjun.Client(mock.Mock()).add_listener(hikari.RoleEvent, mock_callback) client._loop = mock.Mock() @@ -1142,7 +1141,7 @@ def test_remove_listener_when_alive(self): assert hikari.RoleEvent not in client.listeners - def test_remove_listener_when_alive_and_events(self): + def test_remove_listener_when_alive_and_events(self) -> None: mock_events = mock.Mock() mock_injector = mock.Mock() mock_callback = mock.Mock() @@ -1156,7 +1155,7 @@ def test_remove_listener_when_alive_and_events(self): assert hikari.RoleEvent not in client.listeners mock_events.unsubscribe.assert_called_once_with(hikari.RoleEvent, mock_injector.auto_inject_async.return_value) - def test_remove_listener_when_events(self): + def test_remove_listener_when_events(self) -> None: mock_events = mock.Mock() mock_callback = mock.Mock() client = tanjun.Client(mock.Mock(), events=mock_events, event_managed=False).add_listener( @@ -1168,7 +1167,7 @@ def test_remove_listener_when_events(self): assert hikari.RoleEvent not in client.listeners mock_events.unsubscribe.assert_not_called() - def test_with_listener(self): + def test_with_listener(self) -> None: add_listener_ = mock.Mock() class StubClient(tanjun.Client): @@ -1182,7 +1181,7 @@ class StubClient(tanjun.Client): assert result is mock_callback add_listener_.assert_called_once_with(hikari.GuildAvailableEvent, mock_callback) - def test_with_listener_no_provided_event(self): + def test_with_listener_no_provided_event(self) -> None: async def callback(foo) -> None: # type: ignore ... @@ -1198,7 +1197,7 @@ class StubClient(tanjun.Client): add_listener_.assert_not_called() - def test_with_listener_no_provided_event_callback_has_no_signature(self): + def test_with_listener_no_provided_event_callback_has_no_signature(self) -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -1214,7 +1213,7 @@ class StubClient(tanjun.Client): add_listener_.assert_not_called() - def test_with_listener_missing_positional_event_arg(self): + def test_with_listener_missing_positional_event_arg(self) -> None: async def callback(*, event: hikari.Event, **kwargs: str) -> None: ... add_listener_ = mock.Mock() @@ -1229,7 +1228,7 @@ class StubClient(tanjun.Client): add_listener_.assert_not_called() - def test_with_listener_no_args(self): + def test_with_listener_no_args(self) -> None: async def callback() -> None: ... add_listener_ = mock.Mock() @@ -1244,7 +1243,7 @@ class StubClient(tanjun.Client): add_listener_.assert_not_called() - def test_with_listener_with_multiple_events(self): + def test_with_listener_with_multiple_events(self) -> None: add_listener_ = mock.Mock() class StubClient(tanjun.Client): @@ -1266,7 +1265,7 @@ class StubClient(tanjun.Client): ] ) - def test_with_listener_with_type_hint(self): + def test_with_listener_with_type_hint(self) -> None: async def callback(event: hikari.BanCreateEvent) -> None: ... add_listener_ = mock.Mock() @@ -1281,7 +1280,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_type_hint_in_annotated(self): + def test_with_listener_with_type_hint_in_annotated(self) -> None: async def callback(event: typing.Annotated[hikari.BanCreateEvent, 123, 321]) -> None: ... add_listener_ = mock.Mock() @@ -1296,7 +1295,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_positional_only_type_hint(self): + def test_with_listener_with_positional_only_type_hint(self) -> None: async def callback(event: hikari.BanDeleteEvent, /) -> None: ... add_listener_ = mock.Mock() @@ -1311,7 +1310,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanDeleteEvent, callback) - def test_with_listener_with_var_positional_type_hint(self): + def test_with_listener_with_var_positional_type_hint(self) -> None: async def callback(*event: hikari.BanEvent) -> None: ... add_listener_ = mock.Mock() @@ -1326,7 +1325,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanEvent, callback) - def test_with_listener_with_type_hint_typing_union(self): + def test_with_listener_with_type_hint_typing_union(self) -> None: async def callback( event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] ) -> None: ... @@ -1343,7 +1342,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_has_calls([mock.call(hikari.RoleEvent, callback), mock.call(hikari.GuildEvent, callback)]) - def test_with_listener_with_type_hint_typing_union_nested_annotated(self): + def test_with_listener_with_type_hint_typing_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Union[ @@ -1373,7 +1372,7 @@ class StubClient(tanjun.Client): ] ) - def test_with_listener_with_type_hint_310_union(self): + def test_with_listener_with_type_hint_310_union(self) -> None: async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str) -> None: ... add_listener_ = mock.Mock() @@ -1388,7 +1387,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_has_calls([mock.call(hikari.ShardEvent, callback), mock.call(hikari.VoiceEvent, callback)]) - def test_with_listener_with_type_hint_310_union_nested_annotated(self): + def test_with_listener_with_type_hint_310_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Annotated[hikari.BanEvent | hikari.GuildEvent, 123, 321] | hikari.InviteEvent, True, "meow" @@ -1413,7 +1412,7 @@ class StubClient(tanjun.Client): ] ) - def test_add_prefix(self): + def test_add_prefix(self) -> None: client = tanjun.Client(mock.Mock()) result = client.add_prefix("aye") @@ -1421,7 +1420,7 @@ def test_add_prefix(self): assert result is client assert "aye" in client.prefixes - def test_add_prefix_when_already_present(self): + def test_add_prefix_when_already_present(self) -> None: client = tanjun.Client(mock.Mock()).add_prefix("lmao") result = client.add_prefix("lmao") @@ -1429,7 +1428,7 @@ def test_add_prefix_when_already_present(self): assert result is client assert list(client.prefixes).count("lmao") == 1 - def test_add_prefix_when_iterable(self): + def test_add_prefix_when_iterable(self) -> None: client = tanjun.Client(mock.Mock()) result = client.add_prefix(["Grand", "dad", "FNAF"]) @@ -1439,7 +1438,7 @@ def test_add_prefix_when_iterable(self): assert list(client.prefixes).count("dad") == 1 assert list(client.prefixes).count("FNAF") == 1 - def test_add_prefix_when_iterable_and_already_present(self): + def test_add_prefix_when_iterable_and_already_present(self) -> None: client = tanjun.Client(mock.Mock()).add_prefix(["naye", "laala", "OBAMA"]) result = client.add_prefix(["naye", "OBAMA", "bourg"]) @@ -1450,7 +1449,7 @@ def test_add_prefix_when_iterable_and_already_present(self): assert list(client.prefixes).count("OBAMA") == 1 assert list(client.prefixes).count("bourg") == 1 - def test_remove_prefix(self): + def test_remove_prefix(self) -> None: client = tanjun.Client(mock.Mock()).add_prefix("lmao") result = client.remove_prefix("lmao") @@ -1458,13 +1457,13 @@ def test_remove_prefix(self): assert result is client assert "lmao" not in client.prefixes - def test_remove_prefix_when_not_present(self): + def test_remove_prefix_when_not_present(self) -> None: client = tanjun.Client(mock.Mock()) with pytest.raises(ValueError, match=".+"): client.remove_prefix("lmao") - def test_set_prefix_getter(self): + def test_set_prefix_getter(self) -> None: mock_getter = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -1473,7 +1472,7 @@ def test_set_prefix_getter(self): assert result is client assert client.prefix_getter is mock_getter - def test_set_prefix_getter_when_none(self): + def test_set_prefix_getter_when_none(self) -> None: client = tanjun.Client(mock.Mock()).set_prefix_getter(mock.Mock()) result = client.set_prefix_getter(None) @@ -1481,7 +1480,7 @@ def test_set_prefix_getter_when_none(self): assert result is client assert client.prefix_getter is None - def test_with_prefix_getter(self): + def test_with_prefix_getter(self) -> None: mock_getter = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -1490,7 +1489,7 @@ def test_with_prefix_getter(self): assert result is mock_getter assert client.prefix_getter is mock_getter - def test_iter_commands(self): + def test_iter_commands(self) -> None: mock_menu_1 = mock.Mock(is_global=True) mock_menu_2 = mock.Mock(is_global=False) mock_menu_3 = mock.Mock(is_global=False) @@ -1533,7 +1532,7 @@ def test_iter_commands(self): mock_slash_3, ] - def test_iter_menu_commands(self): + def test_iter_menu_commands(self) -> None: mock_command_1 = mock.Mock(is_global=True, type=hikari.CommandType.USER) mock_command_2 = mock.Mock(is_global=False, type=hikari.CommandType.MESSAGE) mock_command_3 = mock.Mock(is_global=False, type=hikari.CommandType.USER) @@ -1550,7 +1549,7 @@ def test_iter_menu_commands(self): assert result == [mock_command_1, mock_command_2, mock_command_3, mock_command_4] - def test_iter_menu_commands_when_global_only(self): + def test_iter_menu_commands_when_global_only(self) -> None: mock_command_1 = mock.Mock(is_global=True, type=hikari.CommandType.USER) mock_command_2 = mock.Mock(is_global=False, type=hikari.CommandType.MESSAGE) mock_command_3 = mock.Mock(is_global=False, type=hikari.CommandType.USER) @@ -1567,7 +1566,7 @@ def test_iter_menu_commands_when_global_only(self): assert result == [mock_command_1, mock_command_4] - def test_iter_menu_commands_when_filtering_for_user(self): + def test_iter_menu_commands_when_filtering_for_user(self) -> None: mock_command_1 = mock.Mock(is_global=True, type=hikari.CommandType.USER) mock_command_2 = mock.Mock(is_global=False, type=hikari.CommandType.MESSAGE) mock_command_3 = mock.Mock(is_global=False, type=hikari.CommandType.USER) @@ -1584,7 +1583,7 @@ def test_iter_menu_commands_when_filtering_for_user(self): assert result == [mock_command_1, mock_command_3] - def test_iter_menu_commands_when_filtering_for_message(self): + def test_iter_menu_commands_when_filtering_for_message(self) -> None: mock_command_1 = mock.Mock(is_global=True, type=hikari.CommandType.USER) mock_command_2 = mock.Mock(is_global=False, type=hikari.CommandType.MESSAGE) mock_command_3 = mock.Mock(is_global=False, type=hikari.CommandType.USER) @@ -1601,7 +1600,7 @@ def test_iter_menu_commands_when_filtering_for_message(self): assert result == [mock_command_2, mock_command_4] - def test_iter_menu_commands_when_filtering_for_user_and_global_only(self): + def test_iter_menu_commands_when_filtering_for_user_and_global_only(self) -> None: mock_command_1 = mock.Mock(is_global=True, type=hikari.CommandType.USER) mock_command_2 = mock.Mock(is_global=False, type=hikari.CommandType.MESSAGE) mock_command_3 = mock.Mock(is_global=False, type=hikari.CommandType.USER) @@ -1618,7 +1617,7 @@ def test_iter_menu_commands_when_filtering_for_user_and_global_only(self): assert result == [mock_command_1] - def test_iter_menu_commands_when_filtering_for_message_and_global_only(self): + def test_iter_menu_commands_when_filtering_for_message_and_global_only(self) -> None: mock_command_1 = mock.Mock(is_global=True, type=hikari.CommandType.USER) mock_command_2 = mock.Mock(is_global=False, type=hikari.CommandType.MESSAGE) mock_command_3 = mock.Mock(is_global=False, type=hikari.CommandType.USER) @@ -1635,7 +1634,7 @@ def test_iter_menu_commands_when_filtering_for_message_and_global_only(self): assert result == [mock_command_4] - def test_iter_message_commands(self): + def test_iter_message_commands(self) -> None: mock_command_1 = mock.Mock() mock_command_2 = mock.Mock() mock_command_3 = mock.Mock() @@ -1654,7 +1653,7 @@ def test_iter_message_commands(self): assert commands == [mock_command_1, mock_command_2, mock_command_3, mock_command_4, mock_command_5] - def test_iter_slash_commands(self): + def test_iter_slash_commands(self) -> None: mock_command_1 = mock.Mock() mock_command_2 = mock.Mock() mock_command_3 = mock.Mock() @@ -1673,7 +1672,7 @@ def test_iter_slash_commands(self): assert commands == [mock_command_1, mock_command_2, mock_command_3, mock_command_4, mock_command_5] - def test_iter_slash_commands_when_global_only(self): + def test_iter_slash_commands_when_global_only(self) -> None: mock_command_1 = mock.Mock(is_global=True) mock_command_2 = mock.Mock(is_global=True) mock_command_3 = mock.Mock(is_global=True) @@ -1692,24 +1691,24 @@ def test_iter_slash_commands_when_global_only(self): assert commands == [mock_command_1, mock_command_2, mock_command_3, mock_command_4] @pytest.mark.skip(reason="TODO") - def test_check_message_name(self): ... + def test_check_message_name(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_check_slash_name(self): ... + def test_check_slash_name(self) -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_close(self): ... + async def test_close(self) -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_open(self): ... + async def test_open(self) -> None: ... @pytest.mark.skip(reason="TODO") @pytest.mark.asyncio - async def test_fetch_rest_application_id(self): ... + async def test_fetch_rest_application_id(self) -> None: ... - def test_set_ephemeral_default(self): + def test_set_ephemeral_default(self) -> None: client = tanjun.Client(mock.Mock()) result = client.set_ephemeral_default(True) @@ -1717,7 +1716,7 @@ def test_set_ephemeral_default(self): assert result is client assert client.defaults_to_ephemeral is True - def test_set_hooks(self): + def test_set_hooks(self) -> None: mock_hooks = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -1726,7 +1725,7 @@ def test_set_hooks(self): assert result is client assert client.hooks is mock_hooks - def test_set_hooks_when_none(self): + def test_set_hooks_when_none(self) -> None: client = tanjun.Client(mock.Mock()).set_hooks(mock.Mock()) result = client.set_hooks(None) @@ -1734,7 +1733,7 @@ def test_set_hooks_when_none(self): assert result is client assert client.hooks is None - def test_set_menu_hooks(self): + def test_set_menu_hooks(self) -> None: mock_hooks = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -1743,7 +1742,7 @@ def test_set_menu_hooks(self): assert result is client assert client.menu_hooks is mock_hooks - def test_set_menu_hooks_when_none(self): + def test_set_menu_hooks_when_none(self) -> None: client = tanjun.Client(mock.Mock()).set_menu_hooks(mock.Mock()) result = client.set_menu_hooks(None) @@ -1751,7 +1750,7 @@ def test_set_menu_hooks_when_none(self): assert result is client assert client.menu_hooks is None - def test_set_message_hooks(self): + def test_set_message_hooks(self) -> None: mock_hooks = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -1760,7 +1759,7 @@ def test_set_message_hooks(self): assert result is client assert client.message_hooks is mock_hooks - def test_set_message_hooks_when_none(self): + def test_set_message_hooks_when_none(self) -> None: client = tanjun.Client(mock.Mock()).set_message_hooks(mock.Mock()) result = client.set_message_hooks(None) @@ -1768,7 +1767,7 @@ def test_set_message_hooks_when_none(self): assert result is client assert client.message_hooks is None - def test_set_slash_hooks(self): + def test_set_slash_hooks(self) -> None: mock_hooks = mock.Mock() client = tanjun.Client(mock.Mock()) @@ -1777,7 +1776,7 @@ def test_set_slash_hooks(self): assert result is client assert client.slash_hooks is mock_hooks - def test_set_slash_hooks_when_none(self): + def test_set_slash_hooks_when_none(self) -> None: client = tanjun.Client(mock.Mock()).set_slash_hooks(mock.Mock()) result = client.set_slash_hooks(None) @@ -1785,7 +1784,7 @@ def test_set_slash_hooks_when_none(self): assert result is client assert client.slash_hooks is None - def test_load_directory(self): + def test_load_directory(self) -> None: mock_load_modules = mock.Mock() class StubClient(tanjun.Client): @@ -1815,7 +1814,7 @@ class StubClient(tanjun.Client): finally: shutil.rmtree(temp_dir) - def test_load_directory_with_namespace(self): + def test_load_directory_with_namespace(self) -> None: mock_load_modules = mock.Mock() class StubClient(tanjun.Client): @@ -1845,7 +1844,7 @@ class StubClient(tanjun.Client): finally: shutil.rmtree(temp_dir) - def test_load_directory_when_suppressed_error_raised(self): + def test_load_directory_when_suppressed_error_raised(self) -> None: mock_load_modules = mock.Mock( side_effect=[tanjun.ModuleMissingLoaders("b", "by"), tanjun.ModuleStateConflict("nyaa.meow", "sleep"), None] ) @@ -1875,7 +1874,7 @@ class StubClient(tanjun.Client): finally: shutil.rmtree(temp_dir) - def test_load_directory_when_fails_to_load(self): + def test_load_directory_when_fails_to_load(self) -> None: mock_exc = tanjun.FailedModuleLoad("trans.rights") mock_load_modules = mock.Mock(side_effect=[None, mock_exc]) @@ -1905,7 +1904,7 @@ class StubClient(tanjun.Client): shutil.rmtree(temp_dir) @pytest.mark.asyncio - async def test_load_directory_async(self): + async def test_load_directory_async(self) -> None: mock_load_modules = mock.AsyncMock() class StubClient(tanjun.Client): @@ -1936,7 +1935,7 @@ class StubClient(tanjun.Client): shutil.rmtree(temp_dir) @pytest.mark.asyncio - async def test_load_directory_async_with_namespace(self): + async def test_load_directory_async_with_namespace(self) -> None: mock_load_modules = mock.AsyncMock() class StubClient(tanjun.Client): @@ -1967,7 +1966,7 @@ class StubClient(tanjun.Client): shutil.rmtree(temp_dir) @pytest.mark.asyncio - async def test_load_directory_async_when_suppressed_error_raised(self): + async def test_load_directory_async_when_suppressed_error_raised(self) -> None: mock_load_modules = mock.AsyncMock( side_effect=[tanjun.ModuleMissingLoaders("b", "by"), tanjun.ModuleStateConflict("nyaa.meow", "sleep"), None] ) @@ -1998,7 +1997,7 @@ class StubClient(tanjun.Client): shutil.rmtree(temp_dir) @pytest.mark.asyncio - async def test_load_directory_async_when_fails_to_load(self): + async def test_load_directory_async_when_fails_to_load(self) -> None: mock_exc = tanjun.FailedModuleLoad("trans.rights") mock_load_modules = mock.AsyncMock(side_effect=[None, mock_exc]) @@ -2039,7 +2038,7 @@ def temp_file(self) -> collections.Iterator[typing.IO[str]]: finally: pathlib.Path(temp_file_.name).unlink(missing_ok=False) - def test__load_modules_with_system_path(self, temp_file: typing.IO[str]): + def test__load_modules_with_system_path(self, temp_file: typing.IO[str]) -> None: add_component_ = mock.Mock() add_client_callback_ = mock.Mock() @@ -2096,7 +2095,7 @@ def _load_module(client: tanjun.abc.Client) -> None: add_component_.assert_has_calls([mock.call(5533), mock.call(123)]) add_client_callback_.assert_has_calls([mock.call(554444), mock.call(4312)]) - def test__load_modules_with_system_path_respects_all(self, temp_file: typing.IO[str]): + def test__load_modules_with_system_path_respects_all(self, temp_file: typing.IO[str]) -> None: add_component_ = mock.Mock() add_client_callback_ = mock.Mock() @@ -2158,7 +2157,7 @@ def not_in_all(client: tanjun.abc.Client) -> None: add_component_.assert_has_calls([mock.call(123), mock.call(777), mock.call(5432)]) add_client_callback_.assert_has_calls([mock.call(4312), mock.call(778), mock.call(6543456)]) - def test__load_modules_with_system_path_when_all_and_no_loaders_found(self, temp_file: typing.IO[str]): + def test__load_modules_with_system_path_when_all_and_no_loaders_found(self, temp_file: typing.IO[str]) -> None: add_component_ = mock.Mock() add_client_callback_ = mock.Mock() @@ -2199,7 +2198,7 @@ def not_in_all(client: tanjun.abc.Client) -> None: with pytest.raises(tanjun.ModuleMissingLoaders): generator.send(module) - def test__load_modules_with_system_path_when_no_loaders_found(self, temp_file: typing.IO[str]): + def test__load_modules_with_system_path_when_no_loaders_found(self, temp_file: typing.IO[str]) -> None: add_component_ = mock.Mock() add_client_callback_ = mock.Mock() @@ -2234,7 +2233,7 @@ class FullMetal: with pytest.raises(tanjun.ModuleMissingLoaders): generator.send(module) - def test__load_modules_with_system_path_when_loader_raises(self, temp_file: typing.IO[str]): + def test__load_modules_with_system_path_when_loader_raises(self, temp_file: typing.IO[str]) -> None: add_component_ = mock.Mock() add_client_callback_ = mock.Mock() @@ -2271,7 +2270,7 @@ class FullMetal: assert isinstance(exc_info.value.__cause__, RuntimeError) assert exc_info.value.__cause__.args == ("Mummy uwu",) - def test__load_modules_with_system_path_when_already_loaded(self, temp_file: typing.IO[str]): + def test__load_modules_with_system_path_when_already_loaded(self, temp_file: typing.IO[str]) -> None: client = tanjun.Client(mock.AsyncMock()) temp_file.write(textwrap.dedent("""raise NotImplementedError("This shouldn't ever be imported")""")) temp_file.flush() @@ -2282,7 +2281,7 @@ def test__load_modules_with_system_path_when_already_loaded(self, temp_file: typ with pytest.raises(tanjun.ModuleStateConflict): next(generator) - def test__load_modules_with_system_path_for_unknown_path(self): + def test__load_modules_with_system_path_for_unknown_path(self) -> None: class MockClient(tanjun.Client): add_component = mock.Mock() add_client_callback = mock.Mock() @@ -2295,7 +2294,7 @@ class MockClient(tanjun.Client): with pytest.raises(ModuleNotFoundError): next_() - def test__load_modules_with_python_module_path(self): + def test__load_modules_with_python_module_path(self) -> None: client = tanjun.Client(mock.AsyncMock()) priv_loader = mock.Mock(tanjun.abc.ClientLoader, load=mock.Mock(return_value=True)) @@ -2327,7 +2326,7 @@ def test__load_modules_with_python_module_path(self): mock_module.other_loader.load.assert_called_once_with(client) priv_loader.load.assert_not_called() - def test__load_modules_with_python_module_path_respects_all(self): + def test__load_modules_with_python_module_path_respects_all(self) -> None: client = tanjun.Client(mock.AsyncMock()) priv_loader = mock.Mock(tanjun.abc.ClientLoader, load=mock.Mock(return_value=True)) @@ -2361,7 +2360,7 @@ def test__load_modules_with_python_module_path_respects_all(self): priv_loader.load.assert_called_once_with(client) mock_module.another_loader.load.assert_called_once_with(client) - def test__load_modules_with_python_module_path_when_no_loader_found(self): + def test__load_modules_with_python_module_path_when_no_loader_found(self) -> None: client = tanjun.Client(mock.AsyncMock()) mock_module = mock.Mock( object=123, @@ -2382,7 +2381,7 @@ def test__load_modules_with_python_module_path_when_no_loader_found(self): mock_module.loader.load.assert_called_once_with(client) - def test__load_modules_with_python_module_path_when_loader_raises(self): + def test__load_modules_with_python_module_path_when_loader_raises(self) -> None: mock_exception = KeyError("ayayaya") mock_module = mock.Mock( foo=5686544536876, bar=object(), load_module=mock.Mock(tanjun.abc.ClientLoader, has_load=True) @@ -2400,7 +2399,7 @@ def test__load_modules_with_python_module_path_when_loader_raises(self): assert exc_info.value.__cause__ is mock_exception - def test__load_modules_with_python_module_path_when_already_loaded(self): + def test__load_modules_with_python_module_path_when_already_loaded(self) -> None: client = tanjun.Client(mock.AsyncMock()) client._modules["ayayayaya.ok"] = mock.Mock() generator = client._load_module("ayayayaya.ok") @@ -2408,7 +2407,7 @@ def test__load_modules_with_python_module_path_when_already_loaded(self): with pytest.raises(tanjun.ModuleStateConflict): next(generator) - def test_load_modules(self): + def test_load_modules(self) -> None: mock_path = mock.Mock(pathlib.Path) mock_gen_1 = mock.Mock(__next__=mock.Mock()) mock_gen_1.send.side_effect = StopIteration @@ -2436,7 +2435,7 @@ class StubClient(tanjun.Client): mock_gen_2.__next__.return_value.assert_called_once_with() mock_gen_2.send.assert_called_once_with(mock_gen_2.__next__.return_value.return_value) - def test_load_modules_when_module_import_raises(self): + def test_load_modules_when_module_import_raises(self) -> None: mock_exception = ValueError("aye") mock_gen = mock.Mock(__next__=mock.Mock()) mock_gen.__next__.return_value.side_effect = mock_exception @@ -2460,7 +2459,7 @@ class StubClient(tanjun.Client): @mock.patch.object(asyncio, "get_running_loop") @pytest.mark.asyncio - async def test_load_modules_async(self, get_running_loop: mock.Mock): + async def test_load_modules_async(self, get_running_loop: mock.Mock) -> None: mock_executor_result_1 = mock.Mock() mock_executor_result_2 = mock.Mock() mock_executor_result_3 = mock.Mock() @@ -2498,7 +2497,7 @@ class StubClient(tanjun.Client): @mock.patch.object(asyncio, "get_running_loop") @pytest.mark.asyncio - async def test_load_modules_async_when_module_import_raises(self, get_running_loop: mock.Mock): + async def test_load_modules_async_when_module_import_raises(self, get_running_loop: mock.Mock) -> None: mock_exception = ValueError("aye") mock_gen = mock.Mock(__next__=mock.Mock()) get_running_loop.return_value.run_in_executor = mock.AsyncMock(side_effect=mock_exception) @@ -2519,7 +2518,7 @@ class StubClient(tanjun.Client): get_running_loop.return_value.run_in_executor.assert_called_once_with(None, mock_gen.__next__.return_value) mock_gen.send.assert_not_called() - def test_unload_modules_with_system_path(self): + def test_unload_modules_with_system_path(self) -> None: priv_unloader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( __dunder_loader__=mock.Mock(tanjun.abc.ClientLoader), @@ -2541,7 +2540,7 @@ def test_unload_modules_with_system_path(self): priv_unloader.unload.assert_not_called() assert path.resolve() not in client._path_modules - def test_unload_modules_with_system_path_respects_all(self): + def test_unload_modules_with_system_path_respects_all(self) -> None: priv_unload = mock.Mock(tanjun.abc.ClientLoader) mock_module = mock.Mock( __all__=["FullMetal", "_priv_unload", "unload_module", "_bar", "foo", "load_module", "missing"], @@ -2566,7 +2565,7 @@ def test_unload_modules_with_system_path_respects_all(self): mock_module.not_in_all.unload.assert_not_called() assert path.resolve() not in client._path_modules - def test_unload_modules_with_system_path_when_not_loaded(self): + def test_unload_modules_with_system_path_when_not_loaded(self) -> None: client = tanjun.Client(mock.AsyncMock()) path = pathlib.Path("naye") @@ -2575,7 +2574,7 @@ def test_unload_modules_with_system_path_when_not_loaded(self): assert path.resolve() not in client._path_modules - def test_unload_modules_with_system_path_when_no_unloaders_found(self): + def test_unload_modules_with_system_path_when_no_unloaders_found(self) -> None: mock_module = mock.Mock( foo=5686544536876, bar=object(), @@ -2591,7 +2590,7 @@ def test_unload_modules_with_system_path_when_no_unloaders_found(self): assert client._path_modules[path.resolve()] is mock_module - def test_unload_modules_with_system_path_when_all_and_no_unloaders_found(self): + def test_unload_modules_with_system_path_when_all_and_no_unloaders_found(self) -> None: mock_module = mock.Mock( __all__=["FullMetal", "bar", "foo", "load_module", "missing"], foo=5686544536876, @@ -2609,7 +2608,7 @@ def test_unload_modules_with_system_path_when_all_and_no_unloaders_found(self): assert client._path_modules[path.resolve()] is mock_module - def test_unload_modules_with_system_path_when_unloader_raises(self): + def test_unload_modules_with_system_path_when_unloader_raises(self) -> None: mock_exception = ValueError("aye") mock_module = mock.Mock( foo=5686544536876, @@ -2630,7 +2629,7 @@ def test_unload_modules_with_system_path_when_unloader_raises(self): assert exc_info.value.__cause__ is mock_exception assert client._path_modules[path.resolve()] is mock_module - def test_unload_modules_with_python_module_path(self): + def test_unload_modules_with_python_module_path(self) -> None: client = tanjun.Client(mock.AsyncMock()) priv_loader = mock.Mock(tanjun.abc.ClientLoader, unload=mock.Mock(return_value=True)) @@ -2655,7 +2654,7 @@ def test_unload_modules_with_python_module_path(self): priv_loader.unload.assert_not_called() assert "okokok.no" not in client._modules - def test_unload_modules_with_python_module_path_respects_all(self): + def test_unload_modules_with_python_module_path_respects_all(self) -> None: client = tanjun.Client(mock.AsyncMock()) priv_loader = mock.Mock(tanjun.abc.ClientLoader, unload=mock.Mock(return_value=True)) @@ -2683,7 +2682,7 @@ def test_unload_modules_with_python_module_path_respects_all(self): mock_module.another_loader.unload.assert_called_once_with(client) assert "okokok.no.u" not in client._modules - def test_unload_modules_with_python_module_path_when_not_loaded(self): + def test_unload_modules_with_python_module_path_when_not_loaded(self) -> None: client = tanjun.Client(mock.AsyncMock()) with pytest.raises(tanjun.ModuleStateConflict): @@ -2691,7 +2690,7 @@ def test_unload_modules_with_python_module_path_when_not_loaded(self): assert "gay.cat" not in client._modules - def test_unload_modules_with_python_module_path_when_no_unloaders_found_and_all(self): + def test_unload_modules_with_python_module_path_when_no_unloaders_found_and_all(self) -> None: client = tanjun.Client(mock.AsyncMock()) other_loader = mock.Mock(tanjun.abc.ClientLoader, unload=mock.Mock(return_value=True)) @@ -2716,7 +2715,7 @@ def test_unload_modules_with_python_module_path_when_no_unloaders_found_and_all( mock_module.loader.unload.assert_called_once_with(client) assert "senpai.uwu" in client._modules - def test_unload_modules_with_python_module_path_when_no_unloaders_found(self): + def test_unload_modules_with_python_module_path_when_no_unloaders_found(self) -> None: client = tanjun.Client(mock.AsyncMock()) mock_module = mock.Mock( @@ -2737,7 +2736,7 @@ def test_unload_modules_with_python_module_path_when_no_unloaders_found(self): mock_module.loader.unload.assert_called_once_with(client) assert "okokok.nok" in client._modules - def test_unload_modules_with_python_module_path_when_unloader_raises(self): + def test_unload_modules_with_python_module_path_when_unloader_raises(self) -> None: client = tanjun.Client(mock.AsyncMock()) mock_exception = TypeError("Big shot") mock_module = mock.Mock( @@ -2754,7 +2753,7 @@ def test_unload_modules_with_python_module_path_when_unloader_raises(self): assert client._modules["ea s"] is mock_module assert "ea s" in client._modules - def test__reload_modules_with_python_module_path(self): + def test__reload_modules_with_python_module_path(self) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) priv_loader = mock.Mock(tanjun.abc.ClientLoader, unload=mock.Mock(return_value=False)) old_module = mock.Mock( @@ -2817,7 +2816,7 @@ def test__reload_modules_with_python_module_path(self): priv_loader.unload.assert_not_called() assert client._modules["waifus"] is new_module - def test__reload_modules_with_python_module_path_when_no_unloaders_found(self): + def test__reload_modules_with_python_module_path_when_no_unloaders_found(self) -> None: priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( load=mock.Mock(tanjun.abc.ClientLoader, load=mock.Mock(return_value=True), has_unload=False), @@ -2844,7 +2843,7 @@ def test__reload_modules_with_python_module_path_when_no_unloaders_found(self): new_module.loader.unload.assert_not_called() assert client._modules["waifus"] is old_module - def test__reload_modules_with_python_module_path_when_no_loaders_found_in_new_module(self): + def test__reload_modules_with_python_module_path_when_no_loaders_found_in_new_module(self) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( @@ -2888,7 +2887,7 @@ def test__reload_modules_with_python_module_path_when_no_loaders_found_in_new_mo priv_loader.unload.assert_not_called() assert client._modules["yuri.waifus"] is old_module - def test__reload_modules_with_python_module_path_when_all(self): + def test__reload_modules_with_python_module_path_when_all(self) -> None: priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( @@ -2949,7 +2948,7 @@ def test__reload_modules_with_python_module_path_when_all(self): priv_loader.unload.assert_not_called() assert client._modules["waifus"] is new_module - def test__reload_modules_with_python_module_path_when_all_and_no_unloaders_found(self): + def test__reload_modules_with_python_module_path_when_all_and_no_unloaders_found(self) -> None: priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( loader=mock.Mock(tanjun.abc.ClientLoader, has_unload=False), @@ -2980,7 +2979,7 @@ def test__reload_modules_with_python_module_path_when_all_and_no_unloaders_found new_module.loader.unload.assert_not_called() assert client._modules["waifus"] is old_module - def test__reload_modules_with_python_module_path_when_all_and_no_loaders_found_in_new_module(self): + def test__reload_modules_with_python_module_path_when_all_and_no_loaders_found_in_new_module(self) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( @@ -3035,7 +3034,7 @@ def test__reload_modules_with_python_module_path_when_all_and_no_loaders_found_i new_module.loader.unload.assert_not_called() assert client._modules["yuri.waifus"] is old_module - def test__reload_modules_with_python_module_path_and_not_loaded(self): + def test__reload_modules_with_python_module_path_and_not_loaded(self) -> None: client = tanjun.Client(mock.AsyncMock()) generator = client._reload_module("aya.gay.no") @@ -3044,7 +3043,7 @@ def test__reload_modules_with_python_module_path_and_not_loaded(self): assert "aya.gay.no" not in client._modules - def test__reload_modules_with_python_module_path_rolls_back_when_new_module_loader_raises(self): + def test__reload_modules_with_python_module_path_rolls_back_when_new_module_loader_raises(self) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) priv_loader = mock.Mock(tanjun.abc.ClientLoader, unload=mock.Mock(return_value=False)) old_module = mock.Mock( @@ -3104,7 +3103,7 @@ def test__reload_modules_with_python_module_path_rolls_back_when_new_module_load priv_loader.unload.assert_not_called() assert client._modules["waifus"] is old_module - def test__reload_modules_with_system_path(self, temp_file: typing.IO[str]): + def test__reload_modules_with_system_path(self, temp_file: typing.IO[str]) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( loader=mock.Mock(tanjun.abc.ClientLoader, load=mock.Mock(unload=False)), @@ -3160,7 +3159,7 @@ def test__reload_modules_with_system_path(self, temp_file: typing.IO[str]): new_module._priv_loader.load.assert_not_called() new_module._priv_loader.unload.assert_not_called() - def test__reload_modules_with_system_path_when_no_unloaders_found(self, temp_file: typing.IO[str]): + def test__reload_modules_with_system_path_when_no_unloaders_found(self, temp_file: typing.IO[str]) -> None: priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( load=mock.Mock(tanjun.abc.ClientLoader, load=mock.Mock(return_value=True), has_unload=False), @@ -3195,7 +3194,9 @@ def test__reload_modules_with_system_path_when_no_unloaders_found(self, temp_fil priv_loader.unload.assert_not_called() assert client._path_modules[path] is old_module - def test__reload_modules_with_system_path_when_no_loaders_found_in_new_module(self, temp_file: typing.IO[str]): + def test__reload_modules_with_system_path_when_no_loaders_found_in_new_module( + self, temp_file: typing.IO[str] + ) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( loader=mock.Mock(tanjun.abc.ClientLoader), @@ -3236,7 +3237,7 @@ def test__reload_modules_with_system_path_when_no_loaders_found_in_new_module(se old_priv_loader.unload.assert_not_called() assert client._path_modules[path] is old_module - def test__reload_modules_with_system_path_when_all(self, temp_file: typing.IO[str]): + def test__reload_modules_with_system_path_when_all(self, temp_file: typing.IO[str]) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( loader=mock.Mock(tanjun.abc.ClientLoader), @@ -3291,7 +3292,7 @@ def test__reload_modules_with_system_path_when_all(self, temp_file: typing.IO[st new_module._priv_loader.load.assert_called_once_with(client) new_module._priv_loader.unload.assert_not_called() - def test__reload_modules_with_system_path_when_all_and_no_unloaders_found(self, temp_file: typing.IO[str]): + def test__reload_modules_with_system_path_when_all_and_no_unloaders_found(self, temp_file: typing.IO[str]) -> None: priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( loader=mock.Mock(tanjun.abc.ClientLoader, has_unload=False), @@ -3333,7 +3334,7 @@ def test__reload_modules_with_system_path_when_all_and_no_unloaders_found(self, def test__reload_modules_with_system_path_when_all_and_no_loaders_found_in_new_module( self, temp_file: typing.IO[str] - ): + ) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) priv_loader = mock.Mock(tanjun.abc.ClientLoader) old_module = mock.Mock( @@ -3387,7 +3388,7 @@ def test__reload_modules_with_system_path_when_all_and_no_loaders_found_in_new_m priv_loader.unload.assert_not_called() assert client._path_modules[path] is old_module - def test__reload_modules_with_system_path_and_not_loaded(self): + def test__reload_modules_with_system_path_and_not_loaded(self) -> None: client = tanjun.Client(mock.AsyncMock()) random_path = pathlib.Path(uuid.uuid4().hex) generator = client._reload_module(random_path) @@ -3397,7 +3398,7 @@ def test__reload_modules_with_system_path_and_not_loaded(self): assert random_path not in client._path_modules - def test__reload_modules_with_system_path_for_unknown_path(self): + def test__reload_modules_with_system_path_for_unknown_path(self) -> None: old_module = mock.Mock( loader=mock.Mock(tanjun.abc.ClientLoader), ok=123, @@ -3419,7 +3420,9 @@ def test__reload_modules_with_system_path_for_unknown_path(self): old_module.other_loader.unload.assert_not_called() assert random_path in client._path_modules - def test__reload_modules_with_system_path_rolls_back_when_new_module_loader_raises(self, temp_file: typing.IO[str]): + def test__reload_modules_with_system_path_rolls_back_when_new_module_loader_raises( + self, temp_file: typing.IO[str] + ) -> None: old_priv_loader = mock.Mock(tanjun.abc.ClientLoader) priv_loader = mock.Mock(tanjun.abc.ClientLoader, unload=mock.Mock(return_value=False)) old_module = mock.Mock( @@ -3470,7 +3473,7 @@ def test__reload_modules_with_system_path_rolls_back_when_new_module_loader_rais priv_loader.unload.assert_not_called() assert client._path_modules[path] is old_module - def test_reload_modules(self): + def test_reload_modules(self) -> None: mock_path = mock.Mock(pathlib.Path) mock_gen_1 = mock.Mock(__next__=mock.Mock()) mock_gen_1.send.side_effect = StopIteration @@ -3498,7 +3501,7 @@ class StubClient(tanjun.Client): mock_gen_2.__next__.return_value.assert_called_once_with() mock_gen_2.send.assert_called_once_with(mock_gen_2.__next__.return_value.return_value) - def test_reload_modules_when_module_loader_raises(self): + def test_reload_modules_when_module_loader_raises(self) -> None: mock_exception = TypeError("FOO") mock_gen = mock.Mock(__next__=mock.Mock()) mock_gen.__next__.return_value.side_effect = mock_exception @@ -3521,7 +3524,7 @@ class StubClient(tanjun.Client): @mock.patch.object(asyncio, "get_running_loop") @pytest.mark.asyncio - async def test_reload_modules_async(self, get_running_loop: mock.Mock): + async def test_reload_modules_async(self, get_running_loop: mock.Mock) -> None: mock_executor_result_1 = mock.Mock() mock_executor_result_2 = mock.Mock() mock_executor_result_3 = mock.Mock() @@ -3559,7 +3562,7 @@ class StubClient(tanjun.Client): @mock.patch.object(asyncio, "get_running_loop") @pytest.mark.asyncio - async def test_reload_modules_async_when_module_loader_raises(self, get_running_loop: mock.Mock): + async def test_reload_modules_async_when_module_loader_raises(self, get_running_loop: mock.Mock) -> None: mock_exception = RuntimeError("eeeee") get_running_loop.return_value.run_in_executor = mock.AsyncMock(side_effect=mock_exception) mock_gen = mock.Mock(__next__=mock.Mock()) @@ -3599,7 +3602,7 @@ class StubClient(tanjun.Client): ) @pytest.mark.asyncio - async def test_on_message_create_event(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event(self, command_dispatch_client: tanjun.Client) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3631,7 +3634,7 @@ async def test_on_message_create_event(self, command_dispatch_client: tanjun.Cli command_dispatch_client.dispatch_client_callback.assert_not_called() @pytest.mark.asyncio - async def test_on_message_create_event_when_prefix_getter(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_prefix_getter(self, command_dispatch_client: tanjun.Client) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value ctx_maker.return_value.call_with_async_di = mock.AsyncMock(return_value=["sex", "!"]) @@ -3666,7 +3669,9 @@ async def test_on_message_create_event_when_prefix_getter(self, command_dispatch ctx_maker.return_value.call_with_async_di.assert_awaited_once_with(prefix_getter, ctx_maker.return_value) @pytest.mark.asyncio - async def test_on_message_create_event_when_no_message_content(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_no_message_content( + self, command_dispatch_client: tanjun.Client + ) -> None: ctx_maker = mock.Mock() command_dispatch_client.set_message_ctx_maker(ctx_maker) mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3682,7 +3687,7 @@ async def test_on_message_create_event_when_no_message_content(self, command_dis command_dispatch_client.dispatch_client_callback.assert_not_called() @pytest.mark.asyncio - async def test_on_message_create_event_when_prefix_not_found(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_prefix_not_found(self, command_dispatch_client: tanjun.Client) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="42")) mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) mock_component_2 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3707,7 +3712,7 @@ async def test_on_message_create_event_when_prefix_not_found(self, command_dispa @pytest.mark.asyncio async def test_on_message_create_event_when_custom_prefix_getter_not_found( self, command_dispatch_client: tanjun.Client - ): + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="42")) ctx_maker.return_value.call_with_async_di = mock.AsyncMock(return_value=["aye", "naye"]) prefix_getter = mock.Mock() @@ -3733,7 +3738,9 @@ async def test_on_message_create_event_when_custom_prefix_getter_not_found( ctx_maker.return_value.call_with_async_di.assert_called_once_with(prefix_getter, ctx_maker.return_value) @pytest.mark.asyncio - async def test_on_message_create_event_when_only_message_hooks(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_only_message_hooks( + self, command_dispatch_client: tanjun.Client + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3765,7 +3772,9 @@ async def test_on_message_create_event_when_only_message_hooks(self, command_dis command_dispatch_client.dispatch_client_callback.assert_not_called() @pytest.mark.asyncio - async def test_on_message_create_event_when_only_generic_hooks(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_only_generic_hooks( + self, command_dispatch_client: tanjun.Client + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3797,7 +3806,7 @@ async def test_on_message_create_event_when_only_generic_hooks(self, command_dis command_dispatch_client.dispatch_client_callback.assert_not_called() @pytest.mark.asyncio - async def test_on_message_create_event_when_no_hooks(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_no_hooks(self, command_dispatch_client: tanjun.Client) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3829,7 +3838,7 @@ async def test_on_message_create_event_when_no_hooks(self, command_dispatch_clie @pytest.mark.asyncio async def test_on_message_create_event_when_checks_raise_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3862,7 +3871,7 @@ async def test_on_message_create_event_when_checks_raise_command_error( @pytest.mark.asyncio async def test_on_message_create_event_when_checks_raise_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3893,7 +3902,9 @@ async def test_on_message_create_event_when_checks_raise_halt_execution( ) @pytest.mark.asyncio - async def test_on_message_create_event_when_checks_returns_false(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_checks_returns_false( + self, command_dispatch_client: tanjun.Client + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3926,7 +3937,7 @@ async def test_on_message_create_event_when_checks_returns_false(self, command_d @pytest.mark.asyncio async def test_on_message_create_event_when_component_raises_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -3965,7 +3976,7 @@ async def test_on_message_create_event_when_component_raises_command_error( @pytest.mark.asyncio async def test_on_message_create_event_when_component_raises_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -4002,7 +4013,7 @@ async def test_on_message_create_event_when_component_raises_halt_execution( ) @pytest.mark.asyncio - async def test_on_message_create_event_when_not_found(self, command_dispatch_client: tanjun.Client): + async def test_on_message_create_event_when_not_found(self, command_dispatch_client: tanjun.Client) -> None: ctx_maker = mock.Mock(return_value=mock.Mock(content="! 42", respond=mock.AsyncMock())) ctx_maker.return_value.set_content.return_value = ctx_maker.return_value mock_component_1 = mock.AsyncMock(bind_client=mock.Mock()) @@ -4041,7 +4052,7 @@ async def test_on_message_create_event_when_not_found(self, command_dispatch_cli # Interaction create event @pytest.mark.asyncio - async def test__on_menu_not_found(self): + async def test__on_menu_not_found(self) -> None: dispatch_client_callback_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -4056,7 +4067,7 @@ class StubClient(tanjun.Client): dispatch_client_callback_.assert_awaited_once_with(tanjun.ClientCallbackNames.MENU_COMMAND_NOT_FOUND, ctx) @pytest.mark.asyncio - async def test__on_menu_not_found_when_already_responded(self): + async def test__on_menu_not_found_when_already_responded(self) -> None: dispatch_client_callback_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -4071,7 +4082,7 @@ class StubClient(tanjun.Client): dispatch_client_callback_.assert_awaited_once_with(tanjun.ClientCallbackNames.MENU_COMMAND_NOT_FOUND, ctx) @pytest.mark.asyncio - async def test__on_menu_not_found_when_not_found_messages_disabled(self): + async def test__on_menu_not_found_when_not_found_messages_disabled(self) -> None: dispatch_client_callback_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -4086,7 +4097,7 @@ class StubClient(tanjun.Client): dispatch_client_callback_.assert_awaited_once_with(tanjun.ClientCallbackNames.MENU_COMMAND_NOT_FOUND, ctx) @pytest.mark.asyncio - async def test__on_slash_not_found(self): + async def test__on_slash_not_found(self) -> None: dispatch_client_callback_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -4101,7 +4112,7 @@ class StubClient(tanjun.Client): dispatch_client_callback_.assert_awaited_once_with(tanjun.ClientCallbackNames.SLASH_COMMAND_NOT_FOUND, ctx) @pytest.mark.asyncio - async def test__on_slash_not_found_when_already_responded(self): + async def test__on_slash_not_found_when_already_responded(self) -> None: dispatch_client_callback_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -4116,7 +4127,7 @@ class StubClient(tanjun.Client): dispatch_client_callback_.assert_awaited_once_with(tanjun.ClientCallbackNames.SLASH_COMMAND_NOT_FOUND, ctx) @pytest.mark.asyncio - async def test__on_slash_not_found_when_not_found_messages_disabled(self): + async def test__on_slash_not_found_when_not_found_messages_disabled(self) -> None: dispatch_client_callback_ = mock.AsyncMock() class StubClient(tanjun.Client): @@ -4131,7 +4142,7 @@ class StubClient(tanjun.Client): dispatch_client_callback_.assert_awaited_once_with(tanjun.ClientCallbackNames.SLASH_COMMAND_NOT_FOUND, ctx) @pytest.mark.asyncio - async def test_on_gateway_autocomplete_create(self, command_dispatch_client: tanjun.Client): + async def test_on_gateway_autocomplete_create(self, command_dispatch_client: tanjun.Client) -> None: mock_component_1 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) mock_component_2 = mock.Mock(execute_autocomplete=mock.AsyncMock()) mock_component_3 = mock.Mock(execute_autocomplete=mock.Mock()) @@ -4152,7 +4163,7 @@ async def test_on_gateway_autocomplete_create(self, command_dispatch_client: tan mock_component_3.execute_autocomplete.assert_not_called() @pytest.mark.asyncio - async def test_on_gateway_autocomplete_create_when_not_found(self, command_dispatch_client: tanjun.Client): + async def test_on_gateway_autocomplete_create_when_not_found(self, command_dispatch_client: tanjun.Client) -> None: mock_component_1 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) mock_component_2 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) mock_component_3 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) @@ -4173,7 +4184,7 @@ async def test_on_gateway_autocomplete_create_when_not_found(self, command_dispa mock_component_3.execute_autocomplete.assert_called_once_with(mock_make_ctx.return_value) @pytest.mark.asyncio - async def test_on_gateway_command_create_for_slash_command(self, command_dispatch_client: tanjun.Client): + async def test_on_gateway_command_create_for_slash_command(self, command_dispatch_client: tanjun.Client) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4223,7 +4234,7 @@ async def test_on_gateway_command_create_for_slash_command(self, command_dispatc @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_ephemeral_default( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4272,7 +4283,7 @@ async def test_on_gateway_command_create_for_slash_command_when_ephemeral_defaul @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_not_auto_deferring( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4317,7 +4328,7 @@ async def test_on_gateway_command_create_for_slash_command_when_not_auto_deferri @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_no_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4363,7 +4374,7 @@ async def test_on_gateway_command_create_for_slash_command_when_no_hooks( @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_only_slash_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4412,7 +4423,7 @@ async def test_on_gateway_command_create_for_slash_command_when_only_slash_hooks @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_only_generic_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4461,7 +4472,7 @@ async def test_on_gateway_command_create_for_slash_command_when_only_generic_hoo @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_not_found( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4506,7 +4517,7 @@ async def test_on_gateway_command_create_for_slash_command_when_not_found( @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_checks_raise_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4550,7 +4561,7 @@ async def test_on_gateway_command_create_for_slash_command_when_checks_raise_com @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_checks_raise_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4592,7 +4603,7 @@ async def test_on_gateway_command_create_for_slash_command_when_checks_raise_hal @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_component_raises_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4640,7 +4651,7 @@ async def test_on_gateway_command_create_for_slash_command_when_component_raises @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_component_raises_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4686,7 +4697,7 @@ async def test_on_gateway_command_create_for_slash_command_when_component_raises @pytest.mark.asyncio async def test_on_gateway_command_create_for_slash_command_when_checks_fail( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.SlashContext, @@ -4726,7 +4737,7 @@ async def test_on_gateway_command_create_for_slash_command_when_checks_fail( mock_ctx_maker.return_value.cancel_defer.assert_called_once_with() @pytest.mark.asyncio - async def test_on_gateway_command_create_for_menu_command(self, command_dispatch_client: tanjun.Client): + async def test_on_gateway_command_create_for_menu_command(self, command_dispatch_client: tanjun.Client) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -4776,7 +4787,7 @@ async def test_on_gateway_command_create_for_menu_command(self, command_dispatch @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_ephemeral_default( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -4825,7 +4836,7 @@ async def test_on_gateway_command_create_for_menu_command_when_ephemeral_default @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_not_auto_deferring( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -4870,7 +4881,7 @@ async def test_on_gateway_command_create_for_menu_command_when_not_auto_deferrin @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_no_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -4916,7 +4927,7 @@ async def test_on_gateway_command_create_for_menu_command_when_no_hooks( @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_only_menu_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -4965,7 +4976,7 @@ async def test_on_gateway_command_create_for_menu_command_when_only_menu_hooks( @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_only_generic_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5014,7 +5025,7 @@ async def test_on_gateway_command_create_for_menu_command_when_only_generic_hook @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_not_found( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5059,7 +5070,7 @@ async def test_on_gateway_command_create_for_menu_command_when_not_found( @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_checks_raise_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5103,7 +5114,7 @@ async def test_on_gateway_command_create_for_menu_command_when_checks_raise_comm @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_checks_raise_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5141,7 +5152,7 @@ async def test_on_gateway_command_create_for_menu_command_when_checks_raise_halt @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_component_raises_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5189,7 +5200,7 @@ async def test_on_gateway_command_create_for_menu_command_when_component_raises_ @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_component_raises_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5235,7 +5246,7 @@ async def test_on_gateway_command_create_for_menu_command_when_component_raises_ @pytest.mark.asyncio async def test_on_gateway_command_create_for_menu_command_when_checks_fail( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_ctx_maker = mock.Mock( return_value=mock.Mock( tanjun.context.MenuContext, @@ -5275,7 +5286,9 @@ async def test_on_gateway_command_create_for_menu_command_when_checks_fail( mock_ctx_maker.return_value.cancel_defer.assert_called_once_with() @pytest.mark.asyncio - async def test_on_interaction_create_event_for_command_interaction(self, command_dispatch_client: tanjun.Client): + async def test_on_interaction_create_event_for_command_interaction( + self, command_dispatch_client: tanjun.Client + ) -> None: mock_event = mock.Mock( interaction=mock.Mock(hikari.CommandInteraction, type=hikari.InteractionType.APPLICATION_COMMAND) ) @@ -5291,7 +5304,7 @@ async def test_on_interaction_create_event_for_command_interaction(self, command @pytest.mark.asyncio async def test_on_interaction_create_event_for_command_interaction_when_commands_disabled( self, command_dispatch_client: tanjun.Client, allow: tanjun.InteractionAcceptsEnum - ): + ) -> None: command_dispatch_client.set_interaction_accepts(allow) mock_event = mock.Mock( interaction=mock.Mock(hikari.CommandInteraction, type=hikari.InteractionType.APPLICATION_COMMAND) @@ -5307,7 +5320,7 @@ async def test_on_interaction_create_event_for_command_interaction_when_commands @pytest.mark.asyncio async def test_on_interaction_create_event_for_autocomplete_interaction( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_event = mock.Mock( interaction=mock.Mock(hikari.AutocompleteInteraction, type=hikari.InteractionType.AUTOCOMPLETE) ) @@ -5323,7 +5336,7 @@ async def test_on_interaction_create_event_for_autocomplete_interaction( @pytest.mark.asyncio async def test_on_interaction_create_event_for_autocomplete_interaction_when_autocomplete_disabled( self, command_dispatch_client: tanjun.Client, allow: tanjun.InteractionAcceptsEnum - ): + ) -> None: command_dispatch_client.set_interaction_accepts(allow) mock_event = mock.Mock( interaction=mock.Mock(hikari.AutocompleteInteraction, type=hikari.InteractionType.AUTOCOMPLETE) @@ -5339,7 +5352,7 @@ async def test_on_interaction_create_event_for_autocomplete_interaction_when_aut @pytest.mark.asyncio async def test_on_interaction_create_event_for_unknown_interaction_type( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_event = mock.Mock(interaction=mock.Mock(hikari.PartialInteraction, type=-1)) command_dispatch_client.on_gateway_autocomplete_create = mock.AsyncMock() command_dispatch_client.on_gateway_command_create = mock.AsyncMock() @@ -5350,11 +5363,11 @@ async def test_on_interaction_create_event_for_unknown_interaction_type( command_dispatch_client.on_gateway_autocomplete_create.assert_not_called() @pytest.mark.asyncio - async def test_on_autocomplete_interaction_request(self, command_dispatch_client: tanjun.Client): + async def test_on_autocomplete_interaction_request(self, command_dispatch_client: tanjun.Client) -> None: mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.AutocompleteContext): + async def execution_callback(ctx: tanjun.abc.AutocompleteContext) -> None: nonlocal task assert ctx is mock_make_ctx.return_value mock_make_ctx.call_args.kwargs["future"].set_result(mock_result) @@ -5383,10 +5396,12 @@ async def execution_callback(ctx: tanjun.abc.AutocompleteContext): mock_add_task.assert_called_once_with(task) @pytest.mark.asyncio - async def test_on_autocomplete_interaction_request_when_no_result_set(self, command_dispatch_client: tanjun.Client): + async def test_on_autocomplete_interaction_request_when_no_result_set( + self, command_dispatch_client: tanjun.Client + ) -> None: task = None - async def execution_callback(ctx: tanjun.abc.AutocompleteContext): + async def execution_callback(ctx: tanjun.abc.AutocompleteContext) -> None: nonlocal task assert ctx is mock_make_ctx.return_value task = asyncio.current_task() @@ -5414,7 +5429,9 @@ async def execution_callback(ctx: tanjun.abc.AutocompleteContext): mock_add_task.assert_called_once_with(task) @pytest.mark.asyncio - async def test_on_autocomplete_interaction_request_when_not_found(self, command_dispatch_client: tanjun.Client): + async def test_on_autocomplete_interaction_request_when_not_found( + self, command_dispatch_client: tanjun.Client + ) -> None: mock_component_1 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) mock_component_2 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) mock_component_3 = mock.Mock(execute_autocomplete=mock.Mock(return_value=None)) @@ -5438,12 +5455,14 @@ async def test_on_autocomplete_interaction_request_when_not_found(self, command_ mock_add_task.assert_not_called() @pytest.mark.asyncio - async def test_on_command_interaction_request_for_slash_command(self, command_dispatch_client: tanjun.Client): + async def test_on_command_interaction_request_for_slash_command( + self, command_dispatch_client: tanjun.Client + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -5503,11 +5522,11 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_future_not_set( self, command_dispatch_client: tanjun.Client - ): + ) -> None: task = None async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -5564,12 +5583,12 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_ephemeral_default( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -5628,11 +5647,11 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_not_auto_deferring( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -5683,12 +5702,12 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_no_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -5744,12 +5763,12 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_only_slash_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -5808,12 +5827,12 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_only_generic_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -5872,11 +5891,11 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_not_found( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -5926,10 +5945,10 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_not_found_and_no_result( self, command_dispatch_client: tanjun.Client - ): + ) -> None: task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task task = asyncio.current_task() @@ -5978,11 +5997,11 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_checks_raise_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def error_send_callback(ctx: tanjun.abc.Context): + async def error_send_callback(ctx: tanjun.abc.Context) -> None: nonlocal task assert ctx is mock_ctx_maker.return_value mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) @@ -6032,10 +6051,10 @@ async def error_send_callback(ctx: tanjun.abc.Context): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_checks_raise_command_error_and_result_not_given( self, command_dispatch_client: tanjun.Client - ): + ) -> None: task = None - async def error_send_callback(ctx: tanjun.abc.Context): + async def error_send_callback(ctx: tanjun.abc.Context) -> None: nonlocal task assert ctx is mock_ctx_maker.return_value task = asyncio.current_task() @@ -6084,11 +6103,11 @@ async def error_send_callback(ctx: tanjun.abc.Context): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_checks_raise_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6135,11 +6154,11 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_component_raises_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def error_send_callback(ctx: tanjun.abc.Context): + async def error_send_callback(ctx: tanjun.abc.Context) -> None: nonlocal task assert ctx is mock_ctx_maker.return_value mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) @@ -6194,11 +6213,11 @@ async def error_send_callback(ctx: tanjun.abc.Context): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_component_raises_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6251,11 +6270,11 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_slash_command_when_checks_fail( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6299,12 +6318,14 @@ async def not_found_callback(): mock_ctx_maker.return_value.cancel_defer.assert_not_called() @pytest.mark.asyncio - async def test_on_command_interaction_request_for_menu_command(self, command_dispatch_client: tanjun.Client): + async def test_on_command_interaction_request_for_menu_command( + self, command_dispatch_client: tanjun.Client + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -6364,11 +6385,11 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_future_not_set( self, command_dispatch_client: tanjun.Client - ): + ) -> None: task = None async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -6425,12 +6446,12 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_ephemeral_default( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): - async def _(): + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value assert hooks is hooks @@ -6489,11 +6510,11 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_not_auto_deferring( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6544,15 +6565,17 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_no_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): - async def _(): + async def execution_callback( + ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks is None mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6605,15 +6628,17 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_only_menu_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): - async def _(): + async def execution_callback( + ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks is None mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6669,15 +6694,17 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_only_generic_hooks( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): - async def _(): + async def execution_callback( + ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: + async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks is None mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6733,11 +6760,11 @@ async def _(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_not_found( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6787,10 +6814,10 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_not_found_and_no_result( self, command_dispatch_client: tanjun.Client - ): + ) -> None: task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task task = asyncio.current_task() @@ -6839,11 +6866,11 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_checks_raise_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def error_send_callback(ctx: tanjun.abc.Context): + async def error_send_callback(ctx: tanjun.abc.Context) -> None: nonlocal task assert ctx is mock_ctx_maker.return_value mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) @@ -6893,10 +6920,10 @@ async def error_send_callback(ctx: tanjun.abc.Context): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_checks_raise_command_error_and_result_not_given( self, command_dispatch_client: tanjun.Client - ): + ) -> None: task = None - async def error_send_callback(ctx: tanjun.abc.Context): + async def error_send_callback(ctx: tanjun.abc.Context) -> None: nonlocal task assert ctx is mock_ctx_maker.return_value task = asyncio.current_task() @@ -6945,11 +6972,11 @@ async def error_send_callback(ctx: tanjun.abc.Context): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_checks_raise_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6996,11 +7023,11 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_component_raises_command_error( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def error_send_callback(ctx: tanjun.abc.Context): + async def error_send_callback(ctx: tanjun.abc.Context) -> None: nonlocal task assert ctx is mock_ctx_maker.return_value mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) @@ -7055,11 +7082,11 @@ async def error_send_callback(ctx: tanjun.abc.Context): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_component_raises_halt_execution( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -7112,11 +7139,11 @@ async def not_found_callback(): @pytest.mark.asyncio async def test_on_command_interaction_request_for_menu_command_when_checks_fail( self, command_dispatch_client: tanjun.Client - ): + ) -> None: mock_result = mock.Mock() task = None - async def not_found_callback(): + async def not_found_callback() -> None: nonlocal task mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -7160,7 +7187,7 @@ async def not_found_callback(): mock_ctx_maker.return_value.cancel_defer.assert_not_called() -def test__normalize_path(): +def test__normalize_path() -> None: mock_path = mock.Mock() result = tanjun.clients._normalize_path(mock_path) @@ -7170,7 +7197,7 @@ def test__normalize_path(): mock_path.expanduser.return_value.resolve.assert_called_once_with() -def test__normalize_path_when_expanduser_fails(): +def test__normalize_path_when_expanduser_fails() -> None: mock_path = mock.Mock() mock_path.expanduser.side_effect = RuntimeError diff --git a/tests/test_clients_future_annotations.py b/tests/test_clients_future_annotations.py index 531a94526..7ae67e335 100644 --- a/tests/test_clients_future_annotations.py +++ b/tests/test_clients_future_annotations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -41,8 +40,8 @@ class TestClient: - def test_with_listener_no_provided_event(self): - async def callback(foo) -> None: # type: ignore + def test_with_listener_no_provided_event(self) -> None: + async def callback(foo) -> None: # type: ignore # noqa: ANN001 ... add_listener_ = mock.Mock() @@ -57,7 +56,7 @@ class StubClient(tanjun.Client): add_listener_.assert_not_called() - def test_with_listener_no_provided_event_callback_has_no_signature(self): + def test_with_listener_no_provided_event_callback_has_no_signature(self) -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -73,7 +72,7 @@ class StubClient(tanjun.Client): add_listener_.assert_not_called() - def test_with_listener_with_type_hint(self): + def test_with_listener_with_type_hint(self) -> None: async def callback(event: hikari.BanCreateEvent) -> None: ... add_listener_ = mock.Mock() @@ -88,7 +87,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_type_hint_in_annotated(self): + def test_with_listener_with_type_hint_in_annotated(self) -> None: async def callback(event: typing.Annotated[hikari.BanCreateEvent, 123, 321]) -> None: ... add_listener_ = mock.Mock() @@ -103,7 +102,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_positional_only_type_hint(self): + def test_with_listener_with_positional_only_type_hint(self) -> None: async def callback(event: hikari.BanDeleteEvent, /) -> None: ... add_listener_ = mock.Mock() @@ -118,7 +117,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanDeleteEvent, callback) - def test_with_listener_with_var_positional_type_hint(self): + def test_with_listener_with_var_positional_type_hint(self) -> None: async def callback(*event: hikari.BanEvent) -> None: ... add_listener_ = mock.Mock() @@ -133,7 +132,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_called_once_with(hikari.BanEvent, callback) - def test_with_listener_with_type_hint_typing_union(self): + def test_with_listener_with_type_hint_typing_union(self) -> None: async def callback( event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] ) -> None: ... @@ -150,7 +149,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_has_calls([mock.call(hikari.RoleEvent, callback), mock.call(hikari.GuildEvent, callback)]) - def test_with_listener_with_type_hint_typing_union_nested_annotated(self): + def test_with_listener_with_type_hint_typing_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Union[ @@ -180,7 +179,7 @@ class StubClient(tanjun.Client): ] ) - def test_with_listener_with_type_hint_310_union(self): + def test_with_listener_with_type_hint_310_union(self) -> None: async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str) -> None: ... add_listener_ = mock.Mock() @@ -195,7 +194,7 @@ class StubClient(tanjun.Client): assert result is callback add_listener_.assert_has_calls([mock.call(hikari.ShardEvent, callback), mock.call(hikari.VoiceEvent, callback)]) - def test_with_listener_with_type_hint_310_union_nested_annotated(self): + def test_with_listener_with_type_hint_310_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Annotated[hikari.BanEvent | hikari.GuildEvent, 123, 321] | hikari.InviteEvent, True, "meow" diff --git a/tests/test_components.py b/tests/test_components.py index dec43556e..d9e108e6c 100644 --- a/tests/test_components.py +++ b/tests/test_components.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -51,17 +50,17 @@ class TestComponent: - def test_loop_property(self): + def test_loop_property(self) -> None: mock_loop = mock.Mock() component = tanjun.Component() component._loop = mock_loop assert component.loop is mock_loop - def test_name_property(self): + def test_name_property(self) -> None: assert tanjun.Component(name="aye").name == "aye" - def test_metadata_property(self): + def test_metadata_property(self) -> None: component = tanjun.Component() assert component.metadata == {} @@ -70,17 +69,17 @@ def test_metadata_property(self): assert component.metadata == {"foo": "bar"} - def test_default_app_cmd_permissions_property(self): + def test_default_app_cmd_permissions_property(self) -> None: assert tanjun.Component().default_app_cmd_permissions is None - def test_defaults_to_ephemeral_property(self): + def test_defaults_to_ephemeral_property(self) -> None: assert tanjun.Component().defaults_to_ephemeral is None - def test_dms_enabled_for_app_cmds_property(self): + def test_dms_enabled_for_app_cmds_property(self) -> None: assert tanjun.Component().dms_enabled_for_app_cmds is None @pytest.mark.asyncio - async def test__add_task(self): + async def test__add_task(self) -> None: mock_task_1 = mock.Mock() mock_task_2 = mock.Mock() mock_task_3 = mock.Mock() @@ -99,7 +98,7 @@ async def test__add_task(self): assert component._tasks == [mock_task_1, mock_task_2, mock_task_3] @pytest.mark.asyncio - async def test__add_task_when_empty(self): + async def test__add_task_when_empty(self) -> None: mock_task = asyncio.create_task(asyncio.sleep(50)) component = tanjun.Component() @@ -114,7 +113,7 @@ async def test__add_task_when_empty(self): assert component._tasks == [] @pytest.mark.asyncio - async def test__add_task_when_task_already_done(self): + async def test__add_task_when_task_already_done(self) -> None: mock_task = asyncio.create_task(asyncio.sleep(50)) mock_task.cancel() # This is done to allow any finished tasks to be removed. @@ -126,9 +125,9 @@ async def test__add_task_when_task_already_done(self): assert component._tasks == [] @pytest.mark.skip(reason="TODO") - def test_copy(self): ... + def test_copy(self) -> None: ... - def test_load_from_scope(self): + def test_load_from_scope(self) -> None: # Some of the variables in this test have a type: ignore and noqa on them, # this is to silence warnings about these variables being "unused" which # we ignore in this case as we're testing that detect_command can deal with @@ -149,7 +148,7 @@ def test_load_from_scope(self): mock_loader_2.load_into_component.assert_called_once_with(component) mock_loader_3.load_into_component.assert_called_once_with(component) - def test_load_from_scope_when_including_globals(self): + def test_load_from_scope_when_including_globals(self) -> None: # Some of the variables in this test have a type: ignore and noqa on them, # this is to silence warnings about these variables being "unused" which # we ignore in this case as we're testing that detect_command can deal with @@ -177,7 +176,7 @@ def test_load_from_scope_when_including_globals(self): mock_global_loader_2.reset_mock() mock_global_loader_3.reset_mock() - def test_load_from_scope_with_explicitly_passed_scope(self): + def test_load_from_scope_with_explicitly_passed_scope(self) -> None: mock_un_used_loader = mock.Mock(tanjun.components.AbstractComponentLoader) mock_loader_1 = mock.Mock(tanjun.components.AbstractComponentLoader) mock_loader_2 = mock.Mock(tanjun.components.AbstractComponentLoader) @@ -203,12 +202,12 @@ def test_load_from_scope_with_explicitly_passed_scope(self): mock_loader_2.load_into_component.assert_called_once_with(component) mock_loader_3.load_into_component.assert_called_once_with(component) - def test_load_from_scope_when_both_include_globals_and_passed_scope(self): + def test_load_from_scope_when_both_include_globals_and_passed_scope(self) -> None: component = tanjun.Component() with pytest.raises(ValueError, match="Cannot specify include_globals as True when scope is passed"): component.load_from_scope(include_globals=True, scope={}) # type: ignore - def test_load_from_scope_when_stack_inspection_not_supported(self): + def test_load_from_scope_when_stack_inspection_not_supported(self) -> None: component = tanjun.Component() with ( @@ -220,22 +219,22 @@ def test_load_from_scope_when_stack_inspection_not_supported(self): ): component.load_from_scope() - def test_set_default_app_command_permissions(self): + def test_set_default_app_command_permissions(self) -> None: component = tanjun.Component().set_default_app_command_permissions(3123) assert component.default_app_cmd_permissions == hikari.Permissions(3123) - def test_set_dms_enabled_for_app_cmds(self): + def test_set_dms_enabled_for_app_cmds(self) -> None: component = tanjun.Component().set_dms_enabled_for_app_cmds(False) assert component.dms_enabled_for_app_cmds is False - def test_set_ephemeral_default(self): + def test_set_ephemeral_default(self) -> None: client = tanjun.Component().set_ephemeral_default(False) assert client.defaults_to_ephemeral is False - def test_set_metadata(self): + def test_set_metadata(self) -> None: component = tanjun.Component() key = mock.Mock() value = mock.Mock() @@ -245,7 +244,7 @@ def test_set_metadata(self): assert result is component assert component.metadata[key] is value - def test_set_hooks(self): + def test_set_hooks(self) -> None: mock_hooks = mock.Mock() component = tanjun.Component() @@ -254,7 +253,7 @@ def test_set_hooks(self): assert result is component assert component.hooks is mock_hooks - def test_set_hooks_when_none(self): + def test_set_hooks_when_none(self) -> None: component = tanjun.Component().set_hooks(mock.Mock()) result = component.set_hooks(None) @@ -262,7 +261,7 @@ def test_set_hooks_when_none(self): assert result is component assert component.hooks is None - def test_set_menu_hooks(self): + def test_set_menu_hooks(self) -> None: mock_hooks = mock.Mock() component = tanjun.Component() @@ -271,7 +270,7 @@ def test_set_menu_hooks(self): assert result is component assert component.menu_hooks is mock_hooks - def test_set_menu_hooks_when_none(self): + def test_set_menu_hooks_when_none(self) -> None: component = tanjun.Component().set_menu_hooks(mock.Mock()) result = component.set_menu_hooks(None) @@ -279,7 +278,7 @@ def test_set_menu_hooks_when_none(self): assert result is component assert component.menu_hooks is None - def test_set_message_hooks(self): + def test_set_message_hooks(self) -> None: mock_hooks = mock.Mock() component = tanjun.Component() @@ -288,7 +287,7 @@ def test_set_message_hooks(self): assert result is component assert component.message_hooks is mock_hooks - def test_set_message_hooks_when_none(self): + def test_set_message_hooks_when_none(self) -> None: component = tanjun.Component().set_message_hooks(mock.Mock()) result = component.set_message_hooks(None) @@ -296,7 +295,7 @@ def test_set_message_hooks_when_none(self): assert result is component assert component.message_hooks is None - def test_set_slash_hooks(self): + def test_set_slash_hooks(self) -> None: mock_hooks = mock.Mock() component = tanjun.Component() @@ -305,7 +304,7 @@ def test_set_slash_hooks(self): assert result is component assert component.slash_hooks is mock_hooks - def test_set_slash_hooks_when_none(self): + def test_set_slash_hooks_when_none(self) -> None: component = tanjun.Component().set_slash_hooks(mock.Mock()) result = component.set_slash_hooks(None) @@ -313,7 +312,7 @@ def test_set_slash_hooks_when_none(self): assert result is component assert component.slash_hooks is None - def test_add_check(self): + def test_add_check(self) -> None: mock_check = mock.Mock() component = tanjun.Component() @@ -321,7 +320,7 @@ def test_add_check(self): assert result is component - def test_add_check_when_already_present(self): + def test_add_check_when_already_present(self) -> None: mock_check = mock.Mock() component = tanjun.Component().add_check(mock_check) @@ -330,7 +329,7 @@ def test_add_check_when_already_present(self): assert list(component.checks).count(mock_check) == 1 assert result is component - def test_add_check_with_multiple_checks(self): + def test_add_check_with_multiple_checks(self) -> None: mock_check_1 = mock.Mock() mock_check_2 = mock.Mock() mock_check_3 = mock.Mock() @@ -340,7 +339,7 @@ def test_add_check_with_multiple_checks(self): assert component.checks == [mock_check_2, mock_check_3, mock_check_1] - def test_remove_check(self): + def test_remove_check(self) -> None: component = tanjun.Component().add_check(mock.Mock()) result = component.remove_check(next(iter(component.checks))) @@ -348,11 +347,11 @@ def test_remove_check(self): assert result is component assert not component.checks - def test_remove_check_when_not_present(self): + def test_remove_check_when_not_present(self) -> None: with pytest.raises(ValueError, match=".+"): tanjun.Component().remove_check(mock.Mock()) - def test_with_check(self): + def test_with_check(self) -> None: add_check = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_check": add_check}) @@ -364,7 +363,7 @@ def test_with_check(self): assert result is mock_check add_check.assert_called_once_with(mock_check) - def test_add_client_callback(self): + def test_add_client_callback(self) -> None: mock_callback = mock.Mock() mock_other_callback = mock.Mock() component = tanjun.Component() @@ -374,7 +373,7 @@ def test_add_client_callback(self): assert result is component assert component.get_client_callbacks("aye") == [mock_callback, mock_other_callback] - def test_add_client_callback_when_already_present(self): + def test_add_client_callback_when_already_present(self) -> None: mock_callback = mock.Mock() component = tanjun.Component().add_client_callback("baaa", mock_callback) @@ -383,7 +382,7 @@ def test_add_client_callback_when_already_present(self): assert result is component assert list(component.get_client_callbacks("baaa")).count(mock_callback) == 1 - def test_add_client_callback_when_client_bound(self): + def test_add_client_callback_when_client_bound(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() component = tanjun.Component().bind_client(mock_client) @@ -394,7 +393,7 @@ def test_add_client_callback_when_client_bound(self): assert component.get_client_callbacks("aye") == [mock_callback] mock_client.add_client_callback.assert_called_once_with("aye", mock_callback) - def test_add_client_callback_for_multiple_callbacks(self): + def test_add_client_callback_for_multiple_callbacks(self) -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_callback_3 = mock.Mock() @@ -410,7 +409,7 @@ def test_add_client_callback_for_multiple_callbacks(self): [mock.call("aye", mock_callback_3), mock.call("aye", mock_callback_1)] ) - def test_remove_client_callback(self): + def test_remove_client_callback(self) -> None: mock_callback = mock.Mock() mock_other_callback = mock.Mock() component = ( @@ -423,7 +422,7 @@ def test_remove_client_callback(self): assert component.get_client_callbacks("baye") == [mock_other_callback] - def test_remove_client_callback_when_name_not_found(self): + def test_remove_client_callback_when_name_not_found(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() @@ -432,7 +431,7 @@ def test_remove_client_callback_when_name_not_found(self): mock_client.remove_client_callback.assert_not_called() - def test_remove_client_callback_when_callback_not_found(self): + def test_remove_client_callback_when_callback_not_found(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() mock_other_callback = mock.Mock() @@ -444,7 +443,7 @@ def test_remove_client_callback_when_callback_not_found(self): mock_client.remove_client_callback.assert_not_called() assert component.get_client_callbacks("sex") == [mock_other_callback] - def test_remove_client_callback_when_client_bound(self): + def test_remove_client_callback_when_client_bound(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() component = tanjun.Component().add_client_callback("bay", mock_callback).bind_client(mock_client) @@ -454,7 +453,7 @@ def test_remove_client_callback_when_client_bound(self): assert component.get_client_callbacks("bay") == () mock_client.remove_client_callback.assert_called_once_with("bay", mock_callback) - def test_remove_client_callback_when_no_callbacks_left(self): + def test_remove_client_callback_when_no_callbacks_left(self) -> None: mock_callback = mock.Mock() component = tanjun.Component().add_client_callback("slay", mock_callback) @@ -462,7 +461,7 @@ def test_remove_client_callback_when_no_callbacks_left(self): assert component.get_client_callbacks("slay") == () - def test_with_client_callback(self): + def test_with_client_callback(self) -> None: add_client_callback = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", @@ -476,7 +475,7 @@ def test_with_client_callback(self): assert result is mock_callback add_client_callback.assert_called_once_with("aye", mock_callback) - def test_add_command_for_menu_command(self): + def test_add_command_for_menu_command(self) -> None: mock_command = mock.Mock(tanjun.abc.MenuCommand) add_menu_command = mock.Mock() add_message_command = mock.Mock() @@ -500,7 +499,7 @@ def test_add_command_for_menu_command(self): add_message_command.assert_not_called() add_slash_command.assert_not_called() - def test_add_command_for_message_command(self): + def test_add_command_for_message_command(self) -> None: mock_command = mock.Mock(tanjun.abc.MessageCommand) add_menu_command = mock.Mock() add_message_command = mock.Mock() @@ -524,7 +523,7 @@ def test_add_command_for_message_command(self): add_message_command.assert_called_once_with(mock_command) add_slash_command.assert_not_called() - def test_add_command_for_slash_command(self): + def test_add_command_for_slash_command(self) -> None: mock_command = mock.Mock(tanjun.abc.SlashCommand) add_menu_command = mock.Mock() add_message_command = mock.Mock() @@ -548,7 +547,7 @@ def test_add_command_for_slash_command(self): add_message_command.assert_not_called() add_slash_command.assert_called_once_with(mock_command) - def test_add_command_for_unknown_type(self): + def test_add_command_for_unknown_type(self) -> None: mock_command = mock.Mock() add_menu_command = mock.Mock() add_message_command = mock.Mock() @@ -578,7 +577,7 @@ def test_add_command_for_unknown_type(self): add_message_command.assert_not_called() add_slash_command.assert_not_called() - def test_remove_command_for_menu_command(self): + def test_remove_command_for_menu_command(self) -> None: mock_command = mock.Mock(tanjun.abc.MenuCommand) remove_menu_command = mock.Mock() remove_message_command = mock.Mock() @@ -602,7 +601,7 @@ def test_remove_command_for_menu_command(self): remove_message_command.assert_not_called() remove_slash_command.assert_not_called() - def test_remove_command_for_message_command(self): + def test_remove_command_for_message_command(self) -> None: mock_command = mock.Mock(tanjun.abc.MessageCommand) remove_menu_command = mock.Mock() remove_message_command = mock.Mock() @@ -626,7 +625,7 @@ def test_remove_command_for_message_command(self): remove_message_command.assert_called_once_with(mock_command) remove_slash_command.assert_not_called() - def test_remove_command_for_slash_command(self): + def test_remove_command_for_slash_command(self) -> None: mock_command = mock.Mock(tanjun.abc.SlashCommand) remove_menu_command = mock.Mock() remove_message_command = mock.Mock() @@ -650,7 +649,7 @@ def test_remove_command_for_slash_command(self): remove_message_command.assert_not_called() remove_slash_command.assert_called_once_with(mock_command) - def test_remove_command_for_unknown_type(self): + def test_remove_command_for_unknown_type(self) -> None: mock_command = mock.Mock() remove_menu_command = mock.Mock() remove_message_command = mock.Mock() @@ -677,7 +676,7 @@ def test_remove_command_for_unknown_type(self): remove_message_command.assert_not_called() remove_slash_command.assert_not_called() - def test_with_command(self): + def test_with_command(self) -> None: add_command = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_command": add_command}) @@ -691,7 +690,7 @@ def test_with_command(self): mock_command.copy.assert_not_called() mock_command.wrapped_command.copy.assert_not_called() - def test_with_command_when_follow_wrapped(self): + def test_with_command_when_follow_wrapped(self) -> None: add_command = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_command": add_command}) @@ -704,7 +703,7 @@ def test_with_command_when_follow_wrapped(self): add_command.assert_called_once_with(mock_command) mock_command.copy.assert_not_called() - def test_with_command_when_wrapping_and_follow_wrapped(self): + def test_with_command_when_wrapping_and_follow_wrapped(self) -> None: add_command = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_command": add_command}) @@ -730,7 +729,7 @@ def test_with_command_when_wrapping_and_follow_wrapped(self): mock_command.wrapped_command.copy.assert_not_called() mock_command.wrapped_command.wrapped_command.copy.assert_not_called() - def test_with_command_when_copy(self): + def test_with_command_when_copy(self) -> None: add_command = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_command": add_command}) @@ -743,7 +742,7 @@ def test_with_command_when_copy(self): add_command.assert_called_once_with(mock_command.copy.return_value) mock_command.copy.assert_called_once_with() - def test_with_command_when_wrapping_and_follow_wrapped_and_copy(self): + def test_with_command_when_wrapping_and_follow_wrapped_and_copy(self) -> None: add_command = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_command": add_command}) @@ -760,7 +759,7 @@ def test_with_command_when_wrapping_and_follow_wrapped_and_copy(self): mock_command.copy.assert_called_once_with() mock_command.wrapped_command.copy.assert_called_once_with() - def test_add_menu_command(self): + def test_add_menu_command(self) -> None: mock_command = mock.Mock(type=hikari.CommandType.USER) mock_command.name = "Ok" mock_other_command = mock.Mock(type=hikari.CommandType.MESSAGE) @@ -779,7 +778,7 @@ def test_add_menu_command(self): assert list(result.menu_commands) == [mock_command, mock_other_command, mock_3rd_command] - def test_add_menu_command_when_bound_to_a_client(self): + def test_add_menu_command_when_bound_to_a_client(self) -> None: mock_command = mock.Mock() mock_command.name = "gay" mock_client = mock.Mock() @@ -792,7 +791,7 @@ def test_add_menu_command_when_bound_to_a_client(self): mock_command.bind_component.assert_called_once_with(component) mock_command.bind_client.assert_called_once_with(mock_client) - def test_remove_menu_command(self): + def test_remove_menu_command(self) -> None: mock_command = mock.Mock(type=hikari.CommandType.USER) mock_command.name = "42231" mock_other_command = mock.Mock(type=hikari.CommandType.MESSAGE) @@ -805,14 +804,14 @@ def test_remove_menu_command(self): assert mock_command not in component.menu_commands assert mock_other_command in component.menu_commands - def test_remove_menu_command_when_not_found(self): + def test_remove_menu_command_when_not_found(self) -> None: mock_command = mock.Mock() mock_command.name = "42231" with pytest.raises(ValueError, match=".+"): tanjun.Component().remove_menu_command(mock_command) - def test_with_menu_command(self): + def test_with_menu_command(self) -> None: mock_command = mock.Mock() add_menu_command = mock.Mock() component: tanjun.Component = types.new_class( @@ -825,7 +824,7 @@ def test_with_menu_command(self): add_menu_command.assert_called_once_with(mock_command) mock_command.copy.assert_not_called() - def test_with_menu_command_when_copy(self): + def test_with_menu_command_when_copy(self) -> None: mock_command = mock.Mock() add_menu_command = mock.Mock() component: tanjun.Component = types.new_class( @@ -838,7 +837,7 @@ def test_with_menu_command_when_copy(self): add_menu_command.assert_called_once_with(mock_command.copy.return_value) mock_command.copy.assert_called_once_with() - def test_add_slash_command(self): + def test_add_slash_command(self) -> None: mock_command = mock.Mock() mock_command.name = "gay" component = tanjun.Component() @@ -850,7 +849,7 @@ def test_add_slash_command(self): mock_command.bind_component.assert_called_once_with(component) mock_command.bind_client.assert_not_called() - def test_add_slash_command_when_already_present(self): + def test_add_slash_command_when_already_present(self) -> None: mock_command = mock.Mock() mock_command.name = "gay" component = tanjun.Component().add_slash_command(mock_command) @@ -863,7 +862,7 @@ def test_add_slash_command_when_already_present(self): mock_command.bind_component.assert_not_called() mock_command.bind_client.assert_not_called() - def test_add_slash_command_when_bound_to_a_client(self): + def test_add_slash_command_when_bound_to_a_client(self) -> None: mock_command = mock.Mock() mock_command.name = "gay" mock_client = mock.Mock() @@ -876,7 +875,7 @@ def test_add_slash_command_when_bound_to_a_client(self): mock_command.bind_component.assert_called_once_with(component) mock_command.bind_client.assert_called_once_with(mock_client) - def test_remove_slash_command(self): + def test_remove_slash_command(self) -> None: mock_command = mock.Mock() mock_command.name = "42231" component = tanjun.Component().add_slash_command(mock_command) @@ -886,14 +885,14 @@ def test_remove_slash_command(self): assert result is component assert not component.slash_commands - def test_remove_slash_command_when_not_found(self): + def test_remove_slash_command_when_not_found(self) -> None: mock_command = mock.Mock() mock_command.name = "42231" with pytest.raises(ValueError, match=".+"): tanjun.Component().remove_slash_command(mock_command) - def test_with_slash_command(self): + def test_with_slash_command(self) -> None: mock_command = mock.Mock() add_slash_command = mock.Mock() component: tanjun.Component = types.new_class( @@ -908,7 +907,7 @@ def test_with_slash_command(self): add_slash_command.assert_called_once_with(mock_command) mock_command.copy.assert_not_called() - def test_with_slash_command_when_copy(self): + def test_with_slash_command_when_copy(self) -> None: mock_command = mock.Mock() add_slash_command = mock.Mock() component: tanjun.Component = types.new_class( @@ -923,7 +922,7 @@ def test_with_slash_command_when_copy(self): add_slash_command.assert_called_once_with(mock_command.copy.return_value) mock_command.copy.assert_called_once_with() - def test_add_message_command(self): + def test_add_message_command(self) -> None: component = tanjun.Component(strict=True) mock_command = mock.Mock(names=("a", "b")) @@ -934,7 +933,7 @@ def test_add_message_command(self): mock_command.bind_client.assert_not_called() mock_command.bind_component.assert_called_once_with(component) - def test_add_message_command_when_already_registered(self): + def test_add_message_command_when_already_registered(self) -> None: mock_command = mock.Mock(names=("a", "b")) component = tanjun.Component(strict=True).add_message_command(mock_command) mock_command.reset_mock() @@ -946,7 +945,7 @@ def test_add_message_command_when_already_registered(self): mock_command.bind_component.assert_not_called() assert list(component.message_commands).count(mock_command) == 1 - def test_add_message_command_when_already_client_bound(self): + def test_add_message_command_when_already_client_bound(self) -> None: mock_client = mock.Mock() component = tanjun.Component(strict=True).bind_client(mock_client) mock_command = mock.Mock(names=("a", "b")) @@ -958,7 +957,7 @@ def test_add_message_command_when_already_client_bound(self): mock_command.bind_client.assert_called_once_with(mock_client) mock_command.bind_component.assert_called_once_with(component) - def test_add_message_command_when_strict(self): + def test_add_message_command_when_strict(self) -> None: mock_client = mock.Mock() component = tanjun.Component(strict=True).bind_client(mock_client) mock_command = mock.Mock(names=("a", "B", "fAn")) @@ -976,7 +975,7 @@ def test_add_message_command_when_strict(self): } assert component._message_commands.commands == [mock_command] - def test_add_message_command_when_strict_and_space_in_a_name(self): + def test_add_message_command_when_strict_and_space_in_a_name(self) -> None: component = tanjun.Component(strict=True) mock_command = mock.Mock(names=("a b",)) @@ -986,7 +985,7 @@ def test_add_message_command_when_strict_and_space_in_a_name(self): mock_command.bind_client.assert_not_called() mock_command.bind_component.assert_not_called() - def test_add_message_command_when_strict_and_conflict_found(self): + def test_add_message_command_when_strict_and_conflict_found(self) -> None: component = tanjun.Component(strict=True).add_message_command(mock.Mock(names=("a", "bb"))) mock_command = mock.Mock(names=("a", "bb", "cccc", "dd")) @@ -1002,7 +1001,7 @@ def test_add_message_command_when_strict_and_conflict_found(self): mock_command.bind_client.assert_not_called() mock_command.bind_component.assert_not_called() - def test_remove_message_command(self): + def test_remove_message_command(self) -> None: mock_command = mock.Mock(names=["a"]) component = tanjun.Component().add_message_command(mock_command) @@ -1011,13 +1010,13 @@ def test_remove_message_command(self): assert result is component assert not component.message_commands - def test_remove_message_command_when_not_found(self): + def test_remove_message_command_when_not_found(self) -> None: mock_command = mock.Mock(names=["a"]) with pytest.raises(ValueError, match=".+"): tanjun.Component().remove_message_command(mock_command) - def test_remove_message_command_when_strict(self): + def test_remove_message_command_when_strict(self) -> None: mock_command = mock.Mock(names=("a", "b", "f")) mock_other_command = mock.Mock(names=("meow", "NyAa")) component = ( @@ -1033,7 +1032,7 @@ def test_remove_message_command_when_strict(self): } assert component._message_commands.commands == [mock_other_command] - def test_with_message_command(self): + def test_with_message_command(self) -> None: mock_command = mock.Mock() add_message_command = mock.Mock() component: tanjun.Component = types.new_class( @@ -1047,7 +1046,7 @@ def test_with_message_command(self): assert result is mock_command add_message_command.assert_called_once_with(mock_command) - def test_with_message_command_when_copy(self): + def test_with_message_command_when_copy(self) -> None: mock_command = mock.Mock() add_message_command = mock.Mock() component: tanjun.Component = types.new_class( @@ -1062,7 +1061,7 @@ def test_with_message_command_when_copy(self): add_message_command.assert_called_once_with(mock_command.copy.return_value) mock_command.copy.assert_called_once_with() - def test_add_listener(self): + def test_add_listener(self) -> None: mock_listener = mock.Mock() component = tanjun.Component() @@ -1071,7 +1070,7 @@ def test_add_listener(self): assert result is component assert mock_listener in component.listeners[hikari.MessageCreateEvent] - def test_add_listener_when_other_listener_present(self): + def test_add_listener_when_other_listener_present(self) -> None: mock_listener = mock.Mock() mock_other_listener = mock.Mock() component = tanjun.Component().add_listener(hikari.MessageCreateEvent, mock_other_listener) @@ -1082,7 +1081,7 @@ def test_add_listener_when_other_listener_present(self): assert mock_listener in component.listeners[hikari.MessageCreateEvent] assert mock_other_listener in component.listeners[hikari.MessageCreateEvent] - def test_add_listener_when_client_bound(self): + def test_add_listener_when_client_bound(self) -> None: mock_listener = mock.Mock() mock_client = mock.Mock() component = tanjun.Component().bind_client(mock_client) @@ -1093,7 +1092,7 @@ def test_add_listener_when_client_bound(self): assert mock_listener in component.listeners[hikari.MessageCreateEvent] mock_client.add_listener.assert_called_once_with(hikari.MessageCreateEvent, mock_listener) - def test_add_listener_when_already_present(self): + def test_add_listener_when_already_present(self) -> None: mock_listener = mock.Mock() mock_client = mock.Mock() component = tanjun.Component().bind_client(mock_client).add_listener(hikari.MessageCreateEvent, mock_listener) @@ -1105,7 +1104,7 @@ def test_add_listener_when_already_present(self): assert list(component.listeners[hikari.MessageCreateEvent]).count(mock_listener) == 1 mock_client.add_listener.assert_not_called() - def test_add_listener_for_multiple_listeners(self): + def test_add_listener_for_multiple_listeners(self) -> None: mock_listener_1 = mock.Mock() mock_listener_2 = mock.Mock() mock_listener_3 = mock.Mock() @@ -1121,7 +1120,7 @@ def test_add_listener_for_multiple_listeners(self): [mock.call(hikari.GuildEvent, mock_listener_1), mock.call(hikari.GuildEvent, mock_listener_3)] ) - def test_remove_listener(self): + def test_remove_listener(self) -> None: mock_callback = mock.Mock() component = ( tanjun.Component() @@ -1134,14 +1133,14 @@ def test_remove_listener(self): assert result is component assert mock_callback not in component.listeners[hikari.MessageDeleteEvent] - def test_remove_listener_when_last_listener_for_event_type(self): + def test_remove_listener_when_last_listener_for_event_type(self) -> None: mock_callback = mock.Mock() component = tanjun.Component().add_listener(hikari.GuildEvent, mock_callback) component.remove_listener(hikari.GuildEvent, mock_callback) assert hikari.GuildEvent not in component.listeners - def test_remove_listener_when_client_bound(self): + def test_remove_listener_when_client_bound(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() component = ( @@ -1156,7 +1155,7 @@ def test_remove_listener_when_client_bound(self): assert mock_callback not in component.listeners[hikari.MessageDeleteEvent] mock_client.remove_listener.assert_called_once_with(hikari.MessageDeleteEvent, mock_callback) - def test_remove_listener_when_event_type_not_found(self): + def test_remove_listener_when_event_type_not_found(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() component = tanjun.Component().bind_client(mock_client) @@ -1166,7 +1165,7 @@ def test_remove_listener_when_event_type_not_found(self): mock_client.remove_listener.assert_not_called() - def test_remove_listener_when_listener_not_found(self): + def test_remove_listener_when_listener_not_found(self) -> None: mock_callback = mock.Mock() mock_client = mock.Mock() component = tanjun.Component().bind_client(mock_client).add_listener(hikari.MessageDeleteEvent, mock.Mock()) @@ -1176,7 +1175,7 @@ def test_remove_listener_when_listener_not_found(self): mock_client.remove_listener.assert_not_called() - def test_with_listener(self): + def test_with_listener(self) -> None: add_listener = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_listener": add_listener}) @@ -1188,8 +1187,8 @@ def test_with_listener(self): assert result is mock_listener add_listener.assert_called_once_with(hikari.Event, mock_listener) - def test_with_listener_no_provided_event(self): - async def callback(foo) -> None: # type: ignore + def test_with_listener_no_provided_event(self) -> None: + async def callback(foo) -> None: # type: ignore # noqa: ANN001 ... add_listener = mock.Mock() @@ -1202,7 +1201,7 @@ async def callback(foo) -> None: # type: ignore add_listener.assert_not_called() - def test_with_listener_no_provided_event_callback_has_no_signature(self): + def test_with_listener_no_provided_event_callback_has_no_signature(self) -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -1216,7 +1215,7 @@ def test_with_listener_no_provided_event_callback_has_no_signature(self): add_listener.assert_not_called() - def test_with_listener_missing_positional_event_arg(self): + def test_with_listener_missing_positional_event_arg(self) -> None: async def callback(*, event: hikari.Event, **kwargs: str) -> None: ... add_listener = mock.Mock() @@ -1229,7 +1228,7 @@ async def callback(*, event: hikari.Event, **kwargs: str) -> None: ... add_listener.assert_not_called() - def test_with_listener_no_args(self): + def test_with_listener_no_args(self) -> None: async def callback() -> None: ... add_listener = mock.Mock() @@ -1242,7 +1241,7 @@ async def callback() -> None: ... add_listener.assert_not_called() - def test_with_listener_with_multiple_events(self): + def test_with_listener_with_multiple_events(self) -> None: add_listener = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_listener": add_listener}) @@ -1262,7 +1261,7 @@ def test_with_listener_with_multiple_events(self): ] ) - def test_with_listener_with_type_hint(self): + def test_with_listener_with_type_hint(self) -> None: async def callback(event: hikari.BanCreateEvent) -> None: ... add_listener = mock.Mock() @@ -1275,7 +1274,7 @@ async def callback(event: hikari.BanCreateEvent) -> None: ... assert result is callback add_listener.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_type_hint_in_annotated(self): + def test_with_listener_with_type_hint_in_annotated(self) -> None: async def callback(event: typing.Annotated[hikari.BanCreateEvent, 123, 321]) -> None: ... add_listener = mock.Mock() @@ -1288,7 +1287,7 @@ async def callback(event: typing.Annotated[hikari.BanCreateEvent, 123, 321]) -> assert result is callback add_listener.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_positional_only_type_hint(self): + def test_with_listener_with_positional_only_type_hint(self) -> None: async def callback(event: hikari.BanDeleteEvent, /) -> None: ... add_listener = mock.Mock() @@ -1301,7 +1300,7 @@ async def callback(event: hikari.BanDeleteEvent, /) -> None: ... assert result is callback add_listener.assert_called_once_with(hikari.BanDeleteEvent, callback) - def test_with_listener_with_var_positional_type_hint(self): + def test_with_listener_with_var_positional_type_hint(self) -> None: async def callback(*event: hikari.BanEvent) -> None: ... add_listener = mock.Mock() @@ -1314,9 +1313,9 @@ async def callback(*event: hikari.BanEvent) -> None: ... assert result is callback add_listener.assert_called_once_with(hikari.BanEvent, callback) - def test_with_listener_with_type_hint_typing_union(self): + def test_with_listener_with_type_hint_typing_union(self) -> None: async def callback( - event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] + event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] # noqa: PYI051 ) -> None: ... add_listener = mock.Mock() @@ -1329,7 +1328,7 @@ async def callback( assert result is callback add_listener.assert_has_calls([mock.call(hikari.RoleEvent, callback), mock.call(hikari.GuildEvent, callback)]) - def test_with_listener_with_type_hint_typing_union_nested_annotated(self): + def test_with_listener_with_type_hint_typing_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Union[ @@ -1357,8 +1356,10 @@ async def callback( ] ) - def test_with_listener_with_type_hint_310_union(self): - async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str) -> None: ... + def test_with_listener_with_type_hint_310_union(self) -> None: + async def callback( + event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str, # noqa: PYI051 + ) -> None: ... add_listener = mock.Mock() component: tanjun.Component = types.new_class( @@ -1370,7 +1371,7 @@ async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceE assert result is callback add_listener.assert_has_calls([mock.call(hikari.ShardEvent, callback), mock.call(hikari.VoiceEvent, callback)]) - def test_with_listener_with_type_hint_310_union_nested_annotated(self): + def test_with_listener_with_type_hint_310_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Annotated[hikari.BanEvent | hikari.GuildEvent, 123, 321] | hikari.InviteEvent, True, "meow" @@ -1393,7 +1394,7 @@ async def callback( ] ) - def test_add_on_close(self): + def test_add_on_close(self) -> None: mock_callback = mock.Mock() component = tanjun.Component() @@ -1402,7 +1403,7 @@ def test_add_on_close(self): assert result is component assert list(component._on_close) == [mock_callback] - def test_add_on_close_for_multiple_callbacks(self): + def test_add_on_close_for_multiple_callbacks(self) -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_callback_3 = mock.Mock() @@ -1413,7 +1414,7 @@ def test_add_on_close_for_multiple_callbacks(self): assert result is component assert list(component._on_close) == [mock_callback_2, mock_callback_3, mock_callback_1] - def test_with_on_close(self): + def test_with_on_close(self) -> None: mock_add_on_close = mock.Mock() mock_callback = mock.Mock() @@ -1427,7 +1428,7 @@ class StubComponent(tanjun.Component): assert result is mock_callback mock_add_on_close.assert_called_once_with(mock_callback) - def test_add_on_open(self): + def test_add_on_open(self) -> None: mock_callback = mock.Mock() component = tanjun.Component() @@ -1436,7 +1437,7 @@ def test_add_on_open(self): assert result is component assert list(component._on_open) == [mock_callback] - def test_add_on_open_for_multiple_callbacks(self): + def test_add_on_open_for_multiple_callbacks(self) -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_callback_3 = mock.Mock() @@ -1447,7 +1448,7 @@ def test_add_on_open_for_multiple_callbacks(self): assert result is component assert list(component._on_open) == [mock_callback_3, mock_callback_2, mock_callback_1] - def test_with_on_open(self): + def test_with_on_open(self) -> None: mock_add_on_open = mock.Mock() mock_callback = mock.Mock() @@ -1461,7 +1462,7 @@ class StubComponent(tanjun.Component): assert result is mock_callback mock_add_on_open.assert_called_once_with(mock_callback) - def test_bind_client(self): + def test_bind_client(self) -> None: mock_client = mock.Mock() mock_message_command = mock.Mock(names=["hi"]) mock_other_message_command = mock.Mock(names="meow") @@ -1498,7 +1499,7 @@ def test_bind_client(self): [mock.call("a", mock_callback), mock.call("b", mock_other_callback)] ) - def test_bind_client_when_already_bound(self): + def test_bind_client_when_already_bound(self) -> None: mock_client = mock.Mock() mock_message_command = mock.Mock(names=["echo"]) mock_slash_command = mock.Mock() @@ -1520,7 +1521,7 @@ def test_bind_client_when_already_bound(self): mock_client.add_listener.assert_not_called() mock_client.assert_not_called() - def test_unbind_client(self): + def test_unbind_client(self) -> None: mock_client = mock.Mock( remove_listener=mock.Mock(side_effect=[None, ValueError, LookupError]), remove_client_callback=mock.Mock(side_effect=[None, ValueError, LookupError]), @@ -1560,7 +1561,7 @@ def test_unbind_client(self): ] ) - def test_unbind_client_when_not_bound(self): + def test_unbind_client_when_not_bound(self) -> None: mock_client = mock.Mock() component = ( tanjun.Component().add_listener(hikari.VoiceEvent, mock.Mock()).add_client_callback("32123", mock.Mock()) @@ -1573,7 +1574,7 @@ def test_unbind_client_when_not_bound(self): mock_client.remove_listener.assert_not_called() mock_client.remove_client_callback.assert_not_called() - def test_unbind_client_when_bound_to_different_client(self): + def test_unbind_client_when_bound_to_different_client(self) -> None: mock_client = mock.Mock() mock_other_client = mock.Mock() component = ( @@ -1593,41 +1594,41 @@ def test_unbind_client_when_bound_to_different_client(self): mock_other_client.remove_client_callback.assert_not_called() @pytest.mark.skip(reason="TODO") - def test_check_message_name(self): ... + def test_check_message_name(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_check_message_name_when_not_found(self): ... + def test_check_message_name_when_not_found(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_check_message_name_when_strict(self): ... + def test_check_message_name_when_strict(self) -> None: ... @pytest.mark.skip(reason="TODO") - def test_check_message_name_when_strict_and_not_found(self): ... + def test_check_message_name_when_strict_and_not_found(self) -> None: ... - def test_check_slash_name(self): + def test_check_slash_name(self) -> None: mock_command = mock.Mock() mock_command.name = "test" assert list(tanjun.Component().add_slash_command(mock_command).check_slash_name("test")) == [mock_command] - def test_check_slash_name_when_not_found(self): + def test_check_slash_name_when_not_found(self) -> None: assert list(tanjun.Component().add_slash_command(mock.Mock()).check_slash_name("a")) == [] @pytest.mark.skip(reason="TODO") - def test_execute_autocomplete(self): ... # includes _execute_interaction, and _check_context + def test_execute_autocomplete(self) -> None: ... # includes _execute_interaction, and _check_context @pytest.mark.skip(reason="TODO") - def test_execute_menu(self): ... # includes _execute_interaction, and _check_context + def test_execute_menu(self) -> None: ... # includes _execute_interaction, and _check_context @pytest.mark.skip(reason="TODO") - def test_execute_message(self): ... # Includes _check_message_context and _check_context + def test_execute_message(self) -> None: ... # Includes _check_message_context and _check_context @pytest.mark.skip(reason="TODO") - def test_execute_slash(self): ... # includes _execute_interaction, and _check_context + def test_execute_slash(self) -> None: ... # includes _execute_interaction, and _check_context @pytest.mark.skip(reason="TODO") - def test__load_from_properties(self): ... # Should test this based on todo + def test__load_from_properties(self) -> None: ... # Should test this based on todo - def test_add_schedule(self): + def test_add_schedule(self) -> None: mock_schedule = mock.Mock() component = tanjun.Component() @@ -1637,7 +1638,7 @@ def test_add_schedule(self): assert component.schedules == [mock_schedule] mock_schedule.start.assert_not_called() - def test_add_schedule_when_active(self): + def test_add_schedule_when_active(self) -> None: mock_schedule = mock.Mock() mock_client = mock.Mock(tanjun.Client) mock_loop = mock.Mock() @@ -1651,7 +1652,7 @@ def test_add_schedule_when_active(self): assert component.schedules == [mock_schedule] mock_schedule.start.assert_called_once_with(mock_client.injector, loop=mock_loop) - def test_remove_schedule(self): + def test_remove_schedule(self) -> None: mock_schedule = mock.Mock(is_alive=False) component = tanjun.Component().add_schedule(mock_schedule) assert mock_schedule in component.schedules @@ -1662,7 +1663,7 @@ def test_remove_schedule(self): assert mock_schedule not in component.schedules mock_schedule.stop.assert_not_called() - def test_remove_schedule_when_is_alive(self): + def test_remove_schedule_when_is_alive(self) -> None: mock_loop = mock.Mock() mock_schedule = mock.Mock(is_alive=True) mock__add_task = mock.Mock() @@ -1682,7 +1683,7 @@ class StubComponent(tanjun.Component): mock_loop.create_task.assert_called_once_with(mock_schedule.stop.return_value) mock__add_task.assert_called_once_with(mock_loop.create_task.return_value) - def test_with_schedule(self): + def test_with_schedule(self) -> None: add_schedule = mock.Mock() component: tanjun.Component = types.new_class( "StubComponent", (tanjun.Component,), exec_body=lambda ns: ns.update({"add_schedule": add_schedule}) @@ -1695,7 +1696,7 @@ def test_with_schedule(self): add_schedule.assert_called_once_with(mock_schedule) @pytest.mark.asyncio - async def test_close(self): + async def test_close(self) -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_schedule_1 = mock.AsyncMock(is_alive=True) @@ -1729,7 +1730,7 @@ async def test_close(self): assert component.loop is None @pytest.mark.asyncio - async def test_close_when_unbind(self): + async def test_close_when_unbind(self) -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_schedule_1 = mock.AsyncMock() @@ -1760,14 +1761,14 @@ async def test_close_when_unbind(self): assert component.loop is None @pytest.mark.asyncio - async def test_close_when_not_active(self): + async def test_close_when_not_active(self) -> None: component = tanjun.Component() with pytest.raises(RuntimeError, match="Component isn't active"): await component.close() @pytest.mark.asyncio - async def test_open(self): + async def test_open(self) -> None: mock_callback_1 = mock.Mock() mock_callback_2 = mock.Mock() mock_schedule_1 = mock.Mock() @@ -1795,7 +1796,7 @@ async def test_open(self): mock_schedule_2.start.assert_called_once_with(mock_client.injector, loop=get_running_loop.return_value) @pytest.mark.asyncio - async def test_open_when_already_active(self): + async def test_open_when_already_active(self) -> None: component = tanjun.Component() component._loop = mock.Mock() @@ -1803,19 +1804,19 @@ async def test_open_when_already_active(self): await component.open() @pytest.mark.asyncio - async def test_open_when_not_client_bound(self): + async def test_open_when_not_client_bound(self) -> None: component = tanjun.Component() with pytest.raises(RuntimeError, match="Client isn't bound yet"): await component.open() - def test_make_loader_has_load_property(self): + def test_make_loader_has_load_property(self) -> None: assert tanjun.Component().make_loader(copy=False).has_load is True - def test_make_loader_has_unload_property(self): + def test_make_loader_has_unload_property(self) -> None: assert tanjun.Component().make_loader(copy=False).has_unload is True - def test_make_loader_load(self): + def test_make_loader_load(self) -> None: component = tanjun.Component() loader = component.make_loader(copy=False) mock_client = mock.Mock() @@ -1825,7 +1826,7 @@ def test_make_loader_load(self): assert result is True mock_client.add_component.assert_called_once_with(component) - def test_make_loader_load_when_copy(self): + def test_make_loader_load_when_copy(self) -> None: mock_copy = mock.Mock() mock_client = mock.Mock() @@ -1838,7 +1839,7 @@ class StubComponent(tanjun.Component): mock_copy.assert_called_once_with() mock_client.add_component.assert_called_once_with(mock_copy.return_value) - def test_make_loader_unload(self): + def test_make_loader_unload(self) -> None: mock_client = mock.Mock() loader = tanjun.Component(name="trans catgirls").make_loader() diff --git a/tests/test_components_future_annotations.py b/tests/test_components_future_annotations.py index 08ee4eb00..62c2545ea 100644 --- a/tests/test_components_future_annotations.py +++ b/tests/test_components_future_annotations.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -42,8 +41,8 @@ class TestComponent: - def test_with_listener_no_provided_event(self): - async def callback(foo) -> None: # type: ignore + def test_with_listener_no_provided_event(self) -> None: + async def callback(foo) -> None: # type: ignore # noqa: ANN001 ... add_listener = mock.Mock() @@ -56,7 +55,7 @@ async def callback(foo) -> None: # type: ignore add_listener.assert_not_called() - def test_with_listener_no_provided_event_callback_has_no_signature(self): + def test_with_listener_no_provided_event_callback_has_no_signature(self) -> None: with pytest.raises(ValueError, match=".+"): inspect.Signature.from_callable(int) @@ -70,7 +69,7 @@ def test_with_listener_no_provided_event_callback_has_no_signature(self): add_listener.assert_not_called() - def test_with_listener_with_type_hint(self): + def test_with_listener_with_type_hint(self) -> None: async def callback(event: hikari.BanCreateEvent) -> None: ... add_listener = mock.Mock() @@ -83,7 +82,7 @@ async def callback(event: hikari.BanCreateEvent) -> None: ... assert result is callback add_listener.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_type_hint_in_annotated(self): + def test_with_listener_with_type_hint_in_annotated(self) -> None: async def callback(event: typing.Annotated[hikari.BanCreateEvent, 123, 321]) -> None: ... add_listener = mock.Mock() @@ -96,7 +95,7 @@ async def callback(event: typing.Annotated[hikari.BanCreateEvent, 123, 321]) -> assert result is callback add_listener.assert_called_once_with(hikari.BanCreateEvent, callback) - def test_with_listener_with_positional_only_type_hint(self): + def test_with_listener_with_positional_only_type_hint(self) -> None: async def callback(event: hikari.BanDeleteEvent, /) -> None: ... add_listener = mock.Mock() @@ -109,7 +108,7 @@ async def callback(event: hikari.BanDeleteEvent, /) -> None: ... assert result is callback add_listener.assert_called_once_with(hikari.BanDeleteEvent, callback) - def test_with_listener_with_var_positional_type_hint(self): + def test_with_listener_with_var_positional_type_hint(self) -> None: async def callback(*event: hikari.BanEvent) -> None: ... add_listener = mock.Mock() @@ -122,9 +121,9 @@ async def callback(*event: hikari.BanEvent) -> None: ... assert result is callback add_listener.assert_called_once_with(hikari.BanEvent, callback) - def test_with_listener_with_type_hint_typing_union(self): + def test_with_listener_with_type_hint_typing_union(self) -> None: async def callback( - event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] + event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] # noqa: PYI051 ) -> None: ... add_listener = mock.Mock() @@ -137,7 +136,7 @@ async def callback( assert result is callback add_listener.assert_has_calls([mock.call(hikari.RoleEvent, callback), mock.call(hikari.GuildEvent, callback)]) - def test_with_listener_with_type_hint_typing_union_nested_annotated(self): + def test_with_listener_with_type_hint_typing_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Union[ @@ -165,8 +164,10 @@ async def callback( ] ) - def test_with_listener_with_type_hint_310_union(self): - async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str) -> None: ... + def test_with_listener_with_type_hint_310_union(self) -> None: + async def callback( + event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str, # noqa: PYI051 + ) -> None: ... add_listener = mock.Mock() component: tanjun.Component = types.new_class( @@ -178,7 +179,7 @@ async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceE assert result is callback add_listener.assert_has_calls([mock.call(hikari.ShardEvent, callback), mock.call(hikari.VoiceEvent, callback)]) - def test_with_listener_with_type_hint_310_union_nested_annotated(self): + def test_with_listener_with_type_hint_310_union_nested_annotated(self) -> None: async def callback( event: typing.Annotated[ typing.Annotated[hikari.BanEvent | hikari.GuildEvent, 123, 321] | hikari.InviteEvent, True, "meow" diff --git a/tests/test_conversion.py b/tests/test_conversion.py index dcd4a2be7..3f73ed7ad 100644 --- a/tests/test_conversion.py +++ b/tests/test_conversion.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -48,13 +47,13 @@ class TestBaseConverter: @pytest.mark.skip(reason="Not finalised yet") - def test_check_client(self): ... + def test_check_client(self) -> None: ... - def test_async_caches_property(self): + def test_async_caches_property(self) -> None: with pytest.warns(DeprecationWarning, match="Use .caches instead"): assert tanjun.conversion.BaseConverter().async_caches == [] # pyright: ignore[reportDeprecated] - def test_cache_components_property(self): + def test_cache_components_property(self) -> None: with pytest.warns(DeprecationWarning, match="Use .caches instead"): components = tanjun.conversion.BaseConverter().cache_components # pyright: ignore[reportDeprecated] @@ -174,10 +173,10 @@ def test_caches_property( self, obj: tanjun.conversion.BaseConverter, expected: list[tuple[typing.Any, hikari.api.CacheComponents, hikari.Intents]], - ): + ) -> None: assert obj.caches == expected - def test_intents_property(self): + def test_intents_property(self) -> None: with pytest.warns(DeprecationWarning, match="Use .caches instead"): assert tanjun.conversion.BaseConverter().intents is hikari.Intents.NONE # pyright: ignore[reportDeprecated] @@ -197,7 +196,7 @@ def test_intents_property(self): (tanjun.to_voice_state, True), ], ) - def test_requires_cache_property(self, obj: tanjun.conversion.BaseConverter, expected: bool): + def test_requires_cache_property(self, obj: tanjun.conversion.BaseConverter, expected: bool) -> None: assert obj.requires_cache is expected @@ -297,11 +296,11 @@ def test_caches_property( allowed_types: list[hikari.ChannelType], include_dms: bool, expected: list[tuple[typing.Any, hikari.api.CacheComponents, hikari.Intents]], - ): + ) -> None: assert tanjun.conversion.ToChannel(allowed_types=allowed_types, include_dms=include_dms).caches == expected @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_channel_cache = mock.AsyncMock() mock_dm_cache = mock.AsyncMock() @@ -319,7 +318,7 @@ async def test___call___when_cached(self): mock_thread_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_hikari_cache_returns_allowed_type(self): + async def test___call___when_hikari_cache_returns_allowed_type(self) -> None: mock_context = mock.Mock() mock_context.cache.get_guild_channel.return_value.type = hikari.ChannelType.GUILD_STAGE converter = tanjun.conversion.ToChannel(allowed_types=[hikari.PermissibleGuildChannel]) @@ -331,7 +330,7 @@ async def test___call___when_hikari_cache_returns_allowed_type(self): mock_context.rest.fetch_channel.assert_not_called() @pytest.mark.asyncio - async def test___call___when_hikari_cache_returns_unallowed_type(self): + async def test___call___when_hikari_cache_returns_unallowed_type(self) -> None: mock_context = mock.Mock() mock_context.cache.get_guild_channel.return_value.type = hikari.ChannelType.GUILD_NEWS_THREAD converter = tanjun.conversion.ToChannel(allowed_types=[hikari.PermissibleGuildChannel]) @@ -349,7 +348,7 @@ async def test___call___when_hikari_cache_returns_unallowed_type(self): mock_context.rest.fetch_channel.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_cached_and_no_async_cache(self): + async def test___call___when_not_cached_and_no_async_cache(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None @@ -360,7 +359,7 @@ async def test___call___when_not_cached_and_no_async_cache(self): mock_context.rest.fetch_channel.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_cacheless_and_no_async_cache(self): + async def test___call___when_cacheless_and_no_async_cache(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -370,7 +369,7 @@ async def test___call___when_cacheless_and_no_async_cache(self): mock_context.rest.fetch_channel.assert_awaited_once_with(222) @pytest.mark.asyncio - async def test___call___when_rest_returns_allowed_type(self): + async def test___call___when_rest_returns_allowed_type(self) -> None: mock_context = mock.Mock(cache=None, rest=mock.AsyncMock()) mock_context.rest.fetch_channel.return_value.type = hikari.ChannelType.GUILD_PUBLIC_THREAD converter = tanjun.conversion.ToChannel(allowed_types=[hikari.GuildThreadChannel, hikari.GuildVoiceChannel]) @@ -381,7 +380,7 @@ async def test___call___when_rest_returns_allowed_type(self): mock_context.rest.fetch_channel.assert_awaited_once_with(43234123) @pytest.mark.asyncio - async def test___call___when_rest_returns_unallowed_type(self): + async def test___call___when_rest_returns_unallowed_type(self) -> None: mock_context = mock.Mock(cache=None, rest=mock.AsyncMock()) mock_context.rest.fetch_channel.return_value.type = hikari.ChannelType.DM converter = tanjun.conversion.ToChannel(allowed_types=[hikari.GuildThreadChannel, hikari.GuildVoiceChannel]) @@ -398,7 +397,7 @@ async def test___call___when_rest_returns_unallowed_type(self): mock_context.rest.fetch_channel.assert_awaited_once_with(7645634) @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_channel_cache_hit(self): + async def test___call___when_not_cached_and_async_channel_cache_hit(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -417,7 +416,7 @@ async def test___call___when_not_cached_and_async_channel_cache_hit(self): mock_thread_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___async_channel_cache_returns_allowed_type(self): + async def test___call___async_channel_cache_returns_allowed_type(self) -> None: mock_context = mock.Mock(cache=None) mock_channel_cache = mock.AsyncMock() mock_channel_cache.get.return_value.type = hikari.ChannelType.GUILD_NEWS_THREAD @@ -436,7 +435,7 @@ async def test___call___async_channel_cache_returns_allowed_type(self): mock_context.rest.fetch_channel.assert_not_called() @pytest.mark.asyncio - async def test___call___async_channel_cache_returns_unallowed_type(self): + async def test___call___async_channel_cache_returns_unallowed_type(self) -> None: mock_context = mock.Mock(cache=None) mock_channel_cache = mock.AsyncMock() mock_channel_cache.get.return_value.type = hikari.ChannelType.GUILD_PUBLIC_THREAD @@ -459,7 +458,7 @@ async def test___call___async_channel_cache_returns_unallowed_type(self): @pytest.mark.parametrize("side_effect", [tanjun.dependencies.CacheMissError, tanjun.dependencies.EntryNotFound]) @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_thread_cache_hit(self, side_effect: type[Exception]): + async def test___call___when_not_cached_and_async_thread_cache_hit(self, side_effect: type[Exception]) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -479,7 +478,7 @@ async def test___call___when_not_cached_and_async_thread_cache_hit(self, side_ef mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_async_thread_cache_returns_allowed_type(self): + async def test___call___when_async_thread_cache_returns_allowed_type(self) -> None: mock_context = mock.Mock(cache=None, rest=mock.AsyncMock()) mock_thread_cache = mock.AsyncMock() mock_thread_cache.get.return_value.type = hikari.ChannelType.GUILD_VOICE @@ -494,7 +493,7 @@ async def test___call___when_async_thread_cache_returns_allowed_type(self): mock_context.rest.fetch_channel.assert_not_called() @pytest.mark.asyncio - async def test___call___when_async_thread_cache_returns_unallowed_type(self): + async def test___call___when_async_thread_cache_returns_unallowed_type(self) -> None: mock_context = mock.Mock(cache=None, rest=mock.AsyncMock()) mock_thread_cache = mock.AsyncMock() mock_thread_cache.get.return_value.type = hikari.ChannelType.GROUP_DM @@ -516,7 +515,7 @@ async def test___call___when_async_thread_cache_returns_unallowed_type(self): @pytest.mark.parametrize("side_effect", [tanjun.dependencies.CacheMissError, tanjun.dependencies.EntryNotFound]) @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_dm_cache_hit(self, side_effect: type[Exception]): + async def test___call___when_not_cached_and_async_dm_cache_hit(self, side_effect: type[Exception]) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -537,7 +536,7 @@ async def test___call___when_not_cached_and_async_dm_cache_hit(self, side_effect mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_async_dm_cache_returns_allowed_type(self): + async def test___call___when_async_dm_cache_returns_allowed_type(self) -> None: mock_context = mock.Mock(cache=None, rest=mock.AsyncMock()) mock_dm_cache = mock.AsyncMock() mock_dm_cache.get.return_value.type = hikari.ChannelType.DM @@ -550,7 +549,7 @@ async def test___call___when_async_dm_cache_returns_allowed_type(self): mock_dm_cache.get.assert_awaited_once_with(431123321) @pytest.mark.asyncio - async def test___call___when_async_dm_cache_returns_unallowed_type(self): + async def test___call___when_async_dm_cache_returns_unallowed_type(self) -> None: mock_context = mock.Mock(cache=None, rest=mock.AsyncMock()) mock_dm_cache = mock.AsyncMock() mock_dm_cache.get.return_value.type = hikari.ChannelType.GROUP_DM @@ -563,7 +562,7 @@ async def test___call___when_async_dm_cache_returns_unallowed_type(self): mock_dm_cache.get.assert_awaited_once_with(32123123) @pytest.mark.asyncio - async def test___call___when_not_cached_async_cache_raises_not_found_and_not_including_dms(self): + async def test___call___when_not_cached_async_cache_raises_not_found_and_not_including_dms(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -589,7 +588,7 @@ async def test___call___when_not_cached_async_cache_raises_not_found_and_not_inc mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_channel_cache_hit(self): + async def test___call___when_cacheless_and_async_channel_cache_hit(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None mock_channel_cache = mock.AsyncMock() @@ -608,7 +607,7 @@ async def test___call___when_cacheless_and_async_channel_cache_hit(self): @pytest.mark.parametrize("side_effect", [tanjun.dependencies.CacheMissError, tanjun.dependencies.EntryNotFound]) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_thread_cache_hit(self, side_effect: type[Exception]): + async def test___call___when_cacheless_and_async_thread_cache_hit(self, side_effect: type[Exception]) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None mock_channel_cache = mock.AsyncMock() @@ -628,7 +627,7 @@ async def test___call___when_cacheless_and_async_thread_cache_hit(self, side_eff @pytest.mark.parametrize("side_effect", [tanjun.dependencies.CacheMissError, tanjun.dependencies.EntryNotFound]) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_dm_cache_hit(self, side_effect: type[Exception]): + async def test___call___when_cacheless_and_async_dm_cache_hit(self, side_effect: type[Exception]) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None mock_channel_cache = mock.AsyncMock() @@ -648,7 +647,9 @@ async def test___call___when_cacheless_and_async_dm_cache_hit(self, side_effect: mock_thread_cache.get.assert_awaited_once_with(222) @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_channel_caches_raise_not_found_and_not_including_dms(self): + async def test___call___when_not_cached_and_async_channel_caches_raise_not_found_and_not_including_dms( + self, + ) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -674,7 +675,7 @@ async def test___call___when_not_cached_and_async_channel_caches_raise_not_found mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_not_cached_and_all_async_caches_raise_not_found(self): + async def test___call___when_not_cached_and_all_async_caches_raise_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -700,7 +701,7 @@ async def test___call___when_not_cached_and_all_async_caches_raise_not_found(sel mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_caches_all_raise_cache_miss_error(self): + async def test___call___when_not_cached_and_async_caches_all_raise_cache_miss_error(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_channel_cache = mock.AsyncMock() @@ -722,7 +723,7 @@ async def test___call___when_not_cached_and_async_caches_all_raise_cache_miss_er mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_not_including_dms(self): + async def test___call___when_not_including_dms(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.rest.fetch_channel.return_value = mock.Mock( hikari.GuildChannel, type=hikari.ChannelType.GUILD_NEWS_THREAD @@ -747,7 +748,7 @@ async def test___call___when_not_including_dms(self): mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_not_including_dms_and_rest_returns_dm_channel(self): + async def test___call___when_not_including_dms_and_rest_returns_dm_channel(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.rest.fetch_channel.return_value = mock.Mock(hikari.DMChannel, type=hikari.ChannelType.DM) mock_context.cache.get_guild_channel.return_value = None @@ -774,7 +775,7 @@ async def test___call___when_not_including_dms_and_rest_returns_dm_channel(self) mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_not_found_and_not_including_dms(self): + async def test___call___when_not_found_and_not_including_dms(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_context.rest.fetch_channel.side_effect = hikari.NotFoundError(url="gey", headers={}, raw_body="") @@ -802,7 +803,7 @@ async def test___call___when_not_found_and_not_including_dms(self): mock_thread_cache.get.assert_awaited_once_with(12222) @pytest.mark.asyncio - async def test___call___when_not_found(self): + async def test___call___when_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild_channel.return_value = None mock_context.rest.fetch_channel.side_effect = hikari.NotFoundError(url="gey", headers={}, raw_body="") @@ -831,7 +832,7 @@ async def test___call___when_not_found(self): class TestToEmoji: @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -843,7 +844,7 @@ async def test___call___when_cached(self): mock_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_async_cached(self): + async def test___call___when_async_cached(self) -> None: mock_context = mock.Mock() mock_context.cache.get_emoji.return_value = None mock_cache = mock.AsyncMock() @@ -856,7 +857,7 @@ async def test___call___when_async_cached(self): mock_cache.get.assert_awaited_once_with(6655) @pytest.mark.asyncio - async def test___call___when_not_cached_and_guild_bound(self): + async def test___call___when_not_cached_and_guild_bound(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_emoji.return_value = None mock_cache = mock.AsyncMock() @@ -870,7 +871,7 @@ async def test___call___when_not_cached_and_guild_bound(self): mock_cache.get.assert_awaited_once_with(54123) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -880,7 +881,7 @@ async def test___call___when_cacheless(self): mock_context.rest.fetch_emoji.assert_awaited_once_with(mock_context.guild_id, 7623421) @pytest.mark.asyncio - async def test___call___when_rest_async_cache_not_found(self): + async def test___call___when_rest_async_cache_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_emoji.return_value = None mock_cache = mock.AsyncMock() @@ -894,7 +895,7 @@ async def test___call___when_rest_async_cache_not_found(self): mock_cache.get.assert_awaited_once_with(123321) @pytest.mark.asyncio - async def test___call___when_rest_not_found(self): + async def test___call___when_rest_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_emoji.return_value = None mock_context.rest.fetch_emoji.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -909,7 +910,7 @@ async def test___call___when_rest_not_found(self): mock_cache.get.assert_awaited_once_with(123321) @pytest.mark.asyncio - async def test___call___when_not_cached_and_not_guild_bound(self): + async def test___call___when_not_cached_and_not_guild_bound(self) -> None: mock_context = mock.Mock(guild_id=None) mock_context.cache.get_emoji.return_value = None mock_cache = mock.AsyncMock() @@ -925,7 +926,7 @@ async def test___call___when_not_cached_and_not_guild_bound(self): class TestToGuild: @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -937,7 +938,7 @@ async def test___call___when_cached(self): mock_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_async_cached(self): + async def test___call___when_async_cached(self) -> None: mock_context = mock.Mock() mock_context.cache.get_guild.return_value = None mock_cache = mock.AsyncMock() @@ -950,7 +951,7 @@ async def test___call___when_async_cached(self): mock_cache.get.assert_awaited_once_with(1234) @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild.return_value = None mock_cache = mock.AsyncMock() @@ -964,7 +965,7 @@ async def test___call___when_not_cached(self): mock_cache.get.assert_awaited_once_with(54234) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -974,7 +975,7 @@ async def test___call___when_cacheless(self): mock_context.rest.fetch_guild.assert_awaited_once_with(2222) @pytest.mark.asyncio - async def test___call___when_async_not_found(self): + async def test___call___when_async_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild.return_value = None mock_context.rest.fetch_guild.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -989,7 +990,7 @@ async def test___call___when_async_not_found(self): mock_cache.get.assert_awaited_once_with(54234) @pytest.mark.asyncio - async def test___call___when_rest_not_found(self): + async def test___call___when_rest_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_guild.return_value = None mock_context.rest.fetch_guild.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -1006,7 +1007,7 @@ async def test___call___when_rest_not_found(self): class TestToInvite: @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1018,7 +1019,7 @@ async def test___call___when_cached(self): mock_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_invite.return_value = None mock_cache = mock.AsyncMock() @@ -1032,7 +1033,7 @@ async def test___call___when_not_cached(self): mock_cache.get.assert_awaited_once_with("fffff") @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -1042,7 +1043,7 @@ async def test___call___when_cacheless(self): mock_context.rest.fetch_invite.assert_awaited_once_with("123321") @pytest.mark.asyncio - async def test___call___when_async_cache_not_found(self): + async def test___call___when_async_cache_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_invite.return_value = None mock_cache = mock.AsyncMock() @@ -1056,7 +1057,7 @@ async def test___call___when_async_cache_not_found(self): mock_cache.get.assert_awaited_once_with("sasdasd") @pytest.mark.asyncio - async def test___call___when_rest_not_found(self): + async def test___call___when_rest_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_invite.return_value = None mock_context.rest.fetch_invite.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -1073,7 +1074,7 @@ async def test___call___when_rest_not_found(self): class TestToInviteWithMetadata: @pytest.mark.asyncio - async def test___call__(self): + async def test___call__(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1084,7 +1085,7 @@ async def test___call__(self): mock_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_async_hit(self): + async def test___call___when_async_hit(self) -> None: mock_context = mock.Mock() mock_context.cache.get_invite.return_value = None mock_cache = mock.AsyncMock() @@ -1096,7 +1097,7 @@ async def test___call___when_async_hit(self): mock_cache.get.assert_awaited_once_with("asdbasd", default=None) @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock() mock_context.cache.get_invite.return_value = None mock_cache = mock.AsyncMock() @@ -1109,7 +1110,7 @@ async def test___call___when_not_cached(self): mock_cache.get.assert_called_once_with("dsds", default=None) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(cache=None) with pytest.raises(ValueError, match="Couldn't find invite"): @@ -1118,7 +1119,7 @@ async def test___call___when_cacheless(self): class TestToMember: @pytest.mark.asyncio - async def test___call___when_in_a_dm(self): + async def test___call___when_in_a_dm(self) -> None: mock_context = mock.Mock(guild_id=None) mock_cache = mock.AsyncMock() @@ -1131,7 +1132,7 @@ async def test___call___when_in_a_dm(self): mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_id_falls_back_to_lookup_by_name(self): + async def test___call___when_not_id_falls_back_to_lookup_by_name(self) -> None: mock_context = mock.AsyncMock() mock_result = mock.Mock() mock_context.rest.search_members.return_value = [mock_result] @@ -1146,7 +1147,7 @@ async def test___call___when_not_id_falls_back_to_lookup_by_name(self): mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_id_falls_back_to_lookup_by_name_returns_nothing(self): + async def test___call___when_not_id_falls_back_to_lookup_by_name_returns_nothing(self) -> None: mock_context = mock.AsyncMock() mock_context.rest.search_members.return_value = [] mock_cache = mock.AsyncMock() @@ -1160,7 +1161,7 @@ async def test___call___when_not_id_falls_back_to_lookup_by_name_returns_nothing mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1173,7 +1174,7 @@ async def test___call___when_cached(self): mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_cache_hit(self): + async def test___call___when_not_cached_and_async_cache_hit(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_member.return_value = None mock_cache = mock.AsyncMock() @@ -1187,7 +1188,7 @@ async def test___call___when_not_cached_and_async_cache_hit(self): mock_cache.get_from_guild.assert_called_once_with(mock_context.guild_id, 5123123) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_cache_hit(self): + async def test___call___when_cacheless_and_async_cache_hit(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None mock_cache = mock.AsyncMock() @@ -1200,7 +1201,7 @@ async def test___call___when_cacheless_and_async_cache_hit(self): mock_cache.get_from_guild.assert_called_once_with(mock_context.guild_id, 5123123) @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_member.return_value = None mock_cache = mock.AsyncMock() @@ -1215,7 +1216,7 @@ async def test___call___when_not_cached(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 5123123) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -1226,7 +1227,7 @@ async def test___call___when_cacheless(self): mock_context.rest.search_members.assert_not_called() @pytest.mark.asyncio - async def test___call___when_mock_cache_raises_not_found(self): + async def test___call___when_mock_cache_raises_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_member.return_value = None mock_cache = mock.AsyncMock() @@ -1241,7 +1242,7 @@ async def test___call___when_mock_cache_raises_not_found(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 5123123) @pytest.mark.asyncio - async def test___call___when_rest_raises_not_found(self): + async def test___call___when_rest_raises_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_member.return_value = None mock_context.rest.fetch_member.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -1256,7 +1257,7 @@ async def test___call___when_rest_raises_not_found(self): class TestToPresence: @pytest.mark.asyncio - async def test___call__(self): + async def test___call__(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1267,7 +1268,7 @@ async def test___call__(self): mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_in_a_dm(self): + async def test___call___when_in_a_dm(self) -> None: mock_cache = mock.AsyncMock() mock_context = mock.Mock(guild_id=None) with pytest.raises(ValueError, match="Cannot get a presence from a DM channel"): @@ -1277,7 +1278,7 @@ async def test___call___when_in_a_dm(self): mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_cache_hit(self): + async def test___call___when_not_cached_and_async_cache_hit(self) -> None: mock_context = mock.Mock() mock_context.cache.get_presence.return_value = None mock_cache = mock.AsyncMock() @@ -1289,7 +1290,7 @@ async def test___call___when_not_cached_and_async_cache_hit(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 543123, default=None) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_cache_hit(self): + async def test___call___when_cacheless_and_async_cache_hit(self) -> None: mock_context = mock.Mock() mock_context.cache = None mock_cache = mock.AsyncMock() @@ -1300,7 +1301,7 @@ async def test___call___when_cacheless_and_async_cache_hit(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 543123, default=None) @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_cache_returns_none(self): + async def test___call___when_not_cached_and_async_cache_returns_none(self) -> None: mock_context = mock.Mock() mock_context.cache.get_presence.return_value = None mock_cache = mock.AsyncMock() @@ -1313,7 +1314,7 @@ async def test___call___when_not_cached_and_async_cache_returns_none(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 543123, default=None) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock() mock_context.cache = None @@ -1323,7 +1324,7 @@ async def test___call___when_cacheless(self): class TestToUser: @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1335,7 +1336,7 @@ async def test___call___when_cached(self): mock_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_async_cached(self): + async def test___call___when_async_cached(self) -> None: mock_context = mock.Mock() mock_context.cache.get_user.return_value = None mock_cache = mock.AsyncMock() @@ -1348,7 +1349,7 @@ async def test___call___when_async_cached(self): mock_cache.get.assert_awaited_once_with(123) @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_user.return_value = None mock_cache = mock.AsyncMock() @@ -1362,7 +1363,7 @@ async def test___call___when_not_cached(self): mock_cache.get.assert_awaited_once_with(55) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -1372,7 +1373,7 @@ async def test___call___when_cacheless(self): mock_context.rest.fetch_user.assert_awaited_once_with(12343) @pytest.mark.asyncio - async def test___call___when_not_found(self): + async def test___call___when_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_user.return_value = None mock_context.rest.fetch_user.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -1387,7 +1388,7 @@ async def test___call___when_not_found(self): mock_cache.get.assert_awaited_once_with(55) @pytest.mark.asyncio - async def test___call___when_not_found_in_async_cache(self): + async def test___call___when_not_found_in_async_cache(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_user.return_value = None mock_cache = mock.AsyncMock() @@ -1403,7 +1404,7 @@ async def test___call___when_not_found_in_async_cache(self): class TestToMessage: @pytest.mark.asyncio - async def test___call___when_cached(self): + async def test___call___when_cached(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1415,7 +1416,7 @@ async def test___call___when_cached(self): mock_cache.get.assert_not_called() @pytest.mark.asyncio - async def test___call___when_async_cached(self): + async def test___call___when_async_cached(self) -> None: mock_context = mock.Mock() mock_context.cache.get_message.return_value = None mock_cache = mock.AsyncMock() @@ -1428,7 +1429,7 @@ async def test___call___when_async_cached(self): mock_cache.get.assert_awaited_once_with(123) @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_message.return_value = None mock_cache = mock.AsyncMock() @@ -1442,7 +1443,7 @@ async def test___call___when_not_cached(self): mock_cache.get.assert_awaited_once_with(55) @pytest.mark.asyncio - async def test___call___when_cacheless(self): + async def test___call___when_cacheless(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache = None @@ -1452,7 +1453,7 @@ async def test___call___when_cacheless(self): mock_context.rest.fetch_message.assert_awaited_once_with(12, 34) @pytest.mark.asyncio - async def test___call___when_not_found(self): + async def test___call___when_not_found(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_message.return_value = None mock_context.rest.fetch_message.side_effect = hikari.NotFoundError(url="grey", headers={}, raw_body="") @@ -1467,7 +1468,7 @@ async def test___call___when_not_found(self): mock_cache.get.assert_awaited_once_with(55) @pytest.mark.asyncio - async def test___call___when_not_found_in_async_cache(self): + async def test___call___when_not_found_in_async_cache(self) -> None: mock_context = mock.Mock(rest=mock.AsyncMock()) mock_context.cache.get_message.return_value = None mock_cache = mock.AsyncMock() @@ -1483,7 +1484,7 @@ async def test___call___when_not_found_in_async_cache(self): class TestToVoiceState: @pytest.mark.asyncio - async def test___call__(self): + async def test___call__(self) -> None: mock_context = mock.Mock() mock_cache = mock.AsyncMock() @@ -1494,7 +1495,7 @@ async def test___call__(self): mock_cache.get_from_guild.assert_not_called() @pytest.mark.asyncio - async def test___call___when_not_cached_and_async_cache_hit(self): + async def test___call___when_not_cached_and_async_cache_hit(self) -> None: mock_context = mock.Mock() mock_context.cache.get_voice_state.return_value = None mock_cache = mock.AsyncMock() @@ -1506,7 +1507,7 @@ async def test___call___when_not_cached_and_async_cache_hit(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 54123, default=None) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_cache_hit(self): + async def test___call___when_cacheless_and_async_cache_hit(self) -> None: mock_context = mock.Mock(cache=None) mock_cache = mock.AsyncMock() @@ -1516,7 +1517,7 @@ async def test___call___when_cacheless_and_async_cache_hit(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 65234, default=None) @pytest.mark.asyncio - async def test___call___when_not_cached(self): + async def test___call___when_not_cached(self) -> None: mock_context = mock.Mock() mock_context.cache.get_voice_state.return_value = None mock_cache = mock.AsyncMock() @@ -1528,7 +1529,7 @@ async def test___call___when_not_cached(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 54123, default=None) @pytest.mark.asyncio - async def test___call___when_cacheless_and_async_cache_returns_none(self): + async def test___call___when_cacheless_and_async_cache_returns_none(self) -> None: mock_context = mock.Mock(cache=None) mock_cache = mock.AsyncMock() mock_cache.get_from_guild.return_value = None @@ -1539,14 +1540,14 @@ async def test___call___when_cacheless_and_async_cache_returns_none(self): mock_cache.get_from_guild.assert_awaited_once_with(mock_context.guild_id, 65234, default=None) @pytest.mark.asyncio - async def test___call___when_cacheless_and_no_async_cache(self): + async def test___call___when_cacheless_and_no_async_cache(self) -> None: mock_context = mock.Mock(cache=None) with pytest.raises(ValueError, match="Voice state couldn't be found for current guild"): await tanjun.to_voice_state(65234, mock_context) @pytest.mark.asyncio - async def test___call___when_in_a_dm(self): + async def test___call___when_in_a_dm(self) -> None: mock_context = mock.Mock(guild_id=None) with pytest.raises(ValueError, match="Cannot get a voice state from a DM channel"): @@ -1570,7 +1571,7 @@ async def test___call___when_in_a_dm(self): ("", 22222), ], ) -def test_parse_snowflake(value: str | int, result: int): +def test_parse_snowflake(value: str | int, result: int) -> None: assert tanjun.conversion.parse_snowflake(value) == result @@ -1593,12 +1594,12 @@ def test_parse_snowflake(value: str | int, result: int): "", ], ) -def test_parse_snowflake_with_invalid_value(value: int | str): +def test_parse_snowflake_with_invalid_value(value: int | str) -> None: with pytest.raises(ValueError, match="abcas"): tanjun.conversion.parse_snowflake(value, message="abcas") -def test_search_snowflakes(): +def test_search_snowflakes() -> None: string = ( f"123 <@!> {TOO_LARGE_SF} <@54123><@!56123><> 123.312 <@> slurp <:shabat>" f" <#123321>, sleeper {TOO_SMALL_SF} <:gaaa:431123> " @@ -1608,7 +1609,7 @@ def test_search_snowflakes(): @pytest.mark.parametrize(("value", "result"), [("43123", 43123), (1233211, 1233211), ("<#12333>", 12333)]) -def test_parse_channel_id(value: str | int, result: int): +def test_parse_channel_id(value: str | int, result: int) -> None: assert tanjun.conversion.parse_channel_id(value) == result @@ -1632,12 +1633,12 @@ def test_parse_channel_id(value: str | int, result: int): str(TOO_SMALL_SF), ], ) -def test_parse_channel_id_with_invalid_data(value: str | int): +def test_parse_channel_id_with_invalid_data(value: str | int) -> None: with pytest.raises(ValueError, match="a message"): tanjun.conversion.parse_channel_id(value, message="a message") -def test_search_channel_ids(): +def test_search_channel_ids() -> None: result = tanjun.conversion.search_channel_ids( f"65423 <#> <> {TOO_LARGE_SF} <#123321><#43123> {TOO_SMALL_SF} 54123 <@1> <@13> <@&32> <:123:32>" ) @@ -1648,7 +1649,7 @@ def test_search_channel_ids(): @pytest.mark.parametrize( ("value", "result"), [("43123", 43123), (1233211, 1233211), ("", 12333), ("<:name:32123>", 32123)] ) -def test_parse_emoji_id(value: str | int, result: int): +def test_parse_emoji_id(value: str | int, result: int) -> None: assert tanjun.conversion.parse_emoji_id(value) == result @@ -1669,12 +1670,12 @@ def test_parse_emoji_id(value: str | int, result: int): "<@!43123>", ], ) -def test_parse_emoji_id_with_invalid_values(value: str | int): +def test_parse_emoji_id_with_invalid_values(value: str | int) -> None: with pytest.raises(ValueError, match="a messages"): tanjun.conversion.parse_emoji_id(value, message="a messages") -def test_search_emoji_ids(): +def test_search_emoji_ids() -> None: string = ( f" <:sksks:67234> 432 <:gaga:4543123> 4231.123 " f" <@1> <@!2> <@&123312> <#123321>" @@ -1686,7 +1687,7 @@ def test_search_emoji_ids(): @pytest.mark.parametrize(("value", "result"), [("43123", 43123), (1233211, 1233211), ("<@&1234321>", 1234321)]) -def test_parse_role_id(value: str | int, result: int): +def test_parse_role_id(value: str | int, result: int) -> None: assert tanjun.conversion.parse_role_id(value) == result @@ -1710,12 +1711,12 @@ def test_parse_role_id(value: str | int, result: int): "", ], ) -def test_parse_role_id_with_invalid_values(value: int | str): +def test_parse_role_id_with_invalid_values(value: int | str) -> None: with pytest.raises(ValueError, match="a messaged"): tanjun.conversion.parse_role_id(value, message="a messaged") -def test_search_role_ids(): +def test_search_role_ids() -> None: result = tanjun.conversion.search_role_ids( f"<@&{TOO_SMALL_SF}><@&123321><@&12222> 123 342 <#123> <@5623> <:vs:123> <@&444> <@&{TOO_SMALL_SF}" ) @@ -1726,7 +1727,7 @@ def test_search_role_ids(): @pytest.mark.parametrize( ("value", "expected"), [("43123", 43123), ("<@!33333>", 33333), (1233211, 1233211), ("<@1234321>", 1234321)] ) -def test_parse_user_id(value: int | str, expected: int): +def test_parse_user_id(value: int | str, expected: int) -> None: assert tanjun.conversion.parse_user_id(value) == expected @@ -1750,12 +1751,12 @@ def test_parse_user_id(value: int | str, expected: int): "<:fdas:123>", ], ) -def test_parse_user_id_with_invalid_values(value: int | str): +def test_parse_user_id_with_invalid_values(value: int | str) -> None: with pytest.raises(ValueError, match="a"): tanjun.conversion.parse_user_id(value, message="a") -def test_search_user_ids(): +def test_search_user_ids() -> None: string = f"<@{TOO_LARGE_SF}><@123321><@!6743234> 132321 <#123><@&3541234> 3123 <:a:3> <@65123>" result = tanjun.conversion.search_user_ids(string) @@ -1772,23 +1773,23 @@ def test_search_user_ids(): ("@me/1234/1234", (1234, 1234)), ], ) -def test_parse_message_id(value: int | str, expected: tuple[int | None, int]): +def test_parse_message_id(value: int | str, expected: tuple[int | None, int]) -> None: assert tanjun.conversion.parse_message_id(value) == expected -def test_defragment_url(): +def test_defragment_url() -> None: result = tanjun.conversion.defragment_url("https://s//s/s/s/s/d#b") assert result == urllib.parse.DefragResult(url="https://s//s/s/s/s/d", fragment="b") -def test_defragment_url_when_wrapped(): +def test_defragment_url_when_wrapped() -> None: result = tanjun.conversion.defragment_url("") assert result == urllib.parse.DefragResult(url="https://s//s/s/s/s/b", fragment="a") -def test_parse_url(): +def test_parse_url() -> None: result = tanjun.conversion.parse_url("https:/s//s/s/s/s/q") assert result == urllib.parse.ParseResult( @@ -1796,7 +1797,7 @@ def test_parse_url(): ) -def test_parse_url_when_wrapped(): +def test_parse_url_when_wrapped() -> None: result = tanjun.conversion.parse_url("") assert result == urllib.parse.ParseResult( @@ -1804,13 +1805,13 @@ def test_parse_url_when_wrapped(): ) -def test_split_url(): +def test_split_url() -> None: result = tanjun.conversion.split_url("https:/s//s/s/s/s/e") assert result == urllib.parse.SplitResult(scheme="https", netloc="", path="/s//s/s/s/s/e", query="", fragment="") -def test_split_url_when_wrapped(): +def test_split_url_when_wrapped() -> None: result = tanjun.conversion.split_url("") assert result == urllib.parse.SplitResult(scheme="https", netloc="", path="/s//s/s/s/s/s", query="", fragment="") @@ -1823,17 +1824,17 @@ def test_split_url_when_wrapped(): ("", datetime.datetime(1970, 2, 7, 9, 48, 53, tzinfo=datetime.UTC)), ], ) -def test_to_datetime(value: str, expected: datetime.datetime): +def test_to_datetime(value: str, expected: datetime.datetime) -> None: assert tanjun.to_datetime(value) == expected @pytest.mark.parametrize("value", ["a", "<:123312:f>", "", "t:123312:f", ""]) -def test_to_datetime_with_invalid_values(value: str): +def test_to_datetime_with_invalid_values(value: str) -> None: with pytest.raises(ValueError, match="Not a valid datetime"): tanjun.to_datetime(value) -def test_from_datetime(): +def test_from_datetime() -> None: date = datetime.datetime(2021, 9, 15, 14, 16, 18, 829252, tzinfo=datetime.UTC) result = tanjun.conversion.from_datetime(date, style="d") @@ -1841,7 +1842,7 @@ def test_from_datetime(): assert result == "" -def test_from_datetime_with_default_style(): +def test_from_datetime_with_default_style() -> None: date = datetime.datetime(2021, 9, 15, 14, 16, 18, 829252, tzinfo=datetime.UTC) result = tanjun.conversion.from_datetime(date) @@ -1849,21 +1850,21 @@ def test_from_datetime_with_default_style(): assert result == "" -def test_from_datetime_for_naive_datetime(): - date = datetime.datetime.now() +def test_from_datetime_for_naive_datetime() -> None: + date = datetime.datetime.now() # noqa: DTZ005 with pytest.raises(ValueError, match="Cannot convert naive datetimes, please specify a timezone."): tanjun.conversion.from_datetime(date) -def test_from_datetime_for_invalid_style(): +def test_from_datetime_for_invalid_style() -> None: date = datetime.datetime.now(tz=datetime.UTC) with pytest.raises(ValueError, match="Invalid style: granddad"): tanjun.conversion.from_datetime(date, style="granddad") -def test_from_datetime_for_time_delta(): +def test_from_datetime_for_time_delta() -> None: with freezegun.freeze_time(datetime.datetime(2022, 12, 30, 6, 33, 47, 52643, tzinfo=datetime.UTC)): result = tanjun.conversion.from_datetime(datetime.timedelta(days=21, hours=23, minutes=32, seconds=34)) @@ -1907,48 +1908,48 @@ def test_from_datetime_for_time_delta(): ("👍🏿", True), ], ) -def test_to_bool(value: str, expected: bool): +def test_to_bool(value: str, expected: bool) -> None: assert tanjun.to_bool(value) is expected @pytest.mark.parametrize("value", ["Yee", "ye", "nope", "yankee", "", "doodle", "10", "yesno", "noyes"]) -def test_to_bool_with_invalid_input(value: str): +def test_to_bool_with_invalid_input(value: str) -> None: with pytest.raises(ValueError, match=f"Invalid bool value `{value.lower()}`"): tanjun.to_bool(value) -def test_to_color(): +def test_to_color() -> None: result = tanjun.to_color(123) assert isinstance(result, hikari.Color) assert result == 123 -def test_to_color_when_str(): +def test_to_color_when_str() -> None: result = tanjun.to_color("0x333") assert isinstance(result, hikari.Color) assert result == 0x333333 -def test_to_color_when_str_of_digits(): +def test_to_color_when_str_of_digits() -> None: result = tanjun.to_color("123312") assert isinstance(result, hikari.Color) assert result == 123312 -def test_to_color_when_str_of_space_separated_digits(): +def test_to_color_when_str_of_space_separated_digits() -> None: result = tanjun.to_color("54 23 12") assert isinstance(result, hikari.Color) assert result == 0x36170C -def test_to_color_when_str_of_space_separated_non_digits(): +def test_to_color_when_str_of_space_separated_non_digits() -> None: with pytest.raises(ValueError, match="Not a valid color representation"): tanjun.to_color("54 23 aye") @pytest.mark.skip(reason="TODO") -def test_override_type(): ... +def test_override_type() -> None: ... diff --git a/tests/test_errors.py b/tests/test_errors.py index 85b29c4d0..f6181094c 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -42,7 +41,7 @@ class TestCommandError: - def test_init_dunder_method(self): + def test_init_dunder_method(self) -> None: mock_attachment = mock.Mock() mock_component = mock.Mock() mock_embed = mock.Mock() @@ -67,7 +66,7 @@ def test_init_dunder_method(self): assert error.user_mentions == [2332] assert error.role_mentions == [6534] - def test_init_dunder_method_for_singular_fields(self): + def test_init_dunder_method_for_singular_fields(self) -> None: mock_attachment = mock.Mock() mock_component = mock.Mock() mock_embed = mock.Mock() @@ -78,7 +77,7 @@ def test_init_dunder_method_for_singular_fields(self): assert error.components == [mock_component] assert error.embeds == [mock_embed] - def test_init_dunder_method_for_partial(self): + def test_init_dunder_method_for_partial(self) -> None: error = tanjun.CommandError() assert error.content is hikari.UNDEFINED @@ -90,23 +89,23 @@ def test_init_dunder_method_for_partial(self): assert error.role_mentions is hikari.UNDEFINED assert error.user_mentions is hikari.UNDEFINED - def test_init_dunder_method_when_both_attachment_and_attachments_passed(self): + def test_init_dunder_method_when_both_attachment_and_attachments_passed(self) -> None: with pytest.raises(ValueError, match="Cannot specify both attachment and attachments"): tanjun.CommandError(attachment=mock.Mock(), attachments=[mock.Mock()]) - def test_init_dunder_method_when_both_component_and_components_passed(self): + def test_init_dunder_method_when_both_component_and_components_passed(self) -> None: with pytest.raises(ValueError, match="Cannot specify both component and components"): tanjun.CommandError(component=mock.Mock(), components=[mock.Mock()]) - def test_init_dunder_method_when_both_embed_and_embeds_passed(self): + def test_init_dunder_method_when_both_embed_and_embeds_passed(self) -> None: with pytest.raises(ValueError, match="Cannot specify both embed and embeds"): tanjun.CommandError(embed=mock.Mock(), embeds=[mock.Mock()]) - def test_str_dunder_method(self): + def test_str_dunder_method(self) -> None: assert str(tanjun.CommandError("bar")) == "bar" @pytest.mark.asyncio - async def test_send(self): + async def test_send(self) -> None: error = tanjun.CommandError() mock_context = mock.AsyncMock() @@ -126,7 +125,7 @@ async def test_send(self): ) @pytest.mark.asyncio - async def test_send_when_all_fields(self): + async def test_send_when_all_fields(self) -> None: mock_attachment = mock.Mock() mock_component = mock.Mock() mock_embed = mock.Mock() @@ -159,18 +158,18 @@ async def test_send_when_all_fields(self): class TestParserError: - def test__init__(self): + def test__init__(self) -> None: error = tanjun.ParserError("bank", "no u") assert error.message == "bank" assert error.parameter == "no u" - def test__str__(self): + def test__str__(self) -> None: assert str(tanjun.ParserError("bankette", "now2")) == "bankette" class TestConversionError: - def test__init__(self): + def test__init__(self) -> None: mock_error = mock.Mock() error = tanjun.ConversionError("bankettete", "aye", errors=[mock_error]) @@ -181,7 +180,7 @@ def test__init__(self): class TestNotEnoughArgumentsError: - def test__init__(self): + def test__init__(self) -> None: error = tanjun.NotEnoughArgumentsError("aye", "naye") assert error.message == "aye" @@ -189,7 +188,7 @@ def test__init__(self): class TestTooManyArgumentsError: - def test__init__(self): + def test__init__(self) -> None: error = tanjun.TooManyArgumentsError("blank", "fama") assert error.message == "blank" @@ -197,7 +196,7 @@ def test__init__(self): class TestModuleMissingLoaders: - def test___init__(self): + def test___init__(self) -> None: error = tanjun.ModuleMissingLoaders("foo", "bar") assert error.message == "foo" @@ -205,7 +204,7 @@ def test___init__(self): class TestModuleMissingUnloaders: - def test___init__(self): + def test___init__(self) -> None: error = tanjun.ModuleMissingUnloaders("beep", "boop") assert error.message == "beep" @@ -213,7 +212,7 @@ def test___init__(self): class TestModuleStateConflict: - def test___init__(self): + def test___init__(self) -> None: error = tanjun.ModuleStateConflict("esxd", "dsaasd") assert error.message == "esxd" @@ -221,14 +220,14 @@ def test___init__(self): class TestFailedModuleLoad: - def test___init__(self): + def test___init__(self) -> None: error = tanjun.FailedModuleLoad("beat/my/boobs") assert error.path == "beat/my/boobs" class TestFailedModuleUnload: - def test___init__(self): + def test___init__(self) -> None: error = tanjun.FailedModuleUnload("yeet/ok") assert error.path == "yeet/ok" diff --git a/tests/test_hooks.py b/tests/test_hooks.py index d2878a760..d21455a3a 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -41,7 +40,7 @@ class TestHooks: - def test_add_to_command(self): + def test_add_to_command(self) -> None: hooks = tanjun.AnyHooks() mock_command = mock.Mock() @@ -50,7 +49,7 @@ def test_add_to_command(self): mock_command.set_hooks.assert_called_once_with(hooks) @pytest.mark.skip(reason="not implemented") - def test_copy(self): + def test_copy(self) -> None: hooks = tanjun.AnyHooks() result = hooks.copy() @@ -58,7 +57,7 @@ def test_copy(self): assert result == hooks assert result is not hooks - def test_add_on_error(self): + def test_add_on_error(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().set_on_error(mock_other_callback) mock_on_error = mock.Mock() @@ -67,7 +66,7 @@ def test_add_on_error(self): assert hooks._error_callbacks == [mock_other_callback, mock_on_error] - def test_set_on_error(self): + def test_set_on_error(self) -> None: hooks = tanjun.AnyHooks().set_on_error(mock.Mock()) mock_on_error = mock.Mock() @@ -75,14 +74,14 @@ def test_set_on_error(self): assert hooks._error_callbacks == [mock_on_error] - def test_set_on_error_when_none(self): + def test_set_on_error_when_none(self) -> None: hooks = tanjun.AnyHooks().set_on_error(mock.Mock()) assert hooks.set_on_error(None) is hooks assert hooks._error_callbacks == [] - def test_with_on_error(self): + def test_with_on_error(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().set_on_error(mock_other_callback) mock_on_error = mock.Mock() @@ -91,7 +90,7 @@ def test_with_on_error(self): assert hooks._error_callbacks == [mock_other_callback, mock_on_error] - def test_add_on_parser_error(self): + def test_add_on_parser_error(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_on_parser_error(mock_other_callback) mock_on_parser_error = mock.Mock() @@ -100,7 +99,7 @@ def test_add_on_parser_error(self): assert hooks._parser_error_callbacks == [mock_other_callback, mock_on_parser_error] - def test_set_on_parser_error(self): + def test_set_on_parser_error(self) -> None: hooks = tanjun.AnyHooks().add_on_parser_error(mock.Mock()) mock_on_parser_error = mock.Mock() @@ -108,14 +107,14 @@ def test_set_on_parser_error(self): assert hooks._parser_error_callbacks == [mock_on_parser_error] - def test_set_on_parser_error_when_none(self): + def test_set_on_parser_error_when_none(self) -> None: hooks = tanjun.AnyHooks().add_on_parser_error(mock.Mock()) assert hooks.set_on_parser_error(None) is hooks assert hooks._parser_error_callbacks == [] - def test_with_on_parser_error(self): + def test_with_on_parser_error(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_on_parser_error(mock_other_callback) mock_on_parser_error = mock.Mock() @@ -124,7 +123,7 @@ def test_with_on_parser_error(self): assert hooks._parser_error_callbacks == [mock_other_callback, mock_on_parser_error] - def test_add_post_execution(self): + def test_add_post_execution(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().set_post_execution(mock_other_callback) mock_post_execution = mock.Mock() @@ -133,7 +132,7 @@ def test_add_post_execution(self): assert hooks._post_execution_callbacks == [mock_other_callback, mock_post_execution] - def test_set_post_execution(self): + def test_set_post_execution(self) -> None: hooks = tanjun.AnyHooks().set_post_execution(mock.Mock()) mock_post_execution = mock.Mock() @@ -141,14 +140,14 @@ def test_set_post_execution(self): assert hooks._post_execution_callbacks == [mock_post_execution] - def test_set_post_execution_when_none(self): + def test_set_post_execution_when_none(self) -> None: hooks = tanjun.AnyHooks().set_post_execution(mock.Mock()) assert hooks.set_post_execution(None) is hooks assert hooks._post_execution_callbacks == [] - def test_with_post_execution(self): + def test_with_post_execution(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_post_execution(mock_other_callback) mock_post_execution = mock.Mock() @@ -157,7 +156,7 @@ def test_with_post_execution(self): assert hooks._post_execution_callbacks == [mock_other_callback, mock_post_execution] - def test_add_pre_execution(self): + def test_add_pre_execution(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_pre_execution(mock_other_callback) mock_pre_execution = mock.Mock() @@ -166,7 +165,7 @@ def test_add_pre_execution(self): assert hooks._pre_execution_callbacks == [mock_other_callback, mock_pre_execution] - def test_set_pre_execution(self): + def test_set_pre_execution(self) -> None: hooks = tanjun.AnyHooks().add_pre_execution(mock.Mock()) mock_pre_execution = mock.Mock() @@ -174,14 +173,14 @@ def test_set_pre_execution(self): assert hooks._pre_execution_callbacks == [mock_pre_execution] - def test_set_pre_execution_when_none(self): + def test_set_pre_execution_when_none(self) -> None: hooks = tanjun.AnyHooks().add_pre_execution(mock.Mock()) assert hooks.set_pre_execution(None) is hooks assert hooks._pre_execution_callbacks == [] - def test_with_pre_execution(self): + def test_with_pre_execution(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_pre_execution(mock_other_callback) mock_pre_execution = mock.Mock() @@ -190,7 +189,7 @@ def test_with_pre_execution(self): assert hooks._pre_execution_callbacks == [mock_other_callback, mock_pre_execution] - def test_add_on_success(self): + def test_add_on_success(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_on_success(mock_other_callback) mock_on_success = mock.Mock() @@ -199,7 +198,7 @@ def test_add_on_success(self): assert hooks._success_callbacks == [mock_other_callback, mock_on_success] - def test_set_on_success(self): + def test_set_on_success(self) -> None: hooks = tanjun.AnyHooks().add_on_success(mock.Mock()) mock_on_success = mock.Mock() @@ -207,14 +206,14 @@ def test_set_on_success(self): assert hooks._success_callbacks == [mock_on_success] - def test_set_on_success_when_none(self): + def test_set_on_success_when_none(self) -> None: hooks = tanjun.AnyHooks().add_on_success(mock.Mock()) assert hooks.set_on_success(None) is hooks assert hooks._success_callbacks == [] - def test_with_on_success(self): + def test_with_on_success(self) -> None: mock_other_callback = mock.Mock() hooks = tanjun.AnyHooks().add_on_success(mock_other_callback) mock_on_success = mock.Mock() @@ -224,7 +223,7 @@ def test_with_on_success(self): assert hooks._success_callbacks == [mock_other_callback, mock_on_success] @pytest.mark.asyncio - async def test_trigger_error_for_parser_error_with_handlers(self): + async def test_trigger_error_for_parser_error_with_handlers(self) -> None: mock_callback = mock.Mock() mock_other_hook = mock.Mock(trigger_error=mock.AsyncMock(return_value=100)) mock_context = mock.AsyncMock() @@ -241,13 +240,13 @@ async def test_trigger_error_for_parser_error_with_handlers(self): mock_other_hook.trigger_error.assert_awaited_once_with(mock_context, mock_error) @pytest.mark.asyncio - async def test_trigger_error_for_parser_error_without_handlers(self): + async def test_trigger_error_for_parser_error_without_handlers(self) -> None: result = await tanjun.AnyHooks().trigger_error(mock.Mock(), mock.MagicMock(tanjun.ParserError)) assert result == 0 @pytest.mark.asyncio - async def test_trigger_error_with_handler(self): + async def test_trigger_error_with_handler(self) -> None: mock_callback = mock.Mock() mock_other_hook = mock.Mock(trigger_error=mock.AsyncMock(return_value=2)) mock_context = mock.AsyncMock() @@ -265,13 +264,13 @@ async def test_trigger_error_with_handler(self): mock_other_hook.trigger_error.assert_awaited_once_with(mock_context, mock_error) @pytest.mark.asyncio - async def test_trigger_error_without_handler(self): + async def test_trigger_error_without_handler(self) -> None: result = await tanjun.AnyHooks().trigger_error(mock.Mock(), mock.Mock()) assert result == 0 @pytest.mark.asyncio - async def test_trigger_post_execution_with_handlers(self): + async def test_trigger_post_execution_with_handlers(self) -> None: mock_callback = mock.Mock() mock_other_hook = mock.Mock(trigger_post_execution=mock.AsyncMock()) mock_context = mock.AsyncMock() @@ -286,11 +285,11 @@ async def test_trigger_post_execution_with_handlers(self): mock_other_hook.trigger_post_execution.assert_awaited_once_with(mock_context) @pytest.mark.asyncio - async def test_trigger_post_execution_without_handlers(self): + async def test_trigger_post_execution_without_handlers(self) -> None: await tanjun.AnyHooks().trigger_post_execution(mock.Mock()) @pytest.mark.asyncio - async def test_trigger_pre_execution_with_handlers(self): + async def test_trigger_pre_execution_with_handlers(self) -> None: mock_callback = mock.Mock() mock_other_hook = mock.Mock(trigger_pre_execution=mock.AsyncMock()) mock_context = mock.AsyncMock() @@ -305,11 +304,11 @@ async def test_trigger_pre_execution_with_handlers(self): mock_other_hook.trigger_pre_execution.assert_awaited_once_with(mock_context) @pytest.mark.asyncio - async def test_trigger_pre_execution_without_handlers(self): + async def test_trigger_pre_execution_without_handlers(self) -> None: await tanjun.AnyHooks().trigger_pre_execution(mock.Mock()) @pytest.mark.asyncio - async def test_trigger_success_with_handlers(self): + async def test_trigger_success_with_handlers(self) -> None: mock_callback = mock.Mock() mock_other_hook = mock.Mock(trigger_success=mock.AsyncMock()) mock_context = mock.AsyncMock() @@ -320,5 +319,5 @@ async def test_trigger_success_with_handlers(self): mock_other_hook.trigger_success.assert_awaited_once_with(mock_context) @pytest.mark.asyncio - async def test_trigger_success_without_handlers(self): + async def test_trigger_success_without_handlers(self) -> None: await tanjun.AnyHooks().trigger_success(mock.Mock()) diff --git a/tests/test_injecting.py b/tests/test_injecting.py index 5232f5b70..afb9b709e 100644 --- a/tests/test_injecting.py +++ b/tests/test_injecting.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -39,7 +38,7 @@ import tanjun -def test_as_self_injecting(): +def test_as_self_injecting() -> None: mock_callback = mock.Mock() mock_client = mock.Mock() @@ -50,7 +49,7 @@ def test_as_self_injecting(): assert result._client is mock_client.injector -def test_aliases(): +def test_aliases() -> None: assert set(tanjun.injecting.__all__) == { "AbstractInjectionContext", "BasicInjectionContext", diff --git a/tests/test_parsing.py b/tests/test_parsing.py index 4afad074a..0630d1b40 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -40,7 +39,7 @@ class TestShlexTokenizer: ... @pytest.mark.skip(reason="TODO") -def test__covert_option_or_empty(): ... +def test__covert_option_or_empty() -> None: ... @pytest.mark.skip(reason="TODO") @@ -48,23 +47,23 @@ class TestSemanticShlex: ... @pytest.mark.skip(reason="TODO") -def test_with_argument(): ... +def test_with_argument() -> None: ... @pytest.mark.skip(reason="TODO") -def test_with_greedy_argument(): ... +def test_with_greedy_argument() -> None: ... @pytest.mark.skip(reason="TODO") -def test_with_multi_argument(): ... +def test_with_multi_argument() -> None: ... @pytest.mark.skip(reason="TODO") -def test_with_option(): ... +def test_with_option() -> None: ... @pytest.mark.skip(reason="TODO") -def test_with_multi_option(): ... +def test_with_multi_option() -> None: ... class TestParameter: ... diff --git a/tests/test_permissions.py b/tests/test_permissions.py index d2fb3a84a..4eea62f63 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -36,92 +35,92 @@ @pytest.mark.skip(reason="Not implemented") -def test_calculate_permissions(): ... +def test_calculate_permissions() -> None: ... @pytest.mark.skip(reason="Not implemented") -def test_calculate_permissions_when_guild_owner(): ... +def test_calculate_permissions_when_guild_owner() -> None: ... @pytest.mark.skip(reason="Not implemented") -def test_calculate_permissions_when_admin_role(): ... +def test_calculate_permissions_when_admin_role() -> None: ... @pytest.mark.skip(reason="Not implemented") -def test_calculate_permissions_when_no_channel(): ... +def test_calculate_permissions_when_no_channel() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions(): ... +async def test_fetch_permissions() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions_when_guild_owner(): ... +async def test_fetch_permissions_when_guild_owner() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions_when_admin_role(): ... +async def test_fetch_permissions_when_admin_role() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions_when_no_channel(): ... +async def test_fetch_permissions_when_no_channel() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions_when_channel_object_provided(): ... +async def test_fetch_permissions_when_channel_object_provided() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions_for_uncached_entities(): ... +async def test_fetch_permissions_for_uncached_entities() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_permissions_for_no_cache(): ... +async def test_fetch_permissions_for_no_cache() -> None: ... @pytest.mark.skip(reason="Not implemented") -def test_calculate_everyone_permissions(): ... +def test_calculate_everyone_permissions() -> None: ... @pytest.mark.skip(reason="Not implemented") -def test_calculate_everyone_permissions_admin_role(): ... +def test_calculate_everyone_permissions_admin_role() -> None: ... @pytest.mark.skip(reason="Not implemented") -def test_calculate_everyone_permissions_no_channel(): ... +def test_calculate_everyone_permissions_no_channel() -> None: ... @pytest.mark.asyncio -async def test_fetch_everyone_permissions(): ... +async def test_fetch_everyone_permissions() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_everyone_permissions_admin_role(): ... +async def test_fetch_everyone_permissions_admin_role() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_everyone_permissions_for_uncached_entities(): ... +async def test_fetch_everyone_permissions_for_uncached_entities() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_everyone_permissions_for_no_cache(): ... +async def test_fetch_everyone_permissions_for_no_cache() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_everyone_permissions_no_channel(): ... +async def test_fetch_everyone_permissions_no_channel() -> None: ... @pytest.mark.skip(reason="Not implemented") @pytest.mark.asyncio -async def test_fetch_everyone_permissions_channel_object_provided(): ... +async def test_fetch_everyone_permissions_channel_object_provided() -> None: ... diff --git a/tests/test_schedules.py b/tests/test_schedules.py index b5a011a07..52b4ee427 100644 --- a/tests/test_schedules.py +++ b/tests/test_schedules.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -94,7 +93,8 @@ def __init__( def spawn_ticker(self) -> "_ManualClock": if self._is_ticking and self._keep_ticking: - raise RuntimeError("Already ticking") + error_message = "Already ticking" + raise RuntimeError(error_message) if self._is_ticking: self._keep_ticking = True @@ -137,9 +137,10 @@ async def _next_tick(self) -> None: return await self._next_tick() self._is_ticking = False + return None -def test_as_interval(): +def test_as_interval() -> None: mock_callback = mock.Mock() result = tanjun.as_interval(123, fatal_exceptions=[KeyError], ignored_exceptions=[TabError], max_runs=55)( @@ -154,16 +155,16 @@ def test_as_interval(): class TestIntervalSchedule: - def test_callback_property(self): + def test_callback_property(self) -> None: mock_callback = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock_callback, 123) assert interval.callback is mock_callback - def test_is_alive(self): + def test_is_alive(self) -> None: assert tanjun.schedules.IntervalSchedule(mock.Mock(), 34123).is_alive is False - def test_is_alive_when_is_alive(self): + def test_is_alive_when_is_alive(self) -> None: interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) interval._task = mock.Mock() @@ -172,16 +173,16 @@ def test_is_alive_when_is_alive(self): @pytest.mark.parametrize( "interval", [datetime.timedelta(days=7, hours=13, minutes=8, seconds=54), 652134, 652134.0] ) - def test_interval_property(self, interval: int | float | datetime.timedelta): + def test_interval_property(self, interval: int | float | datetime.timedelta) -> None: interval_ = tanjun.schedules.IntervalSchedule(mock.Mock(), interval) assert interval_.interval == datetime.timedelta(days=7, hours=13, minutes=8, seconds=54) - def test_iteration_count_property(self): + def test_iteration_count_property(self) -> None: assert tanjun.schedules.IntervalSchedule(mock.Mock(), 123).iteration_count == 0 @pytest.mark.asyncio - async def test_call_dunder_method(self): + async def test_call_dunder_method(self) -> None: mock_callback = mock.AsyncMock() interval = tanjun.schedules.IntervalSchedule(typing.cast("tanjun.schedules._CallbackSig", mock_callback), 123) @@ -189,7 +190,7 @@ async def test_call_dunder_method(self): mock_callback.assert_awaited_once_with(123, 543, sex="OK", boo="31123") - def test_copy(self): + def test_copy(self) -> None: interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) interval._tasks.append(mock.Mock()) @@ -202,14 +203,14 @@ def test_copy(self): assert result._tasks is not interval._tasks assert result is not interval - def test_copy_when_schedule_is_active(self): + def test_copy_when_schedule_is_active(self) -> None: interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) interval._task = mock.Mock() with pytest.raises(RuntimeError, match="Cannot copy an active schedule"): interval.copy() - def test_load_into_component(self): + def test_load_into_component(self) -> None: mock_component = mock.Mock(tanjun.Component) interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -217,13 +218,13 @@ def test_load_into_component(self): mock_component.add_schedule.assert_called_once_with(interval) - def test_load_into_component_when_no_add_schedule_method(self): + def test_load_into_component_when_no_add_schedule_method(self) -> None: mock_component = mock.Mock(object) interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) interval.load_into_component(mock_component) - def test_set_start_callback(self): + def test_set_start_callback(self) -> None: mock_callback = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -233,7 +234,7 @@ def test_set_start_callback(self): assert interval._start_callback assert interval._start_callback is mock_callback - def test_set_stop_callback(self): + def test_set_stop_callback(self) -> None: mock_callback = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -244,7 +245,7 @@ def test_set_stop_callback(self): assert interval._stop_callback is mock_callback @pytest.mark.asyncio - async def test__execute(self): + async def test__execute(self) -> None: mock_client = mock.AsyncMock() mock_callback = mock.Mock() stop = mock.Mock() @@ -260,7 +261,7 @@ async def test__execute(self): stop.assert_not_called() @pytest.mark.asyncio - async def test__execute_when_fatal_exception(self): + async def test__execute_when_fatal_exception(self) -> None: mock_callback = mock.Mock() mock_client = mock.AsyncMock() mock_client.call_with_async_di.side_effect = KeyError("hihihiih") @@ -278,7 +279,7 @@ async def test__execute_when_fatal_exception(self): assert interval._tasks == [] @pytest.mark.asyncio - async def test__execute_when_ignored_exception(self): + async def test__execute_when_ignored_exception(self) -> None: mock_callback = mock.Mock() mock_client = mock.AsyncMock() mock_client.call_with_async_di.side_effect = IndexError("hihihiih") @@ -295,7 +296,7 @@ async def test__execute_when_ignored_exception(self): stop.assert_not_called() @pytest.mark.asyncio - async def test__execute_when_exception(self): + async def test__execute_when_exception(self) -> None: mock_callback = mock.Mock() mock_client = mock.AsyncMock() error = ValueError("hihihiih") @@ -314,12 +315,12 @@ async def test__execute_when_exception(self): @pytest.mark.timeout(_TIMEOUT) @pytest.mark.asyncio - async def test__loop(self): + async def test__loop(self) -> None: mock_client = alluka.Client() call_times: list[int] = [] @_print_tb - async def callback(): + async def callback() -> None: call_times.append(time.time_ns()) clock.spawn_ticker() @@ -348,7 +349,7 @@ async def callback(): @pytest.mark.timeout(_TIMEOUT) @pytest.mark.asyncio - async def test__loop_when_max_runs(self): + async def test__loop_when_max_runs(self) -> None: mock_client = alluka.Client() call_times: list[int] = [] close_event = asyncio.Event() @@ -389,7 +390,7 @@ async def on_stop() -> None: @pytest.mark.timeout(_TIMEOUT) @pytest.mark.asyncio - async def test__loop_when_start_and_stop_callbacks_set(self): + async def test__loop_when_start_and_stop_callbacks_set(self) -> None: mock_client = alluka.Client() call_times: list[int] = [] start_time = None @@ -436,7 +437,7 @@ async def on_stop() -> None: @pytest.mark.parametrize("fatal_exceptions", [[LookupError], []]) @pytest.mark.asyncio - async def test__loop_and_start_raises(self, fatal_exceptions: list[type[Exception]]): + async def test__loop_and_start_raises(self, fatal_exceptions: list[type[Exception]]) -> None: error = KeyError() mock_client = mock.Mock() mock_client.call_with_async_di = mock.AsyncMock(side_effect=error) @@ -461,7 +462,7 @@ async def test__loop_and_start_raises(self, fatal_exceptions: list[type[Exceptio assert interval._task is None @pytest.mark.asyncio - async def test__loop_and_start_raises_ignored(self): + async def test__loop_and_start_raises_ignored(self) -> None: mock_client = mock.Mock() mock_client.call_with_async_di = mock.AsyncMock(side_effect=KeyError()) mock_client.get_callback_override.return_value = None @@ -486,7 +487,7 @@ async def test__loop_and_start_raises_ignored(self): get_running_loop.return_value.create_task.assert_not_called() sleep.assert_called_once_with(123.0) - def test_start(self): + def test_start(self) -> None: mock_client = mock.Mock() loop_method = mock.Mock() interval: tanjun.schedules.IntervalSchedule[typing.Any] = types.new_class( @@ -504,7 +505,7 @@ def test_start(self): get_running_loop.return_value.create_task.assert_called_once_with(loop_method.return_value) get_running_loop.assert_called_once_with() - def test_start_when_passed_event_loop(self): + def test_start_when_passed_event_loop(self) -> None: mock_client = mock.Mock() mock_loop = mock.Mock() loop_method = mock.Mock() @@ -521,7 +522,7 @@ def test_start_when_passed_event_loop(self): assert interval.is_alive is True mock_loop.create_task.assert_called_once_with(loop_method.return_value) - def test_start_when_passed_event_loop_isnt_active(self): + def test_start_when_passed_event_loop_isnt_active(self) -> None: mock_loop = mock.Mock() mock_loop.is_running.return_value = False interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -531,7 +532,7 @@ def test_start_when_passed_event_loop_isnt_active(self): assert interval._task is None - def test_start_when_already_active(self): + def test_start_when_already_active(self) -> None: mock_task = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) interval._task = mock_task @@ -542,7 +543,7 @@ def test_start_when_already_active(self): assert interval._task is mock_task @pytest.mark.asyncio - async def test_force_stop(self): + async def test_force_stop(self) -> None: mock_task = mock.Mock() mock_task_1 = asyncio.create_task(asyncio.sleep(2, result=None)) mock_task_2 = asyncio.create_task(asyncio.sleep(2, result=None)) @@ -569,7 +570,7 @@ async def test_force_stop(self): mock_client.call_with_async_di.assert_not_called() @pytest.mark.asyncio - async def test_force_stop_when_stop_callback_set(self): + async def test_force_stop_when_stop_callback_set(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_stop_callback = mock.Mock() @@ -588,7 +589,7 @@ async def test_force_stop_when_stop_callback_set(self): mock_client.call_with_async_di.assert_awaited_once_with(mock_stop_callback) @pytest.mark.asyncio - async def test_force_stop_when_stop_callback_stop_raises(self): + async def test_force_stop_when_stop_callback_stop_raises(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_client.call_with_async_di.side_effect = KeyError @@ -608,7 +609,7 @@ async def test_force_stop_when_stop_callback_stop_raises(self): mock_client.call_with_async_di.assert_awaited_once_with(mock_stop_callback) @pytest.mark.asyncio - async def test_force_stop_when_stop_callback_raises_ignored(self): + async def test_force_stop_when_stop_callback_raises_ignored(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_client.call_with_async_di.side_effect = ValueError @@ -630,7 +631,7 @@ async def test_force_stop_when_stop_callback_raises_ignored(self): mock_client.call_with_async_di.assert_awaited_once_with(mock_stop_callback) @pytest.mark.asyncio - async def test_force_stop_when_no_tasks(self): + async def test_force_stop_when_no_tasks(self) -> None: mock_task = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) interval._client = mock.AsyncMock() @@ -643,14 +644,14 @@ async def test_force_stop_when_no_tasks(self): assert interval._task is None assert interval._tasks == [] - def test_force_stop_when_not_active(self): + def test_force_stop_when_not_active(self) -> None: interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) with pytest.raises(RuntimeError, match="Schedule is not running"): interval.force_stop() @pytest.mark.asyncio - async def test_stop(self): + async def test_stop(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_task_1 = asyncio.create_task(asyncio.sleep(0.2, result=None)) @@ -677,7 +678,7 @@ async def test_stop(self): mock_client.call_with_async_di.assert_not_called() @pytest.mark.asyncio - async def test_stop_when_no_tasks(self): + async def test_stop_when_no_tasks(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -695,7 +696,7 @@ async def test_stop_when_no_tasks(self): mock_client.call_with_async_di.assert_not_called() @pytest.mark.asyncio - async def test_stop_when_some_tasks_time_out(self): + async def test_stop_when_some_tasks_time_out(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_task_1 = asyncio.create_task(asyncio.sleep(0.1, result=None)) @@ -727,7 +728,7 @@ async def test_stop_when_some_tasks_time_out(self): mock_client.call_with_async_di.assert_not_called() @pytest.mark.asyncio - async def test_stop_when_stop_callback_stop_set(self): + async def test_stop_when_stop_callback_stop_set(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_stop_callback = mock.Mock() @@ -744,7 +745,7 @@ async def test_stop_when_stop_callback_stop_set(self): mock_client.call_with_async_di.assert_awaited_once_with(mock_stop_callback) @pytest.mark.asyncio - async def test_stop_when_stop_callback_stop_raises(self): + async def test_stop_when_stop_callback_stop_raises(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_client.call_with_async_di.side_effect = TypeError @@ -762,7 +763,7 @@ async def test_stop_when_stop_callback_stop_raises(self): mock_client.call_with_async_di.assert_awaited_once_with(mock_stop_callback) @pytest.mark.asyncio - async def test_stop_when_stop_callback_raises_ignored(self): + async def test_stop_when_stop_callback_raises_ignored(self) -> None: mock_task = mock.Mock() mock_client = mock.AsyncMock() mock_client.call_with_async_di.side_effect = RuntimeError @@ -782,13 +783,13 @@ async def test_stop_when_stop_callback_raises_ignored(self): mock_client.call_with_async_di.assert_awaited_once_with(mock_stop_callback) @pytest.mark.asyncio - async def test_stop_when_not_active(self): + async def test_stop_when_not_active(self) -> None: interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) with pytest.raises(RuntimeError, match="Schedule is not running"): await interval.stop() - def test_with_start_callback(self): + def test_with_start_callback(self) -> None: set_start_callback = mock.Mock() interval: tanjun.schedules.IntervalSchedule[typing.Any] = types.new_class( "StubIntervalSchedule", @@ -802,7 +803,7 @@ def test_with_start_callback(self): assert result is mock_callback set_start_callback.assert_called_once_with(mock_callback) - def test_with_stop_callback(self): + def test_with_stop_callback(self) -> None: set_stop_callback = mock.Mock() interval: tanjun.schedules.IntervalSchedule[typing.Any] = types.new_class( "StubIntervalSchedule", @@ -816,7 +817,7 @@ def test_with_stop_callback(self): assert result is mock_callback set_stop_callback.assert_called_once_with(mock_callback) - def test_set_ignored_exceptions(self): + def test_set_ignored_exceptions(self) -> None: mock_exception: typing.Any = mock.Mock() mock_other_exception: typing.Any = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -825,7 +826,7 @@ def test_set_ignored_exceptions(self): assert interval._ignored_exceptions == (mock_exception, mock_other_exception) - def test_set_fatal_exceptions(self): + def test_set_fatal_exceptions(self) -> None: mock_exception: typing.Any = mock.Mock() mock_other_exception: typing.Any = mock.Mock() interval = tanjun.schedules.IntervalSchedule(mock.Mock(), 123) @@ -836,19 +837,19 @@ def test_set_fatal_exceptions(self): class TestTimeSchedule: - def test_callback_property(self): + def test_callback_property(self) -> None: mock_callback = mock.AsyncMock() interval = tanjun.schedules.TimeSchedule(mock_callback) assert interval.callback is mock_callback - def test_is_alive_property(self): + def test_is_alive_property(self) -> None: interval = tanjun.schedules.TimeSchedule(mock.AsyncMock()) assert interval.is_alive is False @pytest.mark.asyncio - async def test_is_alive_property_when_is_alive(self): + async def test_is_alive_property_when_is_alive(self) -> None: mock_callback = mock.AsyncMock() client = alluka.Client() interval = tanjun.schedules.TimeSchedule(mock_callback) @@ -883,7 +884,7 @@ async def test_is_alive_property_when_is_alive(self): id="Multiple months too large", ), pytest.param( - {"months": range(0, 14)}, + {"months": range(14)}, r"months must be \(inclusively\) between 1 and 12, not 0 and 13", id="Months range out of range", ), @@ -904,7 +905,7 @@ async def test_is_alive_property_when_is_alive(self): id="Multiple days too large", ), pytest.param( - {"days": range(0, 34)}, + {"days": range(34)}, r"days must be \(inclusively\) between 1 and 31, not 0 and 33", id="days range out of range", ), @@ -954,7 +955,7 @@ async def test_is_alive_property_when_is_alive(self): id="Multiple hours too large", ), pytest.param( - {"hours": range(0, 25)}, + {"hours": range(25)}, r"hours must be \(inclusively\) between 0 and 23, not 0 and 24", id="Hours range out of range", ), @@ -979,11 +980,10 @@ async def test_is_alive_property_when_is_alive(self): id="Multiple minutes too large", ), pytest.param( - {"minutes": range(0, 61)}, + {"minutes": range(61)}, r"minutes must be \(inclusively\) between 0 and 59, not 0 and 60", id="Minutes range out of range", ), - # pytest.param( {"seconds": -1}, r"seconds value must be \(inclusively\) between 0 and 59, not -1", @@ -1005,13 +1005,13 @@ async def test_is_alive_property_when_is_alive(self): id="Multiple seconds too large", ), pytest.param( - {"seconds": range(0, 61)}, + {"seconds": range(61)}, r"seconds must be \(inclusively\) between 0 and 59, not 0 and 60", id="Seconds range out of range", ), ], ) - def test_init_with_out_of_range_value(self, kwargs: dict[str, typing.Any], expected_message: str): + def test_init_with_out_of_range_value(self, kwargs: dict[str, typing.Any], expected_message: str) -> None: with pytest.raises(ValueError, match=expected_message): tanjun.schedules.TimeSchedule(mock.Mock(), **kwargs) @@ -1030,12 +1030,12 @@ def test_init_with_out_of_range_value(self, kwargs: dict[str, typing.Any], expec pytest.param({"seconds": [3, 4, 5, 6.54, 3]}, "Cannot pass floats for seconds", id="Multiple seconds"), ], ) - def test_init_when_float_passed(self, kwargs: dict[str, typing.Any], expected_message: str): + def test_init_when_float_passed(self, kwargs: dict[str, typing.Any], expected_message: str) -> None: with pytest.raises(TypeError, match=expected_message): tanjun.schedules.TimeSchedule(mock.Mock(), **kwargs) @pytest.mark.asyncio - async def test_call_dunder_method(self): + async def test_call_dunder_method(self) -> None: mock_callback: typing.Any = mock.AsyncMock() interval = tanjun.schedules.TimeSchedule(mock_callback) @@ -1044,7 +1044,7 @@ async def test_call_dunder_method(self): assert result is None mock_callback.assert_awaited_once_with(123, "32", a=432, b=123) - def test_copy(self): + def test_copy(self) -> None: mock_callback: typing.Any = mock.AsyncMock() interval = tanjun.schedules.TimeSchedule(mock_callback) interval._tasks.append(mock.Mock()) @@ -1058,14 +1058,14 @@ def test_copy(self): assert result._config == interval._config assert result._config is not interval._config - def test_copy_when_schedule_is_active(self): + def test_copy_when_schedule_is_active(self) -> None: interval = tanjun.schedules.TimeSchedule(mock.Mock()) interval._task = mock.Mock() with pytest.raises(RuntimeError, match="Cannot copy an active schedule"): interval.copy() - def test_load_into_component(self): + def test_load_into_component(self) -> None: mock_component = mock.Mock(tanjun.Component) interval = tanjun.schedules.TimeSchedule(mock.AsyncMock()) @@ -1073,13 +1073,13 @@ def test_load_into_component(self): mock_component.add_schedule.assert_called_once_with(interval) - def test_load_into_component_when_not_loader(self): + def test_load_into_component_when_not_loader(self) -> None: mock_component = mock.Mock(object) interval = tanjun.schedules.TimeSchedule(mock.AsyncMock()) interval.load_into_component(mock_component) - def test_start(self): + def test_start(self) -> None: class StubSchedule(tanjun.schedules.TimeSchedule[typing.Any]): ... mock_client = mock.Mock() @@ -1095,7 +1095,7 @@ class StubSchedule(tanjun.schedules.TimeSchedule[typing.Any]): ... get_running_loop.return_value.create_task.assert_called_once_with(interval._loop.return_value) interval._loop.assert_called_once_with(mock_client) - def test_start_when_passed_event_loop(self): + def test_start_when_passed_event_loop(self) -> None: class StubSchedule(tanjun.schedules.TimeSchedule[typing.Any]): ... mock_client = mock.Mock() @@ -1110,7 +1110,7 @@ class StubSchedule(tanjun.schedules.TimeSchedule[typing.Any]): ... mock_loop.create_task.assert_called_once_with(interval._loop.return_value) interval._loop.assert_called_once_with(mock_client) - def test_start_when_passed_event_loop_isnt_active(self): + def test_start_when_passed_event_loop_isnt_active(self) -> None: interval = tanjun.schedules.TimeSchedule(mock.AsyncMock()) mock_loop = mock.Mock() mock_loop.is_running.return_value = False @@ -1119,7 +1119,7 @@ def test_start_when_passed_event_loop_isnt_active(self): interval.start(mock.Mock(), loop=mock_loop) @pytest.mark.asyncio - async def test_start_when_already_running(self): + async def test_start_when_already_running(self) -> None: interval = tanjun.schedules.TimeSchedule(mock.AsyncMock()) interval.start(mock.Mock()) try: @@ -1130,7 +1130,7 @@ async def test_start_when_already_running(self): interval.force_stop() @pytest.mark.asyncio - async def test_force_stop(self): + async def test_force_stop(self) -> None: mock_loop_task = mock.Mock() mock_task_1 = asyncio.create_task(asyncio.sleep(60, result=None)) mock_task_2 = asyncio.create_task(asyncio.sleep(60, result=None)) @@ -1151,7 +1151,7 @@ async def test_force_stop(self): assert mock_task_2.cancelled() is True assert mock_task_3.cancelled() is True - def test_force_stop_when_no_tasks(self): + def test_force_stop_when_no_tasks(self) -> None: mock_loop_task = mock.Mock() interval = tanjun.schedules.TimeSchedule(mock.Mock()) interval._task = mock_loop_task @@ -1161,14 +1161,14 @@ def test_force_stop_when_no_tasks(self): assert interval.is_alive is False assert interval._task is None - def test_force_stop_when_not_active(self): + def test_force_stop_when_not_active(self) -> None: interval = tanjun.schedules.TimeSchedule(mock.Mock()) with pytest.raises(RuntimeError, match="Schedule is not running"): interval.force_stop() @pytest.mark.asyncio - async def test_stop(self): + async def test_stop(self) -> None: mock_task = mock.Mock() mock_task_1 = asyncio.create_task(asyncio.sleep(0.2, result=None)) mock_task_2 = asyncio.create_task(asyncio.sleep(0.2, result=None)) @@ -1190,7 +1190,7 @@ async def test_stop(self): assert mock_task_3.result() is None @pytest.mark.asyncio - async def test_stop_when_some_tasks_time_out(self): + async def test_stop_when_some_tasks_time_out(self) -> None: mock_task = mock.Mock() mock_task_1 = asyncio.create_task(asyncio.sleep(0.6, result=None)) mock_task_2 = asyncio.create_task(asyncio.sleep(0.2, result=None)) @@ -1219,7 +1219,7 @@ async def test_stop_when_some_tasks_time_out(self): assert mock_task_4.result() is None @pytest.mark.asyncio - async def test_stop_when_not_running(self): + async def test_stop_when_not_running(self) -> None: interval = tanjun.schedules.TimeSchedule(mock.AsyncMock()) with pytest.raises(RuntimeError, match="Schedule is not running"): @@ -1306,25 +1306,25 @@ async def test_stop_when_not_running(self): pytest.param( {"months": [7, 4], "days": [14, 7], "hours": [17, 12], "minutes": [55, 22], "seconds": [30, 10]}, datetime.datetime(2016, 3, 4, 10, 40, 30), - _chain( - ( - d, - datetime.timedelta(seconds=20), - datetime.timedelta(minutes=32, seconds=40), - datetime.timedelta(seconds=20), - ) - for d in ( - datetime.timedelta(days=34, seconds=6100, microseconds=500001), - datetime.timedelta(hours=4, minutes=26, seconds=40), - datetime.timedelta(days=6, hours=18, minutes=26, seconds=40), - datetime.timedelta(hours=4, minutes=26, seconds=40), - datetime.timedelta(days=83, hours=18, minutes=26, seconds=40), - datetime.timedelta(hours=4, minutes=26, seconds=40), - datetime.timedelta(days=6, hours=18, minutes=26, seconds=40), - datetime.timedelta(hours=4, minutes=26, seconds=40), - ) - ) - + [ + [ + *_chain( + ( + d, + datetime.timedelta(seconds=20), + datetime.timedelta(minutes=32, seconds=40), + datetime.timedelta(seconds=20), + ) + for d in ( + datetime.timedelta(days=34, seconds=6100, microseconds=500001), + datetime.timedelta(hours=4, minutes=26, seconds=40), + datetime.timedelta(days=6, hours=18, minutes=26, seconds=40), + datetime.timedelta(hours=4, minutes=26, seconds=40), + datetime.timedelta(days=83, hours=18, minutes=26, seconds=40), + datetime.timedelta(hours=4, minutes=26, seconds=40), + datetime.timedelta(days=6, hours=18, minutes=26, seconds=40), + datetime.timedelta(hours=4, minutes=26, seconds=40), + ) + ), datetime.timedelta(days=266, hours=18, minutes=26, seconds=40), datetime.timedelta(seconds=20), datetime.timedelta(seconds=1), @@ -1390,18 +1390,25 @@ async def test_stop_when_not_running(self): pytest.param( {"months": range(11, 13), "days": [1, 15], "hours": range(7, 5, -1), "minutes": range(3, 1, -1)}, datetime.datetime(2016, 7, 15, 12, 22, 10, 500001), - _chain( - (d, datetime.timedelta(minutes=1), datetime.timedelta(minutes=59), datetime.timedelta(minutes=1)) - for d in ( - datetime.timedelta(days=108, hours=17, minutes=39, seconds=50), - datetime.timedelta(days=13, hours=22, minutes=59), - datetime.timedelta(days=15, hours=22, minutes=59), - datetime.timedelta(days=13, hours=22, minutes=59), - datetime.timedelta(days=320, hours=22, minutes=59), - datetime.timedelta(days=13, hours=22, minutes=59), - ) - ) - + [datetime.timedelta(days=3)], + [ + *_chain( + ( + d, + datetime.timedelta(minutes=1), + datetime.timedelta(minutes=59), + datetime.timedelta(minutes=1), + ) + for d in ( + datetime.timedelta(days=108, hours=17, minutes=39, seconds=50), + datetime.timedelta(days=13, hours=22, minutes=59), + datetime.timedelta(days=15, hours=22, minutes=59), + datetime.timedelta(days=13, hours=22, minutes=59), + datetime.timedelta(days=320, hours=22, minutes=59), + datetime.timedelta(days=13, hours=22, minutes=59), + ) + ), + datetime.timedelta(days=3), + ], datetime.timedelta(days=487, hours=18, minutes=41, seconds=50), [ *( @@ -1536,7 +1543,7 @@ async def test_run( tick_fors: list[datetime.timedelta], sleep_for: datetime.timedelta, expected_dates: list[datetime.datetime], - ): + ) -> None: # Ensure test-data integrity assert start < expected_dates[0], "Start must be before expected dates" assert sorted(expected_dates) == expected_dates, "Expected dates must be sorted" @@ -1544,7 +1551,7 @@ async def test_run( called_at: list[datetime.datetime] = [] @_print_tb - async def callback(): + async def callback() -> None: called_at.append(datetime.datetime.now()) clock.spawn_ticker() @@ -1564,7 +1571,7 @@ async def callback(): @pytest.mark.timeout(_TIMEOUT) @pytest.mark.asyncio - async def test_error_handling(self): + async def test_error_handling(self) -> None: called_at: list[datetime.datetime] = [] @_print_tb @@ -1573,13 +1580,16 @@ async def callback() -> None: clock.spawn_ticker() length = len(called_at) if length == 1: - raise RuntimeError("Not caught") + error_message = "Not caught" + raise RuntimeError(error_message) if length == 2: - raise ValueError("Ignored") + error_message = "Ignored" + raise ValueError(error_message) if length == 3: - raise TypeError("Fatal") + error_message = "Fatal" + raise TypeError(error_message) schedule = ( tanjun.schedules.as_time_schedule(hours=[4, 6], minutes=30)(callback) diff --git a/tests/test_utilities.py b/tests/test_utilities.py index a17fd3c44..25b183288 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2020-2024, Faster Speeding @@ -35,7 +34,7 @@ import tanjun -def test_aliases(): +def test_aliases() -> None: assert set(tanjun.utilities.__all__) == { "ALL_PERMISSIONS", "DM_PERMISSIONS", From 9b13baf645e5af59eeec447995e08d6c66f36265 Mon Sep 17 00:00:00 2001 From: "always-on-duty[bot]" <120557446+always-on-duty[bot]@users.noreply.github.com> Date: Sat, 30 Nov 2024 18:24:49 +0000 Subject: [PATCH 06/10] Freeze PR dependency changes --- uv.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/uv.lock b/uv.lock index 33f2d2781..ee3ffa8fa 100644 --- a/uv.lock +++ b/uv.lock @@ -1475,27 +1475,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.8.0" +version = "0.8.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b2/d6/a2373f3ba7180ddb44420d2a9d1f1510e1a4d162b3d27282bedcb09c8da9/ruff-0.8.0.tar.gz", hash = "sha256:a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44", size = 3276537 } +sdist = { url = "https://files.pythonhosted.org/packages/95/d0/8ff5b189d125f4260f2255d143bf2fa413b69c2610c405ace7a0a8ec81ec/ruff-0.8.1.tar.gz", hash = "sha256:3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f", size = 3313222 } wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/77/e889ee3ce7fd8baa3ed1b77a03b9fb8ec1be68be1418261522fd6a5405e0/ruff-0.8.0-py3-none-linux_armv6l.whl", hash = "sha256:fcb1bf2cc6706adae9d79c8d86478677e3bbd4ced796ccad106fd4776d395fea", size = 10518283 }, - { url = "https://files.pythonhosted.org/packages/da/c8/0a47de01edf19fb22f5f9b7964f46a68d0bdff20144d134556ffd1ba9154/ruff-0.8.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:295bb4c02d58ff2ef4378a1870c20af30723013f441c9d1637a008baaf928c8b", size = 10317691 }, - { url = "https://files.pythonhosted.org/packages/41/17/9885e4a0eeae07abd2a4ebabc3246f556719f24efa477ba2739146c4635a/ruff-0.8.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b1f1c76b47c18fa92ee78b60d2d20d7e866c55ee603e7d19c1e991fad933a9a", size = 9940999 }, - { url = "https://files.pythonhosted.org/packages/3e/cd/46b6f7043597eb318b5f5482c8ae8f5491cccce771e85f59d23106f2d179/ruff-0.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb0d4f250a7711b67ad513fde67e8870109e5ce590a801c3722580fe98c33a99", size = 10772437 }, - { url = "https://files.pythonhosted.org/packages/5d/87/afc95aeb8bc78b1d8a3461717a4419c05aa8aa943d4c9cbd441630f85584/ruff-0.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e55cce9aa93c5d0d4e3937e47b169035c7e91c8655b0974e61bb79cf398d49c", size = 10299156 }, - { url = "https://files.pythonhosted.org/packages/65/fa/04c647bb809c4d65e8eae1ed1c654d9481b21dd942e743cd33511687b9f9/ruff-0.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f4cd64916d8e732ce6b87f3f5296a8942d285bbbc161acee7fe561134af64f9", size = 11325819 }, - { url = "https://files.pythonhosted.org/packages/90/26/7dad6e7d833d391a8a1afe4ee70ca6f36c4a297d3cca83ef10e83e9aacf3/ruff-0.8.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c5c1466be2a2ebdf7c5450dd5d980cc87c8ba6976fb82582fea18823da6fa362", size = 12023927 }, - { url = "https://files.pythonhosted.org/packages/24/a0/be5296dda6428ba8a13bda8d09fbc0e14c810b485478733886e61597ae2b/ruff-0.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2dabfd05b96b7b8f2da00d53c514eea842bff83e41e1cceb08ae1966254a51df", size = 11589702 }, - { url = "https://files.pythonhosted.org/packages/26/3f/7602eb11d2886db545834182a9dbe500b8211fcbc9b4064bf9d358bbbbb4/ruff-0.8.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:facebdfe5a5af6b1588a1d26d170635ead6892d0e314477e80256ef4a8470cf3", size = 12782936 }, - { url = "https://files.pythonhosted.org/packages/4c/5d/083181bdec4ec92a431c1291d3fff65eef3ded630a4b55eb735000ef5f3b/ruff-0.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87a8e86bae0dbd749c815211ca11e3a7bd559b9710746c559ed63106d382bd9c", size = 11138488 }, - { url = "https://files.pythonhosted.org/packages/b7/23/c12cdef58413cee2436d6a177aa06f7a366ebbca916cf10820706f632459/ruff-0.8.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e654f0ded7befe2d61eeaf3d3b1e4ef3894469cd664ffa85006c7720f1e4a2", size = 10744474 }, - { url = "https://files.pythonhosted.org/packages/29/61/a12f3b81520083cd7c5caa24ba61bb99fd1060256482eff0ef04cc5ccd1b/ruff-0.8.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:83a55679c4cb449fa527b8497cadf54f076603cc36779b2170b24f704171ce70", size = 10369029 }, - { url = "https://files.pythonhosted.org/packages/08/2a/c013f4f3e4a54596c369cee74c24870ed1d534f31a35504908b1fc97017a/ruff-0.8.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:812e2052121634cf13cd6fddf0c1871d0ead1aad40a1a258753c04c18bb71bbd", size = 10867481 }, - { url = "https://files.pythonhosted.org/packages/d5/f7/685b1e1d42a3e94ceb25eab23c70bdd8c0ab66a43121ef83fe6db5a58756/ruff-0.8.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:780d5d8523c04202184405e60c98d7595bdb498c3c6abba3b6d4cdf2ca2af426", size = 11237117 }, - { url = "https://files.pythonhosted.org/packages/03/20/401132c0908e8837625e3b7e32df9962e7cd681a4df1e16a10e2a5b4ecda/ruff-0.8.0-py3-none-win32.whl", hash = "sha256:5fdb6efecc3eb60bba5819679466471fd7d13c53487df7248d6e27146e985468", size = 8783511 }, - { url = "https://files.pythonhosted.org/packages/1d/5c/4d800fca7854f62ad77f2c0d99b4b585f03e2d87a6ec1ecea85543a14a3c/ruff-0.8.0-py3-none-win_amd64.whl", hash = "sha256:582891c57b96228d146725975fbb942e1f30a0c4ba19722e692ca3eb25cc9b4f", size = 9559876 }, - { url = "https://files.pythonhosted.org/packages/5b/bc/cc8a6a5ca4960b226dc15dd8fb511dd11f2014ff89d325c0b9b9faa9871f/ruff-0.8.0-py3-none-win_arm64.whl", hash = "sha256:ba93e6294e9a737cd726b74b09a6972e36bb511f9a102f1d9a7e1ce94dd206a6", size = 8939733 }, + { url = "https://files.pythonhosted.org/packages/a2/d6/1a6314e568db88acdbb5121ed53e2c52cebf3720d3437a76f82f923bf171/ruff-0.8.1-py3-none-linux_armv6l.whl", hash = "sha256:fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5", size = 10532605 }, + { url = "https://files.pythonhosted.org/packages/89/a8/a957a8812e31facffb6a26a30be0b5b4af000a6e30c7d43a22a5232a3398/ruff-0.8.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b8a4f7385c2285c30f34b200ca5511fcc865f17578383db154e098150ce0a087", size = 10278243 }, + { url = "https://files.pythonhosted.org/packages/a8/23/9db40fa19c453fabf94f7a35c61c58f20e8200b4734a20839515a19da790/ruff-0.8.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cd054486da0c53e41e0086e1730eb77d1f698154f910e0cd9e0d64274979a209", size = 9917739 }, + { url = "https://files.pythonhosted.org/packages/e2/a0/6ee2d949835d5701d832fc5acd05c0bfdad5e89cfdd074a171411f5ccad5/ruff-0.8.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2029b8c22da147c50ae577e621a5bfbc5d1fed75d86af53643d7a7aee1d23871", size = 10779153 }, + { url = "https://files.pythonhosted.org/packages/7a/25/9c11dca9404ef1eb24833f780146236131a3c7941de394bc356912ef1041/ruff-0.8.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2666520828dee7dfc7e47ee4ea0d928f40de72056d929a7c5292d95071d881d1", size = 10304387 }, + { url = "https://files.pythonhosted.org/packages/c8/b9/84c323780db1b06feae603a707d82dbbd85955c8c917738571c65d7d5aff/ruff-0.8.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:333c57013ef8c97a53892aa56042831c372e0bb1785ab7026187b7abd0135ad5", size = 11360351 }, + { url = "https://files.pythonhosted.org/packages/6b/e1/9d4bbb2ace7aad14ded20e4674a48cda5b902aed7a1b14e6b028067060c4/ruff-0.8.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:288326162804f34088ac007139488dcb43de590a5ccfec3166396530b58fb89d", size = 12022879 }, + { url = "https://files.pythonhosted.org/packages/75/28/752ff6120c0e7f9981bc4bc275d540c7f36db1379ba9db9142f69c88db21/ruff-0.8.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b12c39b9448632284561cbf4191aa1b005882acbc81900ffa9f9f471c8ff7e26", size = 11610354 }, + { url = "https://files.pythonhosted.org/packages/ba/8c/967b61c2cc8ebd1df877607fbe462bc1e1220b4a30ae3352648aec8c24bd/ruff-0.8.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:364e6674450cbac8e998f7b30639040c99d81dfb5bbc6dfad69bc7a8f916b3d1", size = 12813976 }, + { url = "https://files.pythonhosted.org/packages/7f/29/e059f945d6bd2d90213387b8c360187f2fefc989ddcee6bbf3c241329b92/ruff-0.8.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b22346f845fec132aa39cd29acb94451d030c10874408dbf776af3aaeb53284c", size = 11154564 }, + { url = "https://files.pythonhosted.org/packages/55/47/cbd05e5a62f3fb4c072bc65c1e8fd709924cad1c7ec60a1000d1e4ee8307/ruff-0.8.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2f2f7a7e7648a2bfe6ead4e0a16745db956da0e3a231ad443d2a66a105c04fa", size = 10760604 }, + { url = "https://files.pythonhosted.org/packages/bb/ee/4c3981c47147c72647a198a94202633130cfda0fc95cd863a553b6f65c6a/ruff-0.8.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:adf314fc458374c25c5c4a4a9270c3e8a6a807b1bec018cfa2813d6546215540", size = 10391071 }, + { url = "https://files.pythonhosted.org/packages/6b/e6/083eb61300214590b188616a8ac6ae1ef5730a0974240fb4bec9c17de78b/ruff-0.8.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a885d68342a231b5ba4d30b8c6e1b1ee3a65cf37e3d29b3c74069cdf1ee1e3c9", size = 10896657 }, + { url = "https://files.pythonhosted.org/packages/77/bd/aacdb8285d10f1b943dbeb818968efca35459afc29f66ae3bd4596fbf954/ruff-0.8.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d2c16e3508c8cc73e96aa5127d0df8913d2290098f776416a4b157657bee44c5", size = 11228362 }, + { url = "https://files.pythonhosted.org/packages/39/72/fcb7ad41947f38b4eaa702aca0a361af0e9c2bf671d7fd964480670c297e/ruff-0.8.1-py3-none-win32.whl", hash = "sha256:93335cd7c0eaedb44882d75a7acb7df4b77cd7cd0d2255c93b28791716e81790", size = 8803476 }, + { url = "https://files.pythonhosted.org/packages/e4/ea/cae9aeb0f4822c44651c8407baacdb2e5b4dcd7b31a84e1c5df33aa2cc20/ruff-0.8.1-py3-none-win_amd64.whl", hash = "sha256:2954cdbe8dfd8ab359d4a30cd971b589d335a44d444b6ca2cb3d1da21b75e4b6", size = 9614463 }, + { url = "https://files.pythonhosted.org/packages/eb/76/fbb4bd23dfb48fa7758d35b744413b650a9fd2ddd93bca77e30376864414/ruff-0.8.1-py3-none-win_arm64.whl", hash = "sha256:55873cc1a473e5ac129d15eccb3c008c096b94809d693fc7053f588b67822737", size = 8959621 }, ] [[package]] @@ -1617,7 +1617,7 @@ wheels = [ [[package]] name = "typer" -version = "0.13.1" +version = "0.14.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, @@ -1625,9 +1625,9 @@ dependencies = [ { name = "shellingham" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/76/41/49ead3ad3310545e767bcb917c759b026ca9eada5d5c150c2fb6fc555568/typer-0.13.1.tar.gz", hash = "sha256:9d444cb96cc268ce6f8b94e13b4335084cef4c079998a9f4851a90229a3bd25c", size = 98631 } +sdist = { url = "https://files.pythonhosted.org/packages/0d/7e/24af5b9aaa0872f9f6dc5dcf789dc3e57ceb23b4c570b852cd4db0d98f14/typer-0.14.0.tar.gz", hash = "sha256:af58f737f8d0c0c37b9f955a6d39000b9ff97813afcbeef56af5e37cf743b45a", size = 98836 } wheels = [ - { url = "https://files.pythonhosted.org/packages/22/69/e90a0b4d0c16e095901679216c8ecdc728110c7c54e7b5f43a623bc4c789/typer-0.13.1-py3-none-any.whl", hash = "sha256:5b59580fd925e89463a29d363e0a43245ec02765bde9fb77d39e5d0f29dd7157", size = 44723 }, + { url = "https://files.pythonhosted.org/packages/bb/d8/a3ab71d5587b42b832a7ef2e65b3e51a18f8da32b6ce169637d4d21995ed/typer-0.14.0-py3-none-any.whl", hash = "sha256:f476233a25770ab3e7b2eebf7c68f3bc702031681a008b20167573a4b7018f09", size = 44707 }, ] [[package]] From fe8432922901760ad62e9890aef355459c9fee10 Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Sat, 30 Nov 2024 21:20:01 +0000 Subject: [PATCH 07/10] Test fixes --- tests/test_clients.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/test_clients.py b/tests/test_clients.py index c74ebd5bd..b29e06141 100644 --- a/tests/test_clients.py +++ b/tests/test_clients.py @@ -5465,7 +5465,7 @@ async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.Sla async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks, command_dispatch_client.slash_hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -5529,7 +5529,7 @@ async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.Sla async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks, command_dispatch_client.slash_hooks} task = asyncio.current_task() return _() @@ -5591,7 +5591,7 @@ async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.Sla async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks, command_dispatch_client.slash_hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -5710,7 +5710,7 @@ async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.Sla async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks is None mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -5771,7 +5771,7 @@ async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.Sla async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.slash_hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -5835,7 +5835,7 @@ async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.Sla async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6328,7 +6328,7 @@ async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.Menu async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks, command_dispatch_client.menu_hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6392,7 +6392,7 @@ async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.Menu async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks, command_dispatch_client.menu_hooks} task = asyncio.current_task() return _() @@ -6454,7 +6454,7 @@ async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.Menu async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is hooks + assert hooks == {command_dispatch_client.hooks, command_dispatch_client.menu_hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6638,7 +6638,7 @@ async def execution_callback( async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is None + assert hooks == {command_dispatch_client.menu_hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() @@ -6704,7 +6704,7 @@ async def execution_callback( async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value - assert hooks is None + assert hooks == {command_dispatch_client.hooks} mock_ctx_maker.call_args.kwargs["future"].set_result(mock_result) task = asyncio.current_task() From d96bdfb8fd5404eb5496ffabc13e5d475cb6acc6 Mon Sep 17 00:00:00 2001 From: "always-on-duty[bot]" <120557446+always-on-duty[bot]@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:20:30 +0000 Subject: [PATCH 08/10] Freeze PR dependency changes --- uv.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uv.lock b/uv.lock index ee3ffa8fa..80e087059 100644 --- a/uv.lock +++ b/uv.lock @@ -3,11 +3,11 @@ requires-python = ">=3.11.0, <3.14" [[package]] name = "aiohappyeyeballs" -version = "2.4.3" +version = "2.4.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bc/69/2f6d5a019bd02e920a3417689a89887b39ad1e350b562f9955693d900c40/aiohappyeyeballs-2.4.3.tar.gz", hash = "sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586", size = 21809 } +sdist = { url = "https://files.pythonhosted.org/packages/7f/55/e4373e888fdacb15563ef6fa9fa8c8252476ea071e96fb46defac9f18bf2/aiohappyeyeballs-2.4.4.tar.gz", hash = "sha256:5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745", size = 21977 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f7/d8/120cd0fe3e8530df0539e71ba9683eade12cae103dd7543e50d15f737917/aiohappyeyeballs-2.4.3-py3-none-any.whl", hash = "sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572", size = 14742 }, + { url = "https://files.pythonhosted.org/packages/b9/74/fbb6559de3607b3300b9be3cc64e97548d55678e44623db17820dbd20002/aiohappyeyeballs-2.4.4-py3-none-any.whl", hash = "sha256:a980909d50efcd44795c4afeca523296716d50cd756ddca6af8c65b996e27de8", size = 14756 }, ] [[package]] From 307cc516713fcd060b30ade6b469f432407bf129 Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Sun, 1 Dec 2024 00:04:34 +0000 Subject: [PATCH 09/10] More linting fixes --- CHANGELOG.md | 6 ++ docs_src/usage.py | 2 +- pyproject.toml | 46 +++++++--- tanjun/_internal/__init__.py | 15 ++-- tanjun/_internal/localisation.py | 10 ++- tanjun/abc.py | 6 +- tanjun/annotations.py | 11 ++- tanjun/checks.py | 84 ++++++++++-------- tanjun/clients.py | 70 +++++++++------ tanjun/commands/base.py | 6 +- tanjun/commands/menu.py | 4 +- tanjun/commands/message.py | 40 ++++++--- tanjun/commands/slash.py | 42 +++++---- tanjun/components.py | 24 ++--- tanjun/context/autocomplete.py | 13 ++- tanjun/context/menu.py | 2 +- tanjun/context/message.py | 16 +++- tanjun/context/slash.py | 12 ++- tanjun/dependencies/data.py | 4 +- tanjun/dependencies/limiters.py | 4 +- tanjun/errors.py | 11 ++- tanjun/injecting.py | 1 - tanjun/parsing.py | 12 +-- tanjun/schedules.py | 22 ++--- tests/context/test_base.py | 2 +- tests/context/test_menu.py | 4 +- tests/dependencies/test_limiters.py | 46 +++++----- tests/dependencies/test_owners.py | 2 +- tests/test_annotations.py | 12 +-- tests/test_annotations_future_annotations.py | 10 +-- tests/test_checks.py | 92 ++++++++++---------- tests/test_clients.py | 46 +++++++--- tests/test_clients_future_annotations.py | 6 +- 33 files changed, 414 insertions(+), 269 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c09b2011d..a03983784 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Renamed the `case_sensntive` argument to `case_sensitive` in `MessageCommand.find_command`. + +### Deprecated +- The old `case_sensntive` argument alias in `MessageCommand.find_command`. + ## [2.17.7] - 2024-11-24 ### Fixed - Moved away from using `typing.runtime_checkable` as this is unreliable in diff --git a/docs_src/usage.py b/docs_src/usage.py index edb4dde7a..ee8f86b13 100644 --- a/docs_src/usage.py +++ b/docs_src/usage.py @@ -125,7 +125,7 @@ async def message_command(ctx: tanjun.abc.MessageContext) -> None: ... def message_command_group_example() -> None: - # prefixes=["!"] + # . prefixes=["!"] @tanjun.as_message_command_group("groupy") async def groupy_group(ctx: tanjun.abc.MessageContext) -> None: ... diff --git a/pyproject.toml b/pyproject.toml index 1142c9919..695e0cb24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -112,10 +112,14 @@ select = ["ALL"] ignore = [ "ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `` "COM812", # Trailing comma missing (incompatible with black) + "D102", # Missing docstring in public method + "D105", # Missing docstring in magic method "FIX002", # Line contains TODO, consider resolving the issue "I001", # [*] Import block is un-sorted or un-formatted + "N818", # Exception name `FailedModuleUnload` should be named with an Error suffix "PYI041", # Use `float` instead of `int | float` "S101", # Use of `assert` detected + "SIM105", # Use `contextlib.suppress(Error)` instead of `try`-`except`-`pass` "SIM108", # Use ternary operator `` instead of `if`-`else`-block "TD002", # Missing author in TODO; try: `# TODO(): ...` or `# TODO @: ...` "TD003", # Missing issue link on the line following this TODO @@ -123,29 +127,46 @@ ignore = [ [tool.ruff.lint.per-file-ignores] "docs_src/**/*.py" = [ + "ARG001", # Unused function argument: `` "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable "D100", # Missing docstring in public module "D101", # Missing docstring in public class "D102", # Missing docstring in public method "D103", # Missing docstring in public function + "FBT002", # Boolean default positional argument in function definition "F841", # Local variable `` is assigned to but never used "INP001", # File `` is part of an implicit namespace package. Add an `__init__.py`. + "N806", # Variable `` in function should be lowercase "PIE790", # [*] Unnecessary `...` literal + "PYI013", # [*] Non-empty class body must not contain `...` "T201", # `print` found ] -"noxfile.py" = [ - "F403", # `from noxfile import *` used; unable to detect undefined name -] -"tests/**/*.py" = [ +"examples/**/*.py" = [ + "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable "D100", # Missing docstring in public module "D101", # Missing docstring in public class "D102", # Missing docstring in public method "D103", # Missing docstring in public function - "D104", # Missing docstring in public package "FBT001", # Boolean-typed positional argument in function definition - "PGH003", # Use specific rule codes when ignoring type issues - "PLR2004", # Magic value used in comparison, consider replacing `` with a constant variable - "SLF001", # Private member accessed: `` + "PIE790", # [*] Unnecessary `...` literal + "PYI013", # [*] Non-empty class body must not contain `...` +] +"noxfile.py" = [ + "F403", # `from noxfile import *` used; unable to detect undefined name +] +"tests/**/*.py" = [ + "D100", # Missing docstring in public module + "D101", # Missing docstring in public class + "D102", # Missing docstring in public method + "D103", # Missing docstring in public function + "D104", # Missing docstring in public package + "FBT001", # Boolean-typed positional argument in function definition + "FBT002", # Boolean default positional argument in function definition + "FBT003", # Boolean positional value in function call + "PLR0915", # Too many statements + "PGH003", # Use specific rule codes when ignoring type issues + "PLR2004", # Magic value used in comparison, consider replacing `` with a constant variable + "SLF001", # Private member accessed: `` ] "tests/test_annotations_future_annotations.py" = [ "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable @@ -156,6 +177,9 @@ ignore = [ "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable "UP007", # [*] Use `X | Y` for type annotations ] +"tests/test_checks.py" = [ + "ARG002", # Unused method argument: `` +] "tests/test_clients_future_annotations.py" = [ "B008", # Do not perform function call `` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable "PLW0603", # Using the global statement to update `` is discouraged @@ -192,8 +216,10 @@ max-line-length = 130 convention = "numpy" [tool.ruff.lint.pylint] -max-args = 12 -max-branches = 15 +max-args = 20 +max-branches = 20 +max-returns = 15 +max-statements = 100 [tool.isort] profile = "black" diff --git a/tanjun/_internal/__init__.py b/tanjun/_internal/__init__.py index 146e58fde..35e394424 100644 --- a/tanjun/_internal/__init__.py +++ b/tanjun/_internal/__init__.py @@ -284,7 +284,7 @@ class _WrappedProto(typing.Protocol): def _has_wrapped(value: typing.Any, /) -> typing.TypeGuard[_WrappedProto]: try: - value.wrapped_command + value.wrapped_command # noqa: B018 except AttributeError: return False @@ -467,7 +467,7 @@ def cmp_command( opts = cmd.options or () other_opts = other.options or () - return len(opts) == len(other_opts) and all(itertools.starmap(operator.eq, zip(opts, other_opts))) + return len(opts) == len(other_opts) and all(itertools.starmap(operator.eq, zip(opts, other_opts, strict=True))) return True @@ -493,9 +493,8 @@ class MessageCommandIndex: def __init__( self, - strict: bool, - /, *, + strict: bool, commands: list[tanjun.MessageCommand[typing.Any]] | None = None, names_to_commands: dict[str, tuple[str, tanjun.MessageCommand[typing.Any]]] | None = None, search_tree: _TreeT | None = None, @@ -553,7 +552,9 @@ def add(self, command: tanjun.MessageCommand[typing.Any], /) -> bool: # Case insensitive keys are used here as a subsequent check against the original # name can be used for case-sensitive lookup. - self.names_to_commands.update((key, (name, command)) for key, name in zip(insensitive_names, names)) + self.names_to_commands.update( + (key, (name, command)) for key, name in zip(insensitive_names, names, strict=True) + ) else: # strict indexes avoid using the search tree all together. # This needs to be explicitly typed for MyPy. @@ -602,7 +603,7 @@ def copy(self, *, parent: tanjun.MessageCommandGroup[typing.Any] | None = None) commands = {command: command.copy(parent=parent) for command in self.commands} memo = {id(command): new_command for command, new_command in commands.items()} return MessageCommandIndex( - self.is_strict, + strict=self.is_strict, commands=list(commands.values()), names_to_commands={ key: (name, commands[command]) for key, (name, command) in self.names_to_commands.items() @@ -611,7 +612,7 @@ def copy(self, *, parent: tanjun.MessageCommandGroup[typing.Any] | None = None) ) def find( - self, content: str, case_sensitive: bool, / + self, content: str, /, *, case_sensitive: bool ) -> collections.Iterator[tuple[str, tanjun.MessageCommand[typing.Any]]]: """Find commands in the index. diff --git a/tanjun/_internal/localisation.py b/tanjun/_internal/localisation.py index 69a7ae3a0..07ef4b7e3 100644 --- a/tanjun/_internal/localisation.py +++ b/tanjun/_internal/localisation.py @@ -213,6 +213,8 @@ def assert_length(self, min_length: int, max_length: int, /) -> Self: _UnnamedFields = typing.Literal["description", "name"] _FieldType = NamedFields | _UnnamedFields +_FIELD_NAME_EXCLUDE = {"name", "description"} + @typing.overload def to_localise_id( @@ -254,13 +256,13 @@ def to_localise_id( The generated localied field ID. """ if field_name: - if field_type == "name" or field_type == "description": + if field_type in _FIELD_NAME_EXCLUDE: error_message = f"Field_name must not be provided for {field_type} fields" raise RuntimeError(error_message) return f"{command_type}:{command_name}:{field_type}:{field_name}" - if field_type != "name" and field_type != "description": + if field_type not in _FIELD_NAME_EXCLUDE: error_message = f"Field_name must be provided for {field_type} fields" raise RuntimeError(error_message) @@ -317,5 +319,5 @@ def _localise_slash_option( choice.name_localizations.update(name_variants) if option.options: - for option in option.options: - _localise_slash_option(option, name, localiser) + for opt in option.options: + _localise_slash_option(opt, name, localiser) diff --git a/tanjun/abc.py b/tanjun/abc.py index 29063b2b6..2de20acb6 100644 --- a/tanjun/abc.py +++ b/tanjun/abc.py @@ -249,7 +249,7 @@ class _DefaultFlag(enum.Enum): NO_DEFAULT = object() - NO_PASS = object() + NO_PASS = object() # noqa: PIE796 NO_DEFAULT: NoDefault = _DefaultFlag.NO_DEFAULT @@ -1356,7 +1356,7 @@ def type(self) -> hikari.CommandType: """Type of application command this context is for.""" @abc.abstractmethod - def set_ephemeral_default(self, state: bool, /) -> Self: + def set_ephemeral_default(self, state: bool, /) -> Self: # noqa: FBT001 """Set the ephemeral default state for this context. Parameters @@ -4493,7 +4493,7 @@ def iter_menu_commands( def iter_menu_commands( self, *, global_only: bool = False, type: hikari.CommandType | None = None # noqa: A002 ) -> collections.Iterator[MenuCommand[typing.Any, typing.Any]]: - """Iterator over the menu commands registered to this client. + """Iterate over the menu commands registered to this client. Parameters ---------- diff --git a/tanjun/annotations.py b/tanjun/annotations.py index bc83acc47..4ba001a6f 100644 --- a/tanjun/annotations.py +++ b/tanjun/annotations.py @@ -1730,7 +1730,9 @@ def __init__( """ if default is not tanjun.NO_DEFAULT: warnings.warn( - "Flag.__init__'s `default` argument is deprecated, use Default instead", category=DeprecationWarning + "Flag.__init__'s `default` argument is deprecated, use Default instead", + stacklevel=2, + category=DeprecationWarning, ) self._aliases = aliases @@ -2519,8 +2521,11 @@ def add_to_slash_cmds(self, commands: collections.Sequence[slash.SlashCommand[ty return self - SLASH_OPTION_ADDER: dict[ - typing.Any, collections.Callable[[Self, slash.SlashCommand[typing.Any], str], slash.SlashCommand[typing.Any]] + SLASH_OPTION_ADDER: typing.ClassVar[ + dict[ + typing.Any, + collections.Callable[[Self, slash.SlashCommand[typing.Any], str], slash.SlashCommand[typing.Any]], + ] ] = { hikari.Attachment: lambda self, c, d: c.add_attachment_option( self.slash_name, d, default=self.default, key=self.key diff --git a/tanjun/checks.py b/tanjun/checks.py index 625dc04ce..bafd08c6e 100644 --- a/tanjun/checks.py +++ b/tanjun/checks.py @@ -88,17 +88,17 @@ async def __call__( _ContextT = typing.TypeVar("_ContextT", bound=tanjun.Context) -def _add_to_command(command: _CommandT, check: tanjun.AnyCheckSig, follow_wrapped: bool) -> _CommandT: +def _add_to_command(command: _CommandT, check: tanjun.AnyCheckSig, *, follow_wrapped: bool) -> _CommandT: return _internal.apply_to_wrapped(command, lambda c: c.add_check(check), command, follow_wrapped=follow_wrapped) def _optional_kwargs( - command: _CommandT | None, check: tanjun.AnyCheckSig, follow_wrapped: bool + command: _CommandT | None, check: tanjun.AnyCheckSig, *, follow_wrapped: bool ) -> _CommandT | collections.Callable[[_CommandT], _CommandT]: if command: - return _add_to_command(command, check, follow_wrapped) + return _add_to_command(command, check, follow_wrapped=follow_wrapped) - return lambda c: _add_to_command(c, check, follow_wrapped) + return lambda c: _add_to_command(c, check, follow_wrapped=follow_wrapped) class _Check: @@ -108,9 +108,9 @@ def __init__( self, error: collections.Callable[..., Exception] | None, error_message: str | collections.Mapping[str, str] | None, - halt_execution: bool, /, *, + halt_execution: bool, id_name: str | None = None, ) -> None: self._error = error @@ -121,10 +121,10 @@ def __init__( def _handle_result( self, ctx: tanjun.Context, - result: bool, localiser: dependencies.AbstractLocaliser | None = None, /, *args: typing.Any, + result: bool, ) -> bool: if not result: if self._error: @@ -175,7 +175,7 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) async def __call__( self, @@ -185,7 +185,8 @@ async def __call__( *, localiser: alluka.Injected[dependencies.AbstractLocaliser | None] = None, ) -> bool: - return self._handle_result(ctx, await dependency.check_ownership(ctx.client, ctx.author), localiser) + result = await dependency.check_ownership(ctx.client, ctx.author) + return self._handle_result(ctx, localiser, result=result) async def _get_is_nsfw(ctx: tanjun.Context, /, *, dm_default: bool) -> bool: @@ -232,12 +233,13 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) async def __call__( self, ctx: tanjun.Context, /, *, localiser: alluka.Injected[dependencies.AbstractLocaliser | None] = None ) -> bool: - return self._handle_result(ctx, await _get_is_nsfw(ctx, dm_default=True), localiser) + result = await _get_is_nsfw(ctx, dm_default=True) + return self._handle_result(ctx, localiser, result=result) class SfwCheck(_Check): @@ -277,12 +279,13 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) async def __call__( self, ctx: tanjun.Context, /, *, localiser: alluka.Injected[dependencies.AbstractLocaliser | None] = None ) -> bool: - return self._handle_result(ctx, not await _get_is_nsfw(ctx, dm_default=False), localiser) + result = await _get_is_nsfw(ctx, dm_default=False) + return self._handle_result(ctx, localiser, result=not result) class DmCheck(_Check): @@ -322,12 +325,12 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) def __call__( self, ctx: tanjun.Context, /, *, localiser: alluka.Injected[dependencies.AbstractLocaliser | None] = None ) -> bool: - return self._handle_result(ctx, ctx.guild_id is None, localiser) + return self._handle_result(ctx, localiser, result=ctx.guild_id is None) class GuildCheck(_Check): @@ -367,12 +370,12 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) def __call__( self, ctx: tanjun.Context, /, *, localiser: alluka.Injected[dependencies.AbstractLocaliser | None] = None ) -> bool: - return self._handle_result(ctx, ctx.guild_id is not None, localiser) + return self._handle_result(ctx, localiser, result=ctx.guild_id is not None) class AuthorPermissionCheck(_Check): @@ -425,7 +428,7 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) self._permissions = permissions async def __call__( @@ -450,7 +453,7 @@ async def __call__( perms = await permissions.fetch_permissions(ctx.client, ctx.member, channel=ctx.channel_id) missing_perms = ~perms & self._permissions - return self._handle_result(ctx, missing_perms is hikari.Permissions.NONE, localiser, missing_perms) + return self._handle_result(ctx, localiser, missing_perms, result=missing_perms is hikari.Permissions.NONE) _MemberCacheT = None | dependencies.SfGuildBound[hikari.Member] @@ -506,7 +509,7 @@ def __init__( This takes priority over `error_message`. """ - super().__init__(error, error_message, halt_execution) + super().__init__(error, error_message, halt_execution=halt_execution) self._permissions = permissions async def __call__( @@ -515,7 +518,7 @@ async def __call__( /, *, localiser: alluka.Injected[dependencies.AbstractLocaliser | None] = None, - my_user: hikari.OwnUser = dependencies.inject_lc(hikari.OwnUser), + my_user: hikari.OwnUser = dependencies.inject_lc(hikari.OwnUser), # noqa: B008 member_cache: alluka.Injected[_MemberCacheT] = None, ) -> bool: if ctx.guild_id is None: @@ -534,7 +537,7 @@ async def __call__( perms = await permissions.fetch_permissions(ctx.client, member, channel=ctx.channel_id) missing_perms = ~perms & self._permissions - return self._handle_result(ctx, missing_perms is hikari.Permissions.NONE, localiser, missing_perms) + return self._handle_result(ctx, localiser, missing_perms, result=missing_perms is hikari.Permissions.NONE) @typing.overload @@ -593,7 +596,9 @@ def with_dm_check( The command this check was added to. """ return _optional_kwargs( - command, DmCheck(error=error, halt_execution=halt_execution, error_message=error_message), follow_wrapped + command, + DmCheck(error=error, halt_execution=halt_execution, error_message=error_message), + follow_wrapped=follow_wrapped, ) @@ -653,7 +658,9 @@ def with_guild_check( The command this check was added to. """ return _optional_kwargs( - command, GuildCheck(error=error, halt_execution=halt_execution, error_message=error_message), follow_wrapped + command, + GuildCheck(error=error, halt_execution=halt_execution, error_message=error_message), + follow_wrapped=follow_wrapped, ) @@ -713,7 +720,9 @@ def with_nsfw_check( The command this check was added to. """ return _optional_kwargs( - command, NsfwCheck(error=error, halt_execution=halt_execution, error_message=error_message), follow_wrapped + command, + NsfwCheck(error=error, halt_execution=halt_execution, error_message=error_message), + follow_wrapped=follow_wrapped, ) @@ -773,7 +782,9 @@ def with_sfw_check( The command this check was added to. """ return _optional_kwargs( - command, SfwCheck(error=error, halt_execution=halt_execution, error_message=error_message), follow_wrapped + command, + SfwCheck(error=error, halt_execution=halt_execution, error_message=error_message), + follow_wrapped=follow_wrapped, ) @@ -833,7 +844,9 @@ def with_owner_check( The command this check was added to. """ return _optional_kwargs( - command, OwnerCheck(error=error, halt_execution=halt_execution, error_message=error_message), follow_wrapped + command, + OwnerCheck(error=error, halt_execution=halt_execution, error_message=error_message), + follow_wrapped=follow_wrapped, ) @@ -890,7 +903,7 @@ def with_author_permission_check( return lambda command: _add_to_command( command, AuthorPermissionCheck(permissions, error=error, halt_execution=halt_execution, error_message=error_message), - follow_wrapped, + follow_wrapped=follow_wrapped, ) @@ -947,7 +960,7 @@ def with_own_permission_check( return lambda command: _add_to_command( command, OwnPermissionCheck(permissions, error=error, halt_execution=halt_execution, error_message=error_message), - follow_wrapped, + follow_wrapped=follow_wrapped, ) @@ -998,7 +1011,7 @@ def with_check( collections.abc.Callable[[tanjun.abc.ExecutableCommand], tanjun.abc.ExecutableCommand] A command decorator callback which adds the check. """ - return lambda command: _add_to_command(command, check, follow_wrapped) + return lambda command: _add_to_command(command, check, follow_wrapped=follow_wrapped) class _AllChecks(typing.Generic[_ContextT]): @@ -1099,7 +1112,7 @@ def with_all_checks( collections.abc.Callable[[tanjun.abc.Context], collections.abc.Coroutine[typing.Any, typing.Any, bool]] A check which will pass if all of the provided check callbacks pass. """ - return lambda c: _add_to_command(c, all_checks(check, *checks), follow_wrapped) + return lambda c: _add_to_command(c, all_checks(check, *checks), follow_wrapped=follow_wrapped) class _AnyChecks(_Check, typing.Generic[_ContextT]): @@ -1110,10 +1123,11 @@ def __init__( checks: list[tanjun.CheckSig[_ContextT]], error: collections.Callable[[], Exception] | None, error_message: str | collections.Mapping[str, str] | None, - halt_execution: bool, suppress: tuple[type[Exception], ...], + *, + halt_execution: bool, ) -> None: - super().__init__(error, error_message, halt_execution, id_name="any_check") + super().__init__(error, error_message, halt_execution=halt_execution, id_name="any_check") self._checks = checks self._suppress = suppress @@ -1131,7 +1145,7 @@ async def __call__( except self._suppress: pass - return self._handle_result(ctx, False, localiser) + return self._handle_result(ctx, localiser, result=False) def any_checks( @@ -1176,7 +1190,7 @@ def any_checks( collections.abc.Callable[[tanjun.abc.ExecutableCommand], tanjun.abc.ExecutableCommand] A decorator which adds the generated check to a command. """ - return _AnyChecks[_ContextT]([check, *checks], error, error_message, halt_execution, suppress) + return _AnyChecks[_ContextT]([check, *checks], error, error_message, suppress, halt_execution=halt_execution) @typing.overload @@ -1287,5 +1301,5 @@ def with_any_checks( any_checks( check, *checks, error=error, error_message=error_message, halt_execution=halt_execution, suppress=suppress ), - follow_wrapped, + follow_wrapped=follow_wrapped, ) diff --git a/tanjun/clients.py b/tanjun/clients.py index 34c797e75..82bac857f 100644 --- a/tanjun/clients.py +++ b/tanjun/clients.py @@ -153,11 +153,15 @@ class _GatewayBotProto(hikari.EventManagerAware, hikari.RESTAware, hikari.ShardA _LOGGER: typing.Final[logging.Logger] = logging.getLogger("hikari.tanjun.clients") _MENU_TYPES = frozenset((hikari.CommandType.MESSAGE, hikari.CommandType.USER)) +_MAX_MENU_COUNT = 5 +_MAX_SLASH_COUNT = 100 + class _LoaderDescriptor(tanjun.ClientLoader): # Slots mess with functools.update_wrapper def __init__( self, callback: collections.Callable[[Client], None] | collections.Callable[[tanjun.Client], None], + *, standard_impl: bool, ) -> None: self._callback = callback @@ -196,6 +200,7 @@ class _UnloaderDescriptor(tanjun.ClientLoader): # Slots mess with functools.upd def __init__( self, callback: collections.Callable[[Client], None] | collections.Callable[[tanjun.Client], None], + *, standard_impl: bool, ) -> None: self._callback = callback @@ -292,12 +297,12 @@ def as_loader( The decorated load callback. """ if callback: - return _LoaderDescriptor(callback, standard_impl) + return _LoaderDescriptor(callback, standard_impl=standard_impl) def decorator( callback: collections.Callable[[tanjun.Client], None], / ) -> collections.Callable[[tanjun.Client], None]: - return _LoaderDescriptor(callback, standard_impl) + return _LoaderDescriptor(callback, standard_impl=standard_impl) return decorator @@ -366,12 +371,12 @@ def as_unloader( The decorated unload callback. """ if callback: - return _UnloaderDescriptor(callback, standard_impl) + return _UnloaderDescriptor(callback, standard_impl=standard_impl) def decorator( callback: collections.Callable[[tanjun.Client], None], / ) -> collections.Callable[[tanjun.Client], None]: - return _UnloaderDescriptor(callback, standard_impl) + return _UnloaderDescriptor(callback, standard_impl=standard_impl) return decorator @@ -488,8 +493,9 @@ def _log_clients( server: hikari.api.InteractionServer | None, rest: hikari.api.RESTClient, shards: hikari.ShardAware | None, - event_managed: bool, /, + *, + event_managed: bool, ) -> None: _LOGGER.info( "%s initialised with the following components: %s", @@ -719,7 +725,7 @@ def __init__( * If `command_ids` is passed when `declare_global_commands` is `False`. """ if _LOGGER.isEnabledFor(logging.INFO): - _log_clients(cache, events, server, rest, shards, event_managed) + _log_clients(cache, events, server, rest, shards, event_managed=event_managed) if not events and not server: _LOGGER.warning( @@ -778,7 +784,7 @@ def __init__( events.subscribe(hikari.StoppingEvent, self._on_stopping) ( - self.set_type_dependency(tanjun.Client, self) + self.set_type_dependency(tanjun.Client, self) # noqa: SLF001 .set_type_dependency(Client, self) .set_type_dependency(type(self), self) .set_type_dependency(hikari.api.RESTClient, rest) @@ -797,9 +803,9 @@ def __init__( dependencies.set_standard_dependencies(self) self._schedule_startup_registers( - set_global_commands, - declare_global_commands, - command_ids, + set_global_commands=set_global_commands, + declare_global_commands=declare_global_commands, + command_ids=command_ids, message_ids=message_ids, user_ids=user_ids, _stack_level=_stack_level, @@ -813,6 +819,7 @@ def _maybe_set_type_dep(self, type_: type[_T], value: _T | None, /) -> Self: def _schedule_startup_registers( self, + *, set_global_commands: hikari.SnowflakeishOr[hikari.PartialGuild] | bool = False, declare_global_commands: ( hikari.SnowflakeishSequence[hikari.PartialGuild] | hikari.SnowflakeishOr[hikari.PartialGuild] | bool @@ -1134,7 +1141,7 @@ def from_rest_bot( return self - async def __aenter__(self) -> Client: + async def __aenter__(self) -> Self: await self.open() return self @@ -1496,16 +1503,22 @@ async def declare_application_commands( "registered for them " + ", ".join(f"{type_}:{name}" for type_, name in conflicts) ) - if message_count > 5: - error_message = "You can only declare up to 5 top level message context menus in a guild or globally" + if message_count > _MAX_MENU_COUNT: + error_message = ( + "You can only declare up to {_MAX_MENU_COUNT} top level message context menus in a guild or globally" + ) raise ValueError(error_message) - if slash_count > 100: - error_message = "You can only declare up to 100 top level slash commands in a guild or globally" + if slash_count > _MAX_SLASH_COUNT: + error_message = ( + f"You can only declare up to {_MAX_SLASH_COUNT} top level slash commands in a guild or globally" + ) raise ValueError(error_message) - if user_count > 5: - error_message = "You can only declare up to 5 top level message context menus in a guild or globally" + if user_count > _MAX_MENU_COUNT: + error_message = ( + f"You can only declare up to {_MAX_MENU_COUNT} top level message context menus in a guild or globally" + ) raise ValueError(error_message) application = application or self._cached_application_id or await self.fetch_rest_application_id() @@ -1551,7 +1564,7 @@ def set_auto_defer_after(self, time: float | None, /) -> Self: self._auto_defer_after = float(time) if time is not None else None return self - def set_case_sensitive(self, state: bool, /) -> Self: + def set_case_sensitive(self, state: bool, /) -> Self: # noqa: FBT001 """Set whether this client defaults to being case sensitive for message commands. Parameters @@ -1589,7 +1602,7 @@ def set_default_app_command_permissions(self, permissions: int | hikari.Permissi self._default_app_cmd_permissions = hikari.Permissions(permissions) return self - def set_dms_enabled_for_app_cmds(self, state: bool, /) -> Self: + def set_dms_enabled_for_app_cmds(self, state: bool, /) -> Self: # noqa: FBT001 """Set whether this clients's commands should be enabled in DMs. Parameters @@ -1611,7 +1624,7 @@ def set_dms_enabled_for_app_cmds(self, state: bool, /) -> Self: self._dms_enabled_for_app_cmds = state return self - def set_ephemeral_default(self, state: bool, /) -> Self: + def set_ephemeral_default(self, state: bool, /) -> Self: # noqa: FBT001 """Set whether slash contexts spawned by this client should default to ephemeral responses. This defaults to [False][] if not explicitly set. @@ -1861,7 +1874,7 @@ def set_slash_ctx_maker(self, maker: _SlashContextMakerProto = context.SlashCont self._make_slash_context = maker return self - def set_human_only(self, value: bool = True, /) -> Self: + def set_human_only(self, value: bool = True, /) -> Self: # noqa: FBT001, FBT002 """Set whether or not message commands execution should be limited to "human" users. !!! note @@ -2591,7 +2604,8 @@ def _load_module( def load_modules(self, *modules: str | pathlib.Path) -> Self: # <>. - for module_path in modules: + for path in modules: + module_path = path if isinstance(module_path, pathlib.Path): module_path = _normalize_path(module_path) @@ -2613,7 +2627,8 @@ def load_modules(self, *modules: str | pathlib.Path) -> Self: async def load_modules_async(self, *modules: str | pathlib.Path) -> None: # <>. loop = asyncio.get_running_loop() - for module_path in modules: + for path in modules: + module_path = path if isinstance(module_path, pathlib.Path): module_path = await loop.run_in_executor(None, _normalize_path, module_path) @@ -2632,7 +2647,8 @@ async def load_modules_async(self, *modules: str | pathlib.Path) -> None: def unload_modules(self, *modules: str | pathlib.Path) -> Self: # <>. - for module_path in modules: + for path in modules: + module_path = path if isinstance(module_path, str): modules_dict: dict[typing.Any, types.ModuleType] = self._modules @@ -2705,7 +2721,8 @@ def _reload_module( def reload_modules(self, *modules: str | pathlib.Path) -> Self: # <>. - for module_path in modules: + for path in modules: + module_path = path if isinstance(module_path, pathlib.Path): module_path = _normalize_path(module_path) @@ -2727,7 +2744,8 @@ def reload_modules(self, *modules: str | pathlib.Path) -> Self: async def reload_modules_async(self, *modules: str | pathlib.Path) -> None: # <>. loop = asyncio.get_running_loop() - for module_path in modules: + for path in modules: + module_path = path if isinstance(module_path, pathlib.Path): module_path = await loop.run_in_executor(None, _normalize_path, module_path) diff --git a/tanjun/commands/base.py b/tanjun/commands/base.py index db2d2e973..5916003a0 100644 --- a/tanjun/commands/base.py +++ b/tanjun/commands/base.py @@ -82,9 +82,9 @@ def metadata(self) -> collections.MutableMapping[typing.Any, typing.Any]: def copy(self) -> Self: # <>. inst = copy.copy(self) - inst._checks = [copy.copy(check) for check in self._checks] - inst._hooks = self._hooks.copy() if self._hooks else None - inst._metadata = self._metadata.copy() + inst._checks = [copy.copy(check) for check in self._checks] # noqa: SLF001 + inst._hooks = self._hooks.copy() if self._hooks else None # noqa: SLF001 + inst._metadata = self._metadata.copy() # noqa: SLF001 return inst def set_hooks(self, hooks: tanjun.Hooks[_ContextT] | None, /) -> Self: diff --git a/tanjun/commands/menu.py b/tanjun/commands/menu.py index 709ece29f..d516855b8 100644 --- a/tanjun/commands/menu.py +++ b/tanjun/commands/menu.py @@ -542,7 +542,7 @@ def __init__( else: - async def __call__(self, *args, **kwargs) -> None: + async def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> None: await self._callback(*args, **kwargs) @property @@ -665,7 +665,7 @@ async def check_context(self, ctx: tanjun.MenuContext, /) -> bool: def copy(self, *, parent: tanjun.SlashCommandGroup | None = None) -> Self: # <>. inst = super().copy() - inst._parent = parent + inst._parent = parent # noqa: SLF001 return inst async def execute( diff --git a/tanjun/commands/message.py b/tanjun/commands/message.py index 336b58857..d6b9cbcc5 100644 --- a/tanjun/commands/message.py +++ b/tanjun/commands/message.py @@ -34,6 +34,9 @@ import copy import typing +import warnings + +import typing_extensions from tanjun import _internal from tanjun import abc as tanjun @@ -56,7 +59,7 @@ ) # Pyright bug doesn't accept Var = Class | Class as a type - _CallbackishT = typing.Union[_AnyCommandT["_MessageCallbackSigT"], "_MessageCallbackSigT"] + _CallbackishT = typing.Union[_AnyCommandT["_MessageCallbackSigT"], "_MessageCallbackSigT"] # noqa: UP007 _OtherCallbackSigT = typing.TypeVar("_OtherCallbackSigT", bound=tanjun.MessageCallbackSig) @@ -247,7 +250,7 @@ def __repr__(self) -> str: else: - async def __call__(self, *args, **kwargs) -> None: + async def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> None: await self._callback(*args, **kwargs) @property @@ -294,10 +297,10 @@ def bind_component(self, component: tanjun.Component, /) -> Self: def copy(self, *, parent: tanjun.MessageCommandGroup[typing.Any] | None = None) -> Self: # <>. inst = super().copy() - inst._callback = copy.copy(self._callback) - inst._names = self._names.copy() - inst._parent = parent - inst._parser = self._parser.copy() if self._parser else None + inst._callback = copy.copy(self._callback) # noqa: SLF001 + inst._names = self._names.copy() # noqa: SLF001 + inst._parent = parent # noqa: SLF001 + inst._parser = self._parser.copy() if self._parser else None # noqa: SLF001 return inst def set_parent(self, parent: tanjun.MessageCommandGroup[typing.Any] | None, /) -> Self: @@ -431,7 +434,7 @@ def __init__( Whether to validate that option keys match the command callback's signature. """ super().__init__(callback, name, *names, validate_arg_keys=validate_arg_keys, _wrapped_command=_wrapped_command) - self._commands = _internal.MessageCommandIndex(strict) + self._commands = _internal.MessageCommandIndex(strict=strict) def __repr__(self) -> str: return f"CommandGroup <{len(self._commands.commands)}: {self._names}>" @@ -448,7 +451,7 @@ def is_strict(self) -> bool: def copy(self, *, parent: tanjun.MessageCommandGroup[typing.Any] | None = None) -> Self: # <>. inst = super().copy(parent=parent) - inst._commands = self._commands.copy(parent=self) + inst._commands = self._commands.copy(parent=self) # noqa: SLF001 return inst def add_command(self, command: tanjun.MessageCommand[typing.Any], /) -> Self: @@ -570,10 +573,27 @@ def bind_component(self, component: tanjun.Component, /) -> Self: return self + @typing.overload + def find_command( + self, content: str, /, *, case_sensitive: bool = True + ) -> collections.Iterable[tuple[str, tanjun.MessageCommand[typing.Any]]]: ... + + @typing.overload + @typing_extensions.deprecated("case_sensntive has been renamed to case_sensitive") def find_command( self, content: str, /, *, case_sensntive: bool = True + ) -> collections.Iterable[tuple[str, tanjun.MessageCommand[typing.Any]]]: ... + + def find_command( + self, content: str, /, *, case_sensntive: bool | None = None, case_sensitive: bool = True ) -> collections.Iterable[tuple[str, tanjun.MessageCommand[typing.Any]]]: - return self._commands.find(content, case_sensntive) + if case_sensntive is not None: + warnings.warn( + "case_sensntive has been renamed to case_sensitive", stacklevel=2, category=DeprecationWarning + ) + case_sensitive = case_sensntive + + return self._commands.find(content, case_sensitive=case_sensitive) async def execute( self, ctx: tanjun.MessageContext, /, *, hooks: collections.MutableSet[tanjun.MessageHooks] | None = None @@ -593,7 +613,7 @@ async def execute( if ctx.component and ctx.component.is_case_sensitive is not None: case_sensitive = ctx.component.is_case_sensitive - for name, command in self._commands.find(ctx.content, case_sensitive): + for name, command in self._commands.find(ctx.content, case_sensitive=case_sensitive): if await command.check_context(ctx): content = ctx.content[len(name) :] ctx.set_triggering_name(ctx.triggering_name + " " + name) diff --git a/tanjun/commands/slash.py b/tanjun/commands/slash.py index 9c8a3dd9c..7e322c8be 100644 --- a/tanjun/commands/slash.py +++ b/tanjun/commands/slash.py @@ -83,9 +83,9 @@ ) # Pyright bug doesn't accept Var = Class | Class as a type - _AnyConverterSig = typing.Union["ConverterSig[float]", "ConverterSig[int]", "ConverterSig[str]"] + _AnyConverterSig = typing.Union["ConverterSig[float]", "ConverterSig[int]", "ConverterSig[str]"] # noqa: UP007 # Pyright bug doesn't accept Var = Class | Class as a type - _CallbackishT = typing.Union["_SlashCallbackSigT", _AnyCommandT["_SlashCallbackSigT"]] + _CallbackishT = typing.Union["_SlashCallbackSigT", _AnyCommandT["_SlashCallbackSigT"]] # noqa: UP007 _IntAutocompleteSigT = typing.TypeVar("_IntAutocompleteSigT", bound=tanjun.AutocompleteSig[int]) _FloatAutocompleteSigT = typing.TypeVar("_FloatAutocompleteSigT", bound=tanjun.AutocompleteSig[float]) @@ -126,6 +126,12 @@ ) ) _VALID_NAME_CHARACTERS = frozenset(("-", "_")) +_MAX_OPTIONS = 25 + +_DEVI_FIRST_CHAR = 0x0900 +_DEVI_LAST_CHAR = 0x097F +_THAI_FIRST_CHAR = 0x0E00 +_THAI_LAST_CHAR = 0x0E7F def _check_name_char(character: str, /) -> bool: @@ -139,8 +145,8 @@ def _check_name_char(character: str, /) -> bool: return ( character in _VALID_NAME_CHARACTERS or unicodedata.category(character) in _VALID_NAME_UNICODE_CATEGORIES - or 0x0900 >= (code_point := ord(character)) <= 0x097F - or 0x0E00 >= code_point <= 0x0E7F + or _DEVI_FIRST_CHAR >= (code_point := ord(character)) <= _DEVI_LAST_CHAR + or _THAI_FIRST_CHAR >= code_point <= _THAI_LAST_CHAR ) @@ -1055,7 +1061,7 @@ async def check_context(self, ctx: tanjun.SlashContext, /) -> bool: def copy(self, *, parent: tanjun.SlashCommandGroup | None = None) -> Self: # <>. inst = super().copy() - inst._parent = parent + inst._parent = parent # noqa: SLF001 return inst def load_into_component(self, component: tanjun.Component, /) -> None: @@ -1223,7 +1229,7 @@ def build(self, *, component: tanjun.Component | None = None) -> special_endpoin def copy(self, *, parent: tanjun.SlashCommandGroup | None = None) -> Self: # <>. inst = super().copy(parent=parent) - inst._commands = {name: command.copy(parent=inst) for name, command in self._commands.items()} + inst._commands = {name: command.copy(parent=inst) for name, command in self._commands.items()} # noqa: SLF001 return inst def add_command(self, command: tanjun.BaseSlashCommand, /) -> Self: @@ -1246,8 +1252,8 @@ def add_command(self, command: tanjun.BaseSlashCommand, /) -> Self: error_message = "Cannot add a slash command group to a nested slash command group" raise ValueError(error_message) - if len(self._commands) == 25: - error_message = "Cannot add more than 25 commands to a slash command group" + if len(self._commands) == _MAX_OPTIONS: + error_message = f"Cannot add more than {_MAX_OPTIONS} commands to a slash command group" raise ValueError(error_message) if command.name in self._commands: @@ -1660,7 +1666,7 @@ def __init__( else: - async def __call__(self, *args, **kwargs) -> None: + async def __call__(self, *args: typing.Any, **kwargs: typing.Any) -> None: await self._callback(*args, **kwargs) @property @@ -1748,8 +1754,8 @@ def _add_option( names.assert_length(1, 32).assert_matches(_SCOMMAND_NAME_REG, _validate_name, lower_only=True) descriptions.assert_length(1, 100) - if len(self._builder.options) == 25: - error_message = "Slash commands cannot have more than 25 options" + if len(self._builder.options) == _MAX_OPTIONS: + error_message = f"Slash commands cannot have more than {_MAX_OPTIONS} options" raise ValueError(error_message) if min_value is not None and max_value is not None and min_value > max_value: @@ -1807,8 +1813,8 @@ def _add_option( else: actual_choices.append(choice) - if actual_choices and len(actual_choices) > 25: - error_message = "Slash command options cannot have more than 25 choices" + if actual_choices and len(actual_choices) > _MAX_OPTIONS: + error_message = f"Slash command options cannot have more than {_MAX_OPTIONS} choices" raise ValueError(error_message) required = default is tanjun.NO_DEFAULT @@ -3164,7 +3170,7 @@ async def execute( ctx: tanjun.SlashContext, /, *, - option: hikari.CommandInteractionOption | None = None, + option: hikari.CommandInteractionOption | None = None, # noqa: ARG002 hooks: collections.MutableSet[tanjun.SlashHooks] | None = None, ) -> None: # <>. @@ -3202,7 +3208,11 @@ async def execute( await own_hooks.trigger_post_execution(ctx, hooks=hooks) async def execute_autocomplete( - self, ctx: tanjun.AutocompleteContext, /, *, option: hikari.AutocompleteInteractionOption | None = None + self, + ctx: tanjun.AutocompleteContext, + /, + *, + option: hikari.AutocompleteInteractionOption | None = None, # noqa: ARG002 ) -> None: # <>. if ctx.focused.type is hikari.OptionType.STRING: @@ -3227,5 +3237,5 @@ async def execute_autocomplete( def copy(self, *, parent: tanjun.SlashCommandGroup | None = None) -> Self: # <>. inst = super().copy(parent=parent) - inst._callback = copy.copy(self._callback) + inst._callback = copy.copy(self._callback) # noqa: SLF001 return inst diff --git a/tanjun/components.py b/tanjun/components.py index f5ab81f3b..5261e724d 100644 --- a/tanjun/components.py +++ b/tanjun/components.py @@ -65,7 +65,7 @@ _CommandT = typing.TypeVar("_CommandT", bound="tanjun.ExecutableCommand[typing.Any]") # Pyright bug doesn't accept Var = Class | Class as a type - _WithCommandReturnSig = typing.Union[_CommandT, "collections.Callable[[_CommandT], _CommandT]"] + _WithCommandReturnSig = typing.Union[_CommandT, "collections.Callable[[_CommandT], _CommandT]"] # noqa: UP007 _LOGGER = logging.getLogger("hikari.tanjun.components") @@ -119,7 +119,7 @@ def _filter_scope(scope: collections.Mapping[str, typing.Any], /) -> collections class _ComponentManager(tanjun.ClientLoader): __slots__ = ("_component", "_copy") - def __init__(self, component: Component, copy: bool) -> None: + def __init__(self, component: Component, *, copy: bool) -> None: self._component = component self._copy = copy @@ -206,7 +206,7 @@ def __init__(self, *, name: str | None = None, strict: bool = False) -> None: self._loop: asyncio.AbstractEventLoop | None = None self._menu_commands: dict[tuple[hikari.CommandType, str], tanjun.MenuCommand[typing.Any, typing.Any]] = {} self._menu_hooks: tanjun.MenuHooks | None = None - self._message_commands = _internal.MessageCommandIndex(strict) + self._message_commands = _internal.MessageCommandIndex(strict=strict) self._message_hooks: tanjun.MessageHooks | None = None self._metadata: dict[typing.Any, typing.Any] = {} self._name = name or str(uuid.uuid4()) @@ -322,15 +322,15 @@ def _add_task(self, task: asyncio.Task[typing.Any], /) -> None: def copy(self) -> Self: # <>. inst = copy.copy(self) - inst._checks = [copy.copy(check) for check in self._checks] - inst._slash_commands = {name: command.copy() for name, command in self._slash_commands.items()} - inst._hooks = self._hooks.copy() if self._hooks else None - inst._listeners = { + inst._checks = [copy.copy(check) for check in self._checks] # noqa: SLF001 + inst._slash_commands = {name: command.copy() for name, command in self._slash_commands.items()} # noqa: SLF001 + inst._hooks = self._hooks.copy() if self._hooks else None # noqa: SLF001 + inst._listeners = { # noqa: SLF001 event: [copy.copy(listener) for listener in listeners] for event, listeners in self._listeners.items() } - inst._message_commands = self._message_commands.copy() - inst._metadata = self._metadata.copy() - inst._schedules = [schedule.copy() for schedule in self._schedules] if self._schedules else [] + inst._message_commands = self._message_commands.copy() # noqa: SLF001 + inst._metadata = self._metadata.copy() # noqa: SLF001 + inst._schedules = [schedule.copy() for schedule in self._schedules] if self._schedules else [] # noqa: SLF001 return inst @typing.overload @@ -1194,7 +1194,7 @@ def check_message_name( self, content: str, /, *, case_sensitive: bool = True ) -> collections.Iterator[tuple[str, tanjun.MessageCommand[typing.Any]]]: # <>. - return self._message_commands.find(content, case_sensitive) + return self._message_commands.find(content, case_sensitive=case_sensitive) def check_slash_name(self, name: str, /) -> collections.Iterator[tanjun.BaseSlashCommand]: # <>. @@ -1423,4 +1423,4 @@ def make_loader(self, *, copy: bool = True) -> tanjun.ClientLoader: tanjun.abc.ClientLoader The loader for this component. """ - return _ComponentManager(self, copy) + return _ComponentManager(self, copy=copy) diff --git a/tanjun/context/autocomplete.py b/tanjun/context/autocomplete.py index 3944e7103..a779ed4d3 100644 --- a/tanjun/context/autocomplete.py +++ b/tanjun/context/autocomplete.py @@ -50,6 +50,9 @@ _ValueT = typing.TypeVar("_ValueT", int, float, str) +_MAX_CHOICES = 25 + + class AutocompleteContext(alluka.BasicContext, tanjun.AutocompleteContext): """Standard implementation of an autocomplete context.""" @@ -91,7 +94,11 @@ def __init__( assert focused is not None self._command_name = command_name self._focused = focused - self._set_type_special_case(AutocompleteContext, self)._set_type_special_case(tanjun.AutocompleteContext, self) + ( + self._set_type_special_case(AutocompleteContext, self)._set_type_special_case( # noqa: SLF001 + tanjun.AutocompleteContext, self + ) + ) @property def author(self) -> hikari.User: @@ -220,8 +227,8 @@ async def set_choices( raise RuntimeError(error_message) choices = dict(choices, **kwargs) - if len(choices) > 25: - error_message = "Cannot set more than 25 choices" + if len(choices) > _MAX_CHOICES: + error_message = f"Cannot set more than {_MAX_CHOICES} choices" raise ValueError(error_message) self._has_responded = True diff --git a/tanjun/context/menu.py b/tanjun/context/menu.py index b03e5be4d..0be475f9a 100644 --- a/tanjun/context/menu.py +++ b/tanjun/context/menu.py @@ -96,7 +96,7 @@ def __init__( self._command: tanjun.MenuCommand[typing.Any, typing.Any] | None = None self._marked_not_found = False self._on_not_found = on_not_found - self._set_type_special_case(tanjun.MenuContext, self)._set_type_special_case(MenuContext, self) + self._set_type_special_case(tanjun.MenuContext, self)._set_type_special_case(MenuContext, self) # noqa: SLF001 @property def command(self) -> tanjun.MenuCommand[typing.Any, typing.Any] | None: diff --git a/tanjun/context/message.py b/tanjun/context/message.py index ad838b7e8..8e4d182b4 100644 --- a/tanjun/context/message.py +++ b/tanjun/context/message.py @@ -111,7 +111,11 @@ def __init__( self._message = message self._triggering_name = triggering_name self._triggering_prefix = triggering_prefix - self._set_type_special_case(tanjun.MessageContext, self)._set_type_special_case(MessageContext, self) + ( + self._set_type_special_case(tanjun.MessageContext, self)._set_type_special_case( # noqa: SLF001 + MessageContext, self + ) + ) def __repr__(self) -> str: return f"MessageContext <{self._message!r}, {self._command!r}>" @@ -181,12 +185,16 @@ def set_command(self, command: tanjun.MessageCommand[typing.Any] | None, /) -> S self._assert_not_final() if command: # TODO: command group? - self._set_type_special_case(tanjun.ExecutableCommand, command)._set_type_special_case( + self._set_type_special_case(tanjun.ExecutableCommand, command)._set_type_special_case( # noqa: SLF001 tanjun.MessageCommand, command ) elif self._command: - self._remove_type_special_case(tanjun.ExecutableCommand)._remove_type_special_case(tanjun.MessageCommand) + ( + self._remove_type_special_case(tanjun.ExecutableCommand)._remove_type_special_case( # noqa: SLF001 + tanjun.MessageCommand + ) + ) self._command = command return self @@ -345,7 +353,7 @@ async def respond( self, content: hikari.UndefinedOr[typing.Any] = hikari.UNDEFINED, *, - ensure_result: bool = True, + ensure_result: bool = True, # noqa: ARG002 delete_after: datetime.timedelta | float | int | None = None, attachment: hikari.UndefinedOr[hikari.Resourceish] = hikari.UNDEFINED, attachments: hikari.UndefinedOr[collections.Sequence[hikari.Resourceish]] = hikari.UNDEFINED, diff --git a/tanjun/context/slash.py b/tanjun/context/slash.py index 7cb3d6d65..c334d44f1 100644 --- a/tanjun/context/slash.py +++ b/tanjun/context/slash.py @@ -446,7 +446,7 @@ def start_defer_timer(self, count_down: int | float, /) -> Self: self._defer_task = asyncio.create_task(self._auto_defer(count_down)) return self - def set_ephemeral_default(self, state: bool, /) -> Self: + def set_ephemeral_default(self, state: bool, /) -> Self: # noqa: FBT001 # <>. self._assert_not_final() # TODO: document not final assertions. self._defaults_to_ephemeral = state @@ -1025,7 +1025,11 @@ def __init__( command_name, options = _internal.flatten_options(interaction.command_name, interaction.options) self._command_name = command_name self._options = {option.name: SlashOption(interaction.resolved, option) for option in options} - (self._set_type_special_case(tanjun.SlashContext, self)._set_type_special_case(SlashContext, self)) + ( + self._set_type_special_case(tanjun.SlashContext, self)._set_type_special_case( # noqa: SLF001 + SlashContext, self + ) + ) @property def command(self) -> tanjun.BaseSlashCommand | None: @@ -1060,7 +1064,7 @@ def set_command(self, command: tanjun.BaseSlashCommand | None, /) -> Self: if command: # TODO: command group? ( - self._set_type_special_case(tanjun.ExecutableCommand, command) + self._set_type_special_case(tanjun.ExecutableCommand, command) # noqa: SLF001 ._set_type_special_case(tanjun.AppCommand, command) ._set_type_special_case(tanjun.BaseSlashCommand, command) ._set_type_special_case(tanjun.SlashCommand, command) @@ -1068,7 +1072,7 @@ def set_command(self, command: tanjun.BaseSlashCommand | None, /) -> Self: elif self._command: ( - self._remove_type_special_case(tanjun.ExecutableCommand) + self._remove_type_special_case(tanjun.ExecutableCommand) # noqa: SLF001 ._remove_type_special_case(tanjun.AppCommand) ._remove_type_special_case(tanjun.BaseSlashCommand) ._remove_type_special_case(tanjun.SlashCommand) diff --git a/tanjun/dependencies/data.py b/tanjun/dependencies/data.py index 1ba42b075..7d7d26b20 100644 --- a/tanjun/dependencies/data.py +++ b/tanjun/dependencies/data.py @@ -157,7 +157,7 @@ async def resolve( ctx: alluka.Injected[alluka.abc.Context], # LazyConstant gets type arguments at runtime and Injected can't be used here as that'd fail to # resolve. - constant: LazyConstant[_T] = alluka.inject(type=LazyConstant[type_]), + constant: LazyConstant[_T] = alluka.inject(type=LazyConstant[type_]), # noqa: B008 ) -> _T: """Resolve a lazy constant.""" if (value := constant.get_value()) is not None: @@ -167,7 +167,7 @@ async def resolve( if (value := constant.get_value()) is not None: return value - result = await ctx.call_with_async_di(constant.callback) # type: ignore + result = await ctx.call_with_async_di(constant.callback) # type: ignore # noqa: PGH003 constant.set_value(result) return result diff --git a/tanjun/dependencies/limiters.py b/tanjun/dependencies/limiters.py index 7ff85c071..e0c733bdc 100644 --- a/tanjun/dependencies/limiters.py +++ b/tanjun/dependencies/limiters.py @@ -120,7 +120,7 @@ class AbstractCooldownManager(abc.ABC): async def check_cooldown( self, bucket_id: str, ctx: tanjun.Context, /, *, increment: bool = False ) -> datetime.datetime | None: - """Deprecated method.""" + """Deprecated method.""" # noqa: D401 @typing_extensions.deprecated("Use .acquire or .try_acquire and .release to manage cooldowns") async def increment_cooldown(self, bucket_id: str, ctx: tanjun.Context, /) -> None: @@ -129,7 +129,7 @@ async def increment_cooldown(self, bucket_id: str, ctx: tanjun.Context, /) -> No Use [AbstractCooldownManager.acquire][tanjun.dependencies.limiters.AbstractCooldownManager.acquire] and [AbstractCooldownManager.release][tanjun.dependencies.limiters.AbstractCooldownManager.release]. - """ + """ # noqa: D401 try: await self.try_acquire(bucket_id, ctx) diff --git a/tanjun/errors.py b/tanjun/errors.py index a423dc0f8..985c221ac 100644 --- a/tanjun/errors.py +++ b/tanjun/errors.py @@ -61,6 +61,9 @@ from . import abc as tanjun +_MAX_MENTIONS = 100 + + class TanjunError(Exception): """The base class for all errors raised by Tanjun.""" @@ -208,12 +211,12 @@ def __init__( error_message = "Cannot specify both embed and embeds" raise ValueError(error_message) - if isinstance(role_mentions, collections.Sequence) and len(role_mentions) > 100: - error_message = "Cannot specify more than 100 role mentions" + if isinstance(role_mentions, collections.Sequence) and len(role_mentions) > _MAX_MENTIONS: + error_message = f"Cannot specify more than {_MAX_MENTIONS} role mentions" raise ValueError(error_message) - if isinstance(user_mentions, collections.Sequence) and len(user_mentions) > 100: - error_message = "Cannot specify more than 100 user mentions" + if isinstance(user_mentions, collections.Sequence) and len(user_mentions) > _MAX_MENTIONS: + error_message = f"Cannot specify more than {_MAX_MENTIONS} user mentions" raise ValueError(error_message) self.attachments = [attachment] if attachment else attachments diff --git a/tanjun/injecting.py b/tanjun/injecting.py index 75b06de0f..736b8e46c 100644 --- a/tanjun/injecting.py +++ b/tanjun/injecting.py @@ -65,7 +65,6 @@ from . import abc as tanjun -_T = typing.TypeVar("_T") _CallbackSigT = typing.TypeVar("_CallbackSigT", bound=alluka.abc.CallbackSig[typing.Any]) diff --git a/tanjun/parsing.py b/tanjun/parsing.py index a98fc51ec..53883096a 100644 --- a/tanjun/parsing.py +++ b/tanjun/parsing.py @@ -66,10 +66,10 @@ _T_contra = typing.TypeVar("_T_contra", contravariant=True) class _CmpProto(typing.Protocol[_T_contra]): - def __gt__(self, __other: _T_contra) -> bool: + def __gt__(self, other: _T_contra, /) -> bool: raise NotImplementedError - def __lt__(self, __other: _T_contra) -> bool: + def __lt__(self, other: _T_contra, /) -> bool: raise NotImplementedError class _SizedCmpProto(_CmpProto[_T_contra]): @@ -78,7 +78,7 @@ def __len__(self) -> int: _CmpProtoT = typing.TypeVar("_CmpProtoT", bound=_CmpProto[typing.Any]) # Pyright bug doesn't accept Var = Class | Class as a type - _MaybeIterable = typing.Union[collections.Iterable["_T"], "_T"] + _MaybeIterable = typing.Union[collections.Iterable["_T"], "_T"] # noqa: UP007 _SizedCmpProtoT = typing.TypeVar("_SizedCmpProtoT", bound=_SizedCmpProto[typing.Any]) @@ -1697,7 +1697,7 @@ def copy(self) -> Self: A copy of the parameter. """ inst = copy.copy(self) - inst._converters = [copy.copy(converter) for converter in self._converters] + inst._converters = [copy.copy(converter) for converter in self._converters] # noqa: SLF001 return inst @@ -1930,8 +1930,8 @@ def options(self) -> collections.Sequence[Option]: def copy(self) -> Self: # <>. inst = copy.copy(self) - inst._arguments = [argument.copy() for argument in self._arguments] - inst._options = [option.copy() for option in self._options] + inst._arguments = [argument.copy() for argument in self._arguments] # noqa: SLF001 + inst._options = [option.copy() for option in self._options] # noqa: SLF001 return inst def _assert_key(self, key: str, /) -> None: diff --git a/tanjun/schedules.py b/tanjun/schedules.py index 4afe048c6..ed232e76f 100644 --- a/tanjun/schedules.py +++ b/tanjun/schedules.py @@ -139,7 +139,7 @@ def add_schedule(self, schedule: AbstractSchedule, /) -> typing.Any: def _is_component_proto(value: typing.Any, /) -> typing.TypeGuard[_ComponentProto]: try: - value.add_schedule + value.add_schedule # noqa: B018 except AttributeError: return False @@ -155,7 +155,7 @@ def as_interval( ignored_exceptions: collections.Sequence[type[Exception]] = (), max_runs: int | None = None, ) -> collections.Callable[[_CallbackSigT], IntervalSchedule[_CallbackSigT]]: - """Decorator to create an schedule. + """Decorate a function to create an interval schedule. Examples -------- @@ -302,7 +302,7 @@ def copy(self) -> Self: raise RuntimeError(error_message) inst = copy.copy(self) - inst._tasks = [] + inst._tasks = [] # noqa: SLF001 return inst def load_into_component(self, component: tanjun.Component, /) -> None: @@ -353,7 +353,7 @@ async def _execute(self, client: alluka.Client, /) -> None: except self._ignored_exceptions: pass - except Exception: + except Exception: # noqa: BLE001 traceback.print_exc() def _add_task(self, task: asyncio.Task[None], /) -> None: @@ -375,7 +375,7 @@ async def _loop(self, client: alluka.Client, /) -> None: except self._ignored_exceptions: pass - except Exception: + except Exception: # noqa: BLE001 traceback.print_exc() self._task = None return @@ -387,7 +387,7 @@ async def _loop(self, client: alluka.Client, /) -> None: self._add_task(event_loop.create_task(self.stop())) - except Exception: + except Exception: # noqa: BLE001 traceback.print_exc() async def _on_stop(self, client: alluka.Client, /) -> None: @@ -398,7 +398,7 @@ async def _on_stop(self, client: alluka.Client, /) -> None: except self._ignored_exceptions: pass - except Exception: + except Exception: # noqa: BLE001 traceback.print_exc() def start(self, client: alluka.Client, /, *, loop: asyncio.AbstractEventLoop | None = None) -> None: @@ -1057,9 +1057,9 @@ def copy(self) -> Self: raise RuntimeError(error_message) inst = copy.copy(self) - self._config = copy.copy(self._config) - self._config.current_date = datetime.datetime.min.replace(tzinfo=self._config.timezone) - inst._tasks = [] + inst._config = copy.copy(self._config) # noqa: SLF001 + inst._config.current_date = datetime.datetime.min.replace(tzinfo=self._config.timezone) # noqa: SLF001 + inst._tasks = [] # noqa: SLF001 return inst async def _execute(self, client: alluka.Client, /) -> None: @@ -1073,7 +1073,7 @@ async def _execute(self, client: alluka.Client, /) -> None: except self._ignored_exceptions: pass - except Exception: + except Exception: # noqa: BLE001 traceback.print_exc() def _add_task(self, task: asyncio.Task[None], /) -> None: diff --git a/tests/context/test_base.py b/tests/context/test_base.py index 78274a118..f5e7b4b38 100644 --- a/tests/context/test_base.py +++ b/tests/context/test_base.py @@ -87,7 +87,7 @@ def test_cache_property(self, context: tanjun.abc.Context, mock_client: mock.Moc def test_client_property(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: assert context.client is mock_client - def test_component_property(self, context: base_context.BaseContext, mock_component: tanjun.abc.Component) -> None: + def test_component_property(self, context: base_context.BaseContext) -> None: assert context.component is None def test_events_proprety(self, context: base_context.BaseContext, mock_client: mock.Mock) -> None: diff --git a/tests/context/test_menu.py b/tests/context/test_menu.py index aa99ccdb2..60119781f 100644 --- a/tests/context/test_menu.py +++ b/tests/context/test_menu.py @@ -86,7 +86,7 @@ def test_target_id_property_when_unknown_menu_type( mock_interaction.resolved.messages = {} with pytest.raises(RuntimeError, match="Unknown menu type"): - context.target_id + context.target_id # noqa: B018 def test_target_property_when_user_menu( self, context: tanjun.context.MenuContext, mock_interaction: hikari.CommandInteraction @@ -130,7 +130,7 @@ def test_target_property_when_unknown_menu_type( mock_interaction.resolved.messages = {} with pytest.raises(RuntimeError, match="Unknown menu type"): - context.target + context.target # noqa: B018 def test_triggering_name_property(self, context: tanjun.context.menu.MenuContext) -> None: assert context.triggering_name is context.interaction.command_name diff --git a/tests/dependencies/test_limiters.py b/tests/dependencies/test_limiters.py index 8dfdd9f8c..776ee53ca 100644 --- a/tests/dependencies/test_limiters.py +++ b/tests/dependencies/test_limiters.py @@ -1851,9 +1851,9 @@ async def test_call_when_owners_exempt_still_leads_to_wait_until_with_unknown_da @pytest.mark.asyncio async def test_call_when_owners_exempt_still_leads_to_wait_until_and_error_callback(self) -> None: - class MockException(Exception): ... + class MockError(Exception): ... - mock_error_callback = mock.Mock(return_value=MockException()) + mock_error_callback = mock.Mock(return_value=MockError()) pre_execution = tanjun.dependencies.CooldownPreExecution("yuri", owners_exempt=True, error=mock_error_callback) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -1863,7 +1863,7 @@ class MockException(Exception): ... mock_owner_check = mock.AsyncMock() mock_owner_check.check_ownership.return_value = False - with pytest.raises(MockException): + with pytest.raises(MockError): await pre_execution(mock_context, cooldowns=mock_cooldown_manager, owner_check=mock_owner_check) mock_cooldown_manager.try_acquire.assert_awaited_once_with("yuri", mock_context) @@ -1874,9 +1874,9 @@ class MockException(Exception): ... @pytest.mark.asyncio async def test_call_when_owners_exempt_still_leads_to_wait_until_and_error_callback_with_unknown_date(self) -> None: - class MockException(Exception): ... + class MockError(Exception): ... - mock_error_callback = mock.Mock(return_value=MockException()) + mock_error_callback = mock.Mock(return_value=MockError()) pre_execution = tanjun.dependencies.CooldownPreExecution("yuri", owners_exempt=True, error=mock_error_callback) mock_context = mock.Mock() mock_cooldown_manager = mock.AsyncMock() @@ -1884,7 +1884,7 @@ class MockException(Exception): ... mock_owner_check = mock.AsyncMock() mock_owner_check.check_ownership.return_value = False - with pytest.raises(MockException): + with pytest.raises(MockError): await pre_execution(mock_context, cooldowns=mock_cooldown_manager, owner_check=mock_owner_check) mock_cooldown_manager.try_acquire.assert_awaited_once_with("yuri", mock_context) @@ -2100,9 +2100,9 @@ async def test_call_when_wait_until_defaults_with_localiser(self) -> None: @pytest.mark.asyncio async def test_call_when_wait_until_and_error_callback(self) -> None: - class MockException(Exception): ... + class MockError(Exception): ... - mock_error_callback = mock.Mock(return_value=MockException()) + mock_error_callback = mock.Mock(return_value=MockError()) pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", owners_exempt=False, error=mock_error_callback ) @@ -2113,7 +2113,7 @@ class MockException(Exception): ... ) mock_owner_check = mock.AsyncMock() - with pytest.raises(MockException): + with pytest.raises(MockError): await pre_execution(mock_context, cooldowns=mock_cooldown_manager, owner_check=mock_owner_check) mock_cooldown_manager.try_acquire.assert_awaited_once_with("catgirls yuri", mock_context) @@ -2472,9 +2472,9 @@ async def test_call_when_unknown_wait_until_fallback_defaults_with_localiser(sel @pytest.mark.asyncio async def test_call_when_unknown_wait_until_and_error_callback(self) -> None: - class MockException(Exception): ... + class MockError(Exception): ... - mock_error_callback = mock.Mock(return_value=MockException()) + mock_error_callback = mock.Mock(return_value=MockError()) pre_execution = tanjun.dependencies.CooldownPreExecution( "catgirls yuri", owners_exempt=False, error=mock_error_callback ) @@ -2483,7 +2483,7 @@ class MockException(Exception): ... mock_cooldown_manager.try_acquire.side_effect = tanjun.dependencies.CooldownDepleted(None) mock_owner_check = mock.AsyncMock() - with pytest.raises(MockException): + with pytest.raises(MockError): await pre_execution(mock_context, cooldowns=mock_cooldown_manager, owner_check=mock_owner_check) mock_cooldown_manager.try_acquire.assert_awaited_once_with("catgirls yuri", mock_context) @@ -2643,8 +2643,8 @@ def test_with_cooldown_when_follow_wrapping_and_not_wrapping() -> None: def test_with_cooldown_when_follow_wrapping_and_unsupported_command() -> None: mock_command = mock.Mock(tanjun.abc.SlashCommand) mock_error_callback = mock.Mock() - with pytest.raises(AttributeError): - mock_command.wrapped_command + + assert not hasattr(mock_command, "wrapped_command") with mock.patch.object(tanjun.dependencies.limiters, "CooldownPreExecution") as mock_pre_execution: tanjun.with_cooldown( @@ -2669,8 +2669,8 @@ def test_with_cooldown_when_follow_wrapping_and_unsupported_command() -> None: def test_with_cooldown_when_follow_wrapping_and_wrapping_unsupported_command() -> None: mock_command = mock.Mock(wrapped_command=mock.Mock(tanjun.abc.SlashCommand)) mock_error_callback = mock.Mock() - with pytest.raises(AttributeError): - mock_command.wrapped_command.wrapped_command + + assert not hasattr(mock_command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.dependencies.limiters, "CooldownPreExecution") as mock_pre_execution: tanjun.with_cooldown( @@ -3256,16 +3256,16 @@ async def test_call_when_acquire_fails_defaults_with_localiser(self) -> None: @pytest.mark.asyncio async def test_call_when_acquire_fails_and_error_callback(self) -> None: - class MockException(Exception): ... + class MockError(Exception): ... - mock_concurrency_callback = mock.Mock(return_value=MockException()) + mock_concurrency_callback = mock.Mock(return_value=MockError()) mock_context = mock.Mock() mock_limiter = mock.AsyncMock() mock_limiter.try_acquire.side_effect = tanjun.dependencies.ResourceDepleted hook = tanjun.dependencies.ConcurrencyPreExecution("bucket catgirls", error=mock_concurrency_callback) - with pytest.raises(MockException): + with pytest.raises(MockError): await hook(mock_context, mock_limiter) mock_limiter.try_acquire.assert_awaited_once_with("bucket catgirls", mock_context) @@ -3431,8 +3431,8 @@ def test_with_concurrency_limit_when_follow_wrapping_and_unsupported_command() - mock_command.hooks.add_pre_execution.return_value = mock_command.hooks mock_command.hooks.add_post_execution.return_value = mock_command.hooks mock_error_callback = mock.Mock() - with pytest.raises(AttributeError): - mock_command.wrapped_command + + assert not hasattr(mock_command, "wrapped_command") with ( mock.patch.object(tanjun.dependencies.limiters, "ConcurrencyPreExecution") as pre_execution, @@ -3456,8 +3456,8 @@ def test_with_concurrency_limit_when_follow_wrapping_and_wrapping_unsupported_co mock_command.wrapped_command.hooks.add_pre_execution.return_value = mock_command.wrapped_command.hooks mock_command.wrapped_command.hooks.add_post_execution.return_value = mock_command.wrapped_command.hooks mock_error_callback = mock.Mock() - with pytest.raises(AttributeError): - mock_command.wrapped_command.wrapped_command + + assert not hasattr(mock_command.wrapped_command, "wrapped_command") with ( mock.patch.object(tanjun.dependencies.limiters, "ConcurrencyPreExecution") as pre_execution, diff --git a/tests/dependencies/test_owners.py b/tests/dependencies/test_owners.py index e408fbfda..a7eba3a40 100644 --- a/tests/dependencies/test_owners.py +++ b/tests/dependencies/test_owners.py @@ -46,7 +46,7 @@ class TestOwners: @pytest.mark.parametrize("value", [0, -1.0, datetime.timedelta(seconds=-2)]) def test_init_with_invalid_expire_after(self, value: int | float | datetime.timedelta) -> None: with pytest.raises(ValueError, match="Expire after must be greater than 0 seconds"): - tanjun.dependencies.Owners(expire_after=-1) + tanjun.dependencies.Owners(expire_after=value) @pytest.mark.asyncio async def test_check_ownership_when_user_in_owner_ids(self) -> None: diff --git a/tests/test_annotations.py b/tests/test_annotations.py index 4e3237c50..d56860f24 100644 --- a/tests/test_annotations.py +++ b/tests/test_annotations.py @@ -252,7 +252,7 @@ def test_with_no_annotations() -> None: async def command( ctx: tanjun.abc.Context, injected: alluka.Injected[int], - yeet, # type: ignore + yeet, # type: ignore # noqa: ANN001 other_injected: str = alluka.inject(type=str), ) -> None: ... @@ -267,7 +267,7 @@ def test_with_no_annotations_but_message_parser_already_set() -> None: async def command( ctx: tanjun.abc.Context, injected: alluka.Injected[int], - beat, # type: ignore + beat, # type: ignore # noqa: ANN001 other_injected: str = alluka.inject(type=str), ) -> None: ... @@ -348,8 +348,8 @@ async def mock_callback( command: tanjun.MessageCommand[typing.Any] = tanjun.as_message_command("beep")( mock.Mock(tanjun.abc.SlashCommand, callback=mock_callback) ) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command # type: ignore + + assert not hasattr(command.wrapped_command, "wrapped_command") annotations.parse_annotated_args(command, follow_wrapped=True) @@ -6815,7 +6815,7 @@ async def command(ctx: tanjun.abc.Context, **kwargs: typing.Unpack[TypedDict]) - def test_with_unpacked_other_syntax_typed_dict() -> None: - TypedDict = typing.TypedDict( + TypedDict = typing.TypedDict( # noqa: UP013 "TypedDict", { "baz": typing.NotRequired[typing.Annotated[annotations.Float, "eep"]], @@ -8975,7 +8975,7 @@ def test_ignores_untyped_kwargs() -> None: @annotations.with_annotated_args(follow_wrapped=True) @tanjun.as_slash_command("a", "b") @tanjun.as_message_command("x", "3") - async def command(ctx: tanjun.abc.Context, **kwargs) -> None: # type: ignore + async def command(ctx: tanjun.abc.Context, **kwargs) -> None: # type: ignore # noqa: ANN003 raise NotImplementedError assert command.build().options == [] diff --git a/tests/test_annotations_future_annotations.py b/tests/test_annotations_future_annotations.py index 969d31acf..7ab9ffb82 100644 --- a/tests/test_annotations_future_annotations.py +++ b/tests/test_annotations_future_annotations.py @@ -115,7 +115,7 @@ def test_with_no_annotations() -> None: async def command( ctx: tanjun.abc.Context, injected: alluka.Injected[int], - yeat, # type: ignore + yeat, # type: ignore # noqa: ANN001 other_injected: str = alluka.inject(type=str), ) -> None: ... @@ -130,7 +130,7 @@ def test_with_no_annotations_but_message_parser_already_set() -> None: async def command( ctx: tanjun.abc.Context, injected: alluka.Injected[int], - beat, # type: ignore + beat, # type: ignore # noqa: ANN001 other_injected: str = alluka.inject(type=str), ) -> None: ... @@ -211,8 +211,8 @@ async def mock_callback( command: tanjun.MessageCommand[typing.Any] = tanjun.as_message_command("beep")( mock.Mock(tanjun.abc.SlashCommand, callback=mock_callback) ) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command # type: ignore + + assert not hasattr(command.wrapped_command, "wrapped_command") annotations.with_annotated_args(follow_wrapped=True)(command) @@ -1176,7 +1176,7 @@ def test_with_generic_default() -> None: async def command( ctx: tanjun.abc.Context, argument: typing.Annotated[ - annotations.Default[annotations.Str, "nyaa"], "meow" # noqa: F821 # type: ignore + annotations.Default[annotations.Str, "nyaa"], "meow" # noqa: F821, UP037 # type: ignore ], ) -> None: ... diff --git a/tests/test_checks.py b/tests/test_checks.py index 6c50a5f6c..e8e30aab7 100644 --- a/tests/test_checks.py +++ b/tests/test_checks.py @@ -82,15 +82,15 @@ async def test_when_false(self) -> None: mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) async def test_when_false_and_error(self) -> None: - class MockException(Exception): + class MockError(Exception): def __init__(self) -> None: ... mock_dependency = mock.AsyncMock() mock_dependency.check_ownership.return_value = False mock_context = mock.Mock() - check = tanjun.checks.OwnerCheck(error=MockException, error_message="hi") + check = tanjun.checks.OwnerCheck(error=MockError, error_message="hi") - with pytest.raises(MockException): + with pytest.raises(MockError): await check(mock_context, mock_dependency) mock_dependency.check_ownership.assert_awaited_once_with(mock_context.client, mock_context.author) @@ -284,14 +284,14 @@ async def test_when_false(self) -> None: get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) async def test_when_false_when_error(self) -> None: - class MockException(Exception): + class MockError(Exception): def __init__(self) -> None: ... mock_context = mock.Mock(client=tanjun.Client(mock.AsyncMock(), cache=mock.Mock())) - check = tanjun.checks.NsfwCheck(error=MockException, error_message="nye") + check = tanjun.checks.NsfwCheck(error=MockError, error_message="nye") with ( - pytest.raises(MockException), + pytest.raises(MockError), mock.patch.object(cache, "get_perm_channel", return_value=mock.Mock(is_nsfw=None)) as get_perm_channel, ): await check(mock_context) @@ -521,14 +521,14 @@ async def test_when_is_nsfw(self) -> None: get_perm_channel.assert_awaited_once_with(mock_context.client, mock_context.channel_id) async def test_when_is_nsfw_and_error(self) -> None: - class MockException(Exception): + class MockError(Exception): def __init__(self) -> None: ... mock_context = mock.Mock(client=tanjun.Client(mock.AsyncMock(), cache=mock.Mock())) - check = tanjun.checks.SfwCheck(error=MockException, error_message="bye") + check = tanjun.checks.SfwCheck(error=MockError, error_message="bye") with ( - pytest.raises(MockException), + pytest.raises(MockError), mock.patch.object(cache, "get_perm_channel", return_value=mock.Mock(is_nsfw=True)) as get_perm_channel, ): await check(mock_context) @@ -742,13 +742,13 @@ def test_for_guild(self) -> None: assert tanjun.checks.DmCheck(error_message=None)(mock.Mock(guild_id=3123)) is False def test_for_guild_when_error(self) -> None: - class MockException(Exception): + class MockError(Exception): def __init__(self) -> None: ... - check = tanjun.checks.DmCheck(error=MockException, error_message="meow") + check = tanjun.checks.DmCheck(error=MockError, error_message="meow") mock_context = mock.Mock(guild_id=3123) - with pytest.raises(MockException): + with pytest.raises(MockError): assert check(mock_context) def test_for_guild_when_halt_execution(self) -> None: @@ -898,12 +898,12 @@ def test_for_dm(self) -> None: assert tanjun.checks.GuildCheck(error_message=None)(mock.Mock(guild_id=None)) is False def test_for_dm_when_error(self) -> None: - class MockException(Exception): + class MockError(Exception): def __init__(self) -> None: ... - check = tanjun.checks.GuildCheck(error=MockException, error_message="meep") + check = tanjun.checks.GuildCheck(error=MockError, error_message="meep") - with pytest.raises(MockException): + with pytest.raises(MockError): assert check(mock.Mock(guild_id=None)) def test_for_dm_when_halt_execution(self) -> None: @@ -2512,8 +2512,8 @@ def test_with_dm_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock) def test_with_dm_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.MessageCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "DmCheck") as dm_check: assert tanjun.checks.with_dm_check(follow_wrapped=True)(command) is command @@ -2526,8 +2526,8 @@ def test_with_dm_check_when_follow_wrapping_and_unsupported_command() -> None: def test_with_dm_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "DmCheck") as dm_check: assert tanjun.checks.with_dm_check(follow_wrapped=True)(command) is command @@ -2596,8 +2596,8 @@ def test_with_guild_check_when_follow_wrapping_and_not_wrapping(command: mock.Mo def test_with_guild_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "GuildCheck") as guild_check: assert tanjun.checks.with_guild_check(follow_wrapped=True)(command) is command @@ -2610,8 +2610,8 @@ def test_with_guild_check_when_follow_wrapping_and_unsupported_command() -> None def test_with_guild_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "GuildCheck") as guild_check: assert tanjun.checks.with_guild_check(follow_wrapped=True)(command) is command @@ -2680,8 +2680,8 @@ def test_with_nsfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Moc def test_with_nsfw_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "NsfwCheck") as nsfw_check: assert tanjun.checks.with_nsfw_check(follow_wrapped=True)(command) is command @@ -2694,8 +2694,8 @@ def test_with_nsfw_check_when_follow_wrapping_and_unsupported_command() -> None: def test_with_nsfw_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "NsfwCheck") as nsfw_check: assert tanjun.checks.with_nsfw_check(follow_wrapped=True)(command) is command @@ -2764,8 +2764,8 @@ def test_with_sfw_check_when_follow_wrapping_and_not_wrapping(command: mock.Mock def test_with_sfw_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "SfwCheck") as sfw_check: assert tanjun.checks.with_sfw_check(follow_wrapped=True)(command) is command @@ -2779,8 +2779,8 @@ def test_with_sfw_check_when_follow_wrapping_and_unsupported_command() -> None: def test_with_sfw_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "SfwCheck") as sfw_check: assert tanjun.checks.with_sfw_check(follow_wrapped=True)(command) is command @@ -2849,8 +2849,8 @@ def test_with_owner_check_when_follow_wrapping_and_not_wrapping(command: mock.Mo def test_with_owner_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "OwnerCheck") as owner_check: assert tanjun.checks.with_owner_check(follow_wrapped=True)(command) is command @@ -2863,8 +2863,8 @@ def test_with_owner_check_when_follow_wrapping_and_unsupported_command() -> None def test_with_owner_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "OwnerCheck") as owner_check: assert tanjun.checks.with_owner_check(follow_wrapped=True)(command) is command @@ -2945,8 +2945,8 @@ def test_with_author_permission_check_when_follow_wrapping_and_not_wrapping(comm def test_with_author_permission_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "AuthorPermissionCheck") as author_permission_check: assert tanjun.checks.with_author_permission_check(435213, follow_wrapped=True)(command) is command @@ -2962,8 +2962,8 @@ def test_with_author_permission_check_when_follow_wrapping_and_unsupported_comma def test_with_author_permission_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "AuthorPermissionCheck") as author_permission_check: assert tanjun.checks.with_author_permission_check(435213, follow_wrapped=True)(command) is command @@ -3047,8 +3047,8 @@ def test_with_own_permission_check_when_follow_wrapping_and_not_wrapping(command def test_with_own_permission_check_when_follow_wrapping_and_unsupported_command() -> None: command = mock.Mock(tanjun.abc.SlashCommand) command.add_check.return_value = command - with pytest.raises(AttributeError): - command.wrapped_command + + assert not hasattr(command, "wrapped_command") with mock.patch.object(tanjun.checks, "OwnPermissionCheck") as own_permission_check: assert tanjun.checks.with_own_permission_check(5412312, follow_wrapped=True)(command) is command @@ -3064,8 +3064,8 @@ def test_with_own_permission_check_when_follow_wrapping_and_unsupported_command( def test_with_own_permission_check_when_follow_wrapping_and_wrapping_unsupported_command(command: mock.Mock) -> None: command.wrapped_command = mock.Mock(tanjun.abc.SlashCommand) - with pytest.raises(AttributeError): - command.wrapped_command.wrapped_command + + assert not hasattr(command.wrapped_command, "wrapped_command") with mock.patch.object(tanjun.checks, "OwnPermissionCheck") as own_permission_check: assert tanjun.checks.with_own_permission_check(5412312, follow_wrapped=True)(command) is command @@ -3293,7 +3293,7 @@ async def test_any_checks_when_all_fail() -> None: @pytest.mark.asyncio async def test_any_checks_when_all_fail_and_error() -> None: - class MockException(Exception): + class MockError(Exception): def __init__(self) -> None: ... mock_check_1 = mock.Mock() @@ -3301,9 +3301,9 @@ def __init__(self) -> None: ... mock_check_3 = mock.Mock() mock_context = mock.Mock() mock_context.call_with_async_di = mock.AsyncMock(side_effect=[False, tanjun.FailedCheck, False]) - check = tanjun.checks.any_checks(mock_check_1, mock_check_2, mock_check_3, error=MockException, error_message="hi") + check = tanjun.checks.any_checks(mock_check_1, mock_check_2, mock_check_3, error=MockError, error_message="hi") - with pytest.raises(MockException): + with pytest.raises(MockError): await check(mock_context) mock_context.call_with_async_di.assert_has_awaits( diff --git a/tests/test_clients.py b/tests/test_clients.py index b29e06141..548302a2c 100644 --- a/tests/test_clients.py +++ b/tests/test_clients.py @@ -1182,7 +1182,7 @@ class StubClient(tanjun.Client): add_listener_.assert_called_once_with(hikari.GuildAvailableEvent, mock_callback) def test_with_listener_no_provided_event(self) -> None: - async def callback(foo) -> None: # type: ignore + async def callback(foo) -> None: # type: ignore # noqa: ANN001 ... add_listener_ = mock.Mock() @@ -1327,7 +1327,7 @@ class StubClient(tanjun.Client): def test_with_listener_with_type_hint_typing_union(self) -> None: async def callback( - event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] + event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] # noqa: PYI051 ) -> None: ... add_listener_ = mock.Mock() @@ -1373,7 +1373,9 @@ class StubClient(tanjun.Client): ) def test_with_listener_with_type_hint_310_union(self) -> None: - async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str) -> None: ... + async def callback( + event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str, # noqa: PYI051 + ) -> None: ... add_listener_ = mock.Mock() @@ -2030,7 +2032,7 @@ class StubClient(tanjun.Client): def temp_file(self) -> collections.Iterator[typing.IO[str]]: # A try, finally is used to delete the file rather than relying on delete=True behaviour # as on Windows the file cannot be accessed by other processes if delete is True. - temp_file_ = tempfile.NamedTemporaryFile("w+", suffix=".py", delete=False) + temp_file_ = tempfile.NamedTemporaryFile("w+", suffix=".py", delete=False) # noqa: SIM115 try: with temp_file_: yield temp_file_ @@ -5461,7 +5463,9 @@ async def test_on_command_interaction_request_for_slash_command( mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): + async def execution_callback( + ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -5525,7 +5529,9 @@ async def test_on_command_interaction_request_for_slash_command_when_future_not_ ) -> None: task = None - async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): + async def execution_callback( + ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -5587,7 +5593,9 @@ async def test_on_command_interaction_request_for_slash_command_when_ephemeral_d mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): + async def execution_callback( + ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -5706,7 +5714,9 @@ async def test_on_command_interaction_request_for_slash_command_when_no_hooks( mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): + async def execution_callback( + ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -5767,7 +5777,9 @@ async def test_on_command_interaction_request_for_slash_command_when_only_slash_ mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): + async def execution_callback( + ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -5831,7 +5843,9 @@ async def test_on_command_interaction_request_for_slash_command_when_only_generi mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None): + async def execution_callback( + ctx: tanjun.abc.SlashContext, hooks: tanjun.abc.SlashHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -6324,7 +6338,9 @@ async def test_on_command_interaction_request_for_menu_command( mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): + async def execution_callback( + ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -6388,7 +6404,9 @@ async def test_on_command_interaction_request_for_menu_command_when_future_not_s ) -> None: task = None - async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): + async def execution_callback( + ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value @@ -6450,7 +6468,9 @@ async def test_on_command_interaction_request_for_menu_command_when_ephemeral_de mock_result = mock.Mock() task = None - async def execution_callback(ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None): + async def execution_callback( + ctx: tanjun.abc.MenuContext, hooks: tanjun.abc.MenuHooks | None + ) -> collections.Coroutine[typing.Any, typing.Any, None]: async def _() -> None: nonlocal task assert ctx is mock_ctx_maker.return_value diff --git a/tests/test_clients_future_annotations.py b/tests/test_clients_future_annotations.py index 7ae67e335..90bd7b091 100644 --- a/tests/test_clients_future_annotations.py +++ b/tests/test_clients_future_annotations.py @@ -134,7 +134,7 @@ class StubClient(tanjun.Client): def test_with_listener_with_type_hint_typing_union(self) -> None: async def callback( - event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] + event: typing.Union[hikari.RoleEvent, typing.Literal["ok"], hikari.GuildEvent, str] # noqa: PYI051 ) -> None: ... add_listener_ = mock.Mock() @@ -180,7 +180,9 @@ class StubClient(tanjun.Client): ) def test_with_listener_with_type_hint_310_union(self) -> None: - async def callback(event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str) -> None: ... + async def callback( + event: hikari.ShardEvent | typing.Literal[""] | hikari.VoiceEvent | str, # noqa: PYI051 + ) -> None: ... add_listener_ = mock.Mock() From 09ff847e519f85a26c1aaf63d699a9169334188d Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Sun, 1 Dec 2024 00:13:38 +0000 Subject: [PATCH 10/10] Fix example docs --- docs/usage.md | 70 +++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 87d16e464..648e7a75e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -12,7 +12,7 @@ gateway-based message and application command execution. To run Tanjun you'll want to link it to a Hikari bot. ```py ---8<-- "./docs_src/usage.py:26:31" +--8<-- "./docs_src/usage.py:25:30" ``` Here a Tanjun client is linked to a gateway bot instance to enable both @@ -26,7 +26,7 @@ commands and context menus on startup, and `mention_prefix=True` allows the bot's message commands to be triggered by starting a command call with `@bot`. ```py ---8<-- "./docs_src/usage.py:35:37" +--8<-- "./docs_src/usage.py:34:36" ``` And here a Tanjun client is linked to a REST server bot instance to enable @@ -44,7 +44,7 @@ provide a cross-compatible alternative for these (which also supports dependency injection). ```py ---8<-- "./docs_src/usage.py:41:50" +--8<-- "./docs_src/usage.py:40:49" ``` ## Managing bot functionality @@ -54,7 +54,7 @@ group bot functionality, storing functionality such as event listeners, commands, scheduled callbacks, and client callbacks. ```py ---8<-- "./docs_src/usage.py:54:61" +--8<-- "./docs_src/usage.py:53:60" ``` The `with_` methods on [Component][tanjun.components.Component] allow @@ -63,7 +63,7 @@ through a decorator call; the relevant `add_` functions allow adding functionality through chained calls. ```py ---8<-- "./docs_src/usage.py:65:68" +--8<-- "./docs_src/usage.py:64:67" ``` Alternatively, functionality which is represented by a dedicated object can be @@ -83,20 +83,20 @@ add a component to a client, you can also declare "loaders" and "unloaders" for a module to more ergonomically load this functionality into a client. ```py ---8<-- "./docs_src/usage.py:72:80" +--8<-- "./docs_src/usage.py:71:79" ``` You can either declare one or more custom loaders and unloaders as shown above ```py ---8<-- "./docs_src/usage.py:84:86" +--8<-- "./docs_src/usage.py:83:85" ``` or use [make_loader][tanjun.components.Component.make_loader] to generate a loader and unloader for the component. ```py ---8<-- "./docs_src/usage.py:90:94" +--8<-- "./docs_src/usage.py:89:93" ``` Modules with loaders can then be loaded into a client by calling @@ -120,7 +120,7 @@ All command callbacks must be asynchronous and can use dependency injection. ### Slash commands ```py ---8<-- "./docs_src/usage.py:98:100" +--8<-- "./docs_src/usage.py:97:99" ``` Slash commands represent the commands you see when you start typing with "/" in @@ -150,7 +150,7 @@ converters found in [tanjun.conversion][]) similarly to message command arguments. ```py ---8<-- "./docs_src/usage.py:104:112" +--8<-- "./docs_src/usage.py:103:111" ``` Slash commands can be stored in groups where the above example will be shown in @@ -162,7 +162,7 @@ see [slash_command_group][tanjun.commands.slash.slash_command_group]. ### Message commands ```py ---8<-- "./docs_src/usage.py:116:125" +--8<-- "./docs_src/usage.py:115:124" ``` Message commands are triggered based on chat messages where the client's @@ -178,7 +178,7 @@ either [Client.from_gateway_bot][tanjun.clients.Client.from_gateway_bot] or Mention prefixes work even if the `MESSAGE_CONTENT` intent is not declared. ```py ---8<-- "./docs_src/usage.py:129:141" +--8<-- "./docs_src/usage.py:128:140" ``` Message command groups are a collection of message commands under a shared name @@ -213,7 +213,7 @@ more configuration see [tanjun.parsing][] and for the standard converters see ### Context menus ```py ---8<-- "./docs_src/usage.py:145:151" +--8<-- "./docs_src/usage.py:144:150" ``` Context menus represent the application commands shown when you click on a user @@ -227,7 +227,7 @@ Previously you've seen how to manually declare command options per command type, now it's time to go higher. ```py ---8<-- "./docs_src/usage.py:164:178" +--8<-- "./docs_src/usage.py:163:177" ``` [tanjun.annotations][] provides a simple way to declare the arguments for both @@ -253,7 +253,7 @@ When using `follow_wrapped` the relevant decorator will be applied to all the compatible `as_{}_command` decorator calls below it in the chain. ```py ---8<-- "./docs_src/usage.py:185:189" +--8<-- "./docs_src/usage.py:184:188" ``` While the previous command examples have typed `ctx` as a context type that's @@ -265,7 +265,7 @@ types. ## Responding to commands ```py ---8<-- "./docs_src/usage.py:193:206" +--8<-- "./docs_src/usage.py:192:205" ``` [Context.respond][tanjun.abc.Context.respond] is used to respond to a command @@ -276,7 +276,7 @@ when `ensure_result=True` is passed. ### Ephemeral responses ```py ---8<-- "./docs_src/usage.py:210:221" +--8<-- "./docs_src/usage.py:209:220" ``` Ephemeral responses are a slash command and context menu exclusive feature which @@ -325,7 +325,7 @@ dynamically return choice suggestions to a user as they type a string option. Autocomplete callbacks must be asynchronous and support dependency injection. ```py ---8<-- "./docs_src/usage.py:225:238" +--8<-- "./docs_src/usage.py:224:237" ``` To set the results for an autocomplete interaction call @@ -344,13 +344,13 @@ callbacks, checks, hook callbacks, event listeners, schedule callbacks) through [Alluka][alluka]. ```py ---8<-- "./docs_src/usage.py:248:250" +--8<-- "./docs_src/usage.py:247:249" ``` Here we set the dependencies for the types `Foo` and `Bar`. ```py ---8<-- "./docs_src/usage.py:254:257" +--8<-- "./docs_src/usage.py:253:256" ``` And here we declare a command callback as taking the client set values for @@ -412,7 +412,7 @@ Checks are functions that run before command execution to decide whether a command or group of commands matches a context and should be called with it. ```py ---8<-- "./docs_src/usage.py:261:266" +--8<-- "./docs_src/usage.py:260:265" ``` There's a collection of standard checks in [tanjun.checks][] which work @@ -421,7 +421,7 @@ will care about for the standard checks is the `error_message` argument which lets you adjust the response messages these send when they fail. ```py ---8<-- "./docs_src/usage.py:279:296" +--8<-- "./docs_src/usage.py:278:296" ``` Checks (both custom and standard) can be added to clients, components, and @@ -432,7 +432,7 @@ chain. Checks on a client, component, or command group will be used for every child command. ```py ---8<-- "./docs_src/usage.py:300:304" +--8<-- "./docs_src/usage.py:300:305" ``` Custom checks can be made by making a function with either the signature @@ -454,28 +454,28 @@ There are several different kinds of hooks which all support dependency injection and may be synchronous or asynchronous: ```py ---8<-- "./docs_src/usage.py:308:311" +--8<-- "./docs_src/usage.py:309:312" ``` Pre-execution hooks are called before the execution of a command but after command matching has finished and all the relevant checks have passed. ```py ---8<-- "./docs_src/usage.py:315:316" +--8<-- "./docs_src/usage.py:316:317" ``` Post-execution hooks are called after a command has finished executing, regardless of whether it passed or failed. ```py ---8<-- "./docs_src/usage.py:320:321" +--8<-- "./docs_src/usage.py:321:322" ``` Success hooks are called after a command has finished executing successfully (without raising any errors). ```py ---8<-- "./docs_src/usage.py:325:326" +--8<-- "./docs_src/usage.py:326:327" ``` Error hooks are called when command's execution is ended early by an error raise @@ -490,7 +490,7 @@ error and [None][] acts as no vote. In the case of a tie the error will be re-raised. ```py ---8<-- "./docs_src/usage.py:330:331" +--8<-- "./docs_src/usage.py:331:332" ``` Parser error hooks are called when the argument parsing of a message command @@ -502,7 +502,7 @@ Concurrency limiters allow you to limit how many calls can be made to a group of commands concurrently. ```py ---8<-- "./docs_src/usage.py:335:341" +--8<-- "./docs_src/usage.py:336:342" ``` Here [InMemoryConcurrencyLimiter][tanjun.dependencies.InMemoryConcurrencyLimiter] @@ -517,7 +517,7 @@ being used to set this limiter for a client (note that clients can only have 1 linked limiter). ```py ---8<-- "./docs_src/usage.py:345:348" +--8<-- "./docs_src/usage.py:346:349" ``` And here we use [with_concurrency_limit][tanjun.dependencies.with_concurrency_limit] @@ -531,7 +531,7 @@ more information on the resources concurrency can be limited by see Cooldowns limit how often a group of commands can be called. ```py ---8<-- "./docs_src/usage.py:352:358" +--8<-- "./docs_src/usage.py:353:359" ``` Here [InMemoryCooldownManager][tanjun.dependencies.InMemoryCooldownManager] @@ -546,7 +546,7 @@ being used to set this cooldown manager for a client (note that clients can only have 1 linked cooldown manager). ```py ---8<-- "./docs_src/usage.py:362:365" +--8<-- "./docs_src/usage.py:363:366" ``` And here we use [with_cooldown][tanjun.dependencies.with_cooldown] @@ -566,7 +566,7 @@ of a field. Localisation on Discord is limited to the locales Discord supports ### Localising command declarations ```py ---8<-- "./docs_src/usage.py:369:370" +--8<-- "./docs_src/usage.py:370:371" ``` For fields which support localisation you've previously seen a single string @@ -582,7 +582,7 @@ setting/overriding the locale-specific variants used for localised fields such as error message responses and application fields globally. ```py ---8<-- "./docs_src/usage.py:374:386" +--8<-- "./docs_src/usage.py:375:387" ``` Specific fields may be overridden by their ID as shown above. There is no @@ -608,7 +608,7 @@ It's highly recommended that 3rd party libraries match this format if possible. ### Localising command responses ```py ---8<-- "./docs_src/usage.py:390:409" +--8<-- "./docs_src/usage.py:391:410" ``` [tanjun.abc.AppCommandContext.interaction][] (base class for both