diff options
author | 2023-06-04 20:34:14 +0100 | |
---|---|---|
committer | 2023-06-04 20:34:14 +0100 | |
commit | 1a362c04eb4d5d8f3c531a590d73cf5d7300ace8 (patch) | |
tree | accbe4d840b036dcc9502eed395f19400f5ad9a3 | |
parent | Merge pull request #175 from python-discord/log-when-waiting-for-guild-to-be-... (diff) | |
parent | Add changelog entry for ruff migration (diff) |
Merge pull request #176 from python-discord/ruff-migration
Ruff migration
29 files changed, 319 insertions, 478 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 03e6bc96..bf0202a6 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,12 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.0 with: - dev: true python_version: "3.11" install_args: "--extras async-rediscache --only main --only doc" @@ -24,7 +23,7 @@ jobs: run: sphinx-build -nW -j auto -b html docs docs/build - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs-latest path: docs/build/* @@ -34,14 +33,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # We need to check out the entire repository to find all tags - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.0 with: - dev: true python_version: "3.11" install_args: "--extras async-rediscache" @@ -57,13 +55,13 @@ jobs: rm -r docs/build/**/.doctrees - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs path: docs/build/* - name: Deploy To GitHub Pages - uses: JamesIves/[email protected] + uses: JamesIves/github-pages-deploy-action@v4 with: branch: docs folder: docs/build diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 5d8c1aff..0182d268 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -13,29 +13,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.0 with: - # Set dev=true to run pre-commit which is a dev dependency - dev: true python_version: ${{ matrix.python_version }} install_args: "--extras async-rediscache --only main --only lint --only test" - # We will not run `flake8` here, as we will use a separate flake8 - # action. - name: Run pre-commit hooks - run: SKIP=flake8 pre-commit run --all-files + run: SKIP=ruff pre-commit run --all-files - # Run flake8 and have it format the linting errors in the format of - # the GitHub Workflow command to register error annotations. This - # means that our flake8 output is automatically added as an error - # annotation to both the run result and in the "Files" tab of a - # pull request. - # - # Format used: - # ::error file={filename},line={line},col={col}::{message} - - name: Run flake8 - run: "flake8 \ - --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'" + # Run `ruff` using github formatting to enable automatic inline annotations. + - name: Run ruff + run: "ruff check --format=github ." - name: Run tests and generate coverage report run: python -m pytest -n auto --cov pydis_core -q @@ -60,7 +48,7 @@ jobs: - name: Upload a Build Artifact if: always() && steps.prepare-artifact.outcome == 'success' continue-on-error: true - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: pull-request-payload path: pull_request_payload.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b959f1f7..d3c2d87f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,20 +5,25 @@ repos: - id: check-merge-conflict - id: check-toml - id: check-yaml - args: [--unsafe] # Required due to custom constructors (e.g. !ENV) - id: end-of-file-fixer - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 - hooks: - - id: python-check-blanket-noqa + - repo: local hooks: - - id: flake8 - name: Flake8 - description: This hook runs flake8 within our project's poetry environment. - entry: poetry run flake8 + - id: isort + name: isort + description: This hook runs isort within our project's environment. + entry: poetry run isort language: system types: [python] require_serial: true + + - id: ruff + name: ruff + description: Run ruff linting + entry: poetry run ruff check --force-exclude + language: system + 'types_or': [python, pyi] + require_serial: true + args: [--fix, --exit-non-zero-on-fix] diff --git a/dev/bot/__init__.py b/dev/bot/__init__.py index 6ee1ae47..1c43b1a8 100644 --- a/dev/bot/__init__.py +++ b/dev/bot/__init__.py @@ -21,4 +21,4 @@ class Bot(pydis_core.BotBase): async def setup_hook(self) -> None: """Load extensions on startup.""" await super().setup_hook() - asyncio.create_task(self.load_extensions(sys.modules[__name__])) + await self.load_extensions(sys.modules[__name__]) diff --git a/dev/bot/__main__.py b/dev/bot/__main__.py index e28be36b..ea74649c 100644 --- a/dev/bot/__main__.py +++ b/dev/bot/__main__.py @@ -7,6 +7,7 @@ import dotenv from discord.ext import commands import pydis_core + from . import Bot dotenv.load_dotenv() @@ -17,7 +18,7 @@ roles = [int(role) for role in roles.split(",")] if roles else [] bot = Bot( guild_id=int(os.getenv("GUILD_ID")), - http_session=None, # type: ignore # We need to instantiate the session in an async context + http_session=None, # type: ignore We need to instantiate the session in an async context allowed_roles=roles, command_prefix=commands.when_mentioned_or(os.getenv("PREFIX", "!")), intents=discord.Intents.all(), diff --git a/dev/bot/cog.py b/dev/bot/cog.py index 7746c54e..0da950f9 100644 --- a/dev/bot/cog.py +++ b/dev/bot/cog.py @@ -12,7 +12,7 @@ class Cog(commands.Cog): @commands.Cog.listener() async def on_ready(self) -> None: """Print a message when the client (re)connects.""" - print("Client is ready.") + print("Client is ready.") # noqa: T201 @commands.command() async def reload(self, ctx: commands.Context) -> None: diff --git a/docs/changelog.rst b/docs/changelog.rst index d9075d47..1817102e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,6 +3,9 @@ Changelog ========= +- :feature:`176` Migrate repo to use ruff for linting + + - :release:`9.6.0 <6th May 2023>` - :feature:`175` Log when waiting for the guild to be available before loading cogs - :support:`175` Bump Discord.py to :literal-url:`2.2.3 <https://github.com/Rapptz/discord.py/releases/tag/v2.2.3>`. diff --git a/docs/conf.py b/docs/conf.py index 2fea7264..23636774 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,7 @@ # Configuration file for the Sphinx documentation builder. # https://www.sphinx-doc.org/en/master/usage/configuration.html +import contextlib import functools import os.path import shutil @@ -16,7 +17,7 @@ from sphinx.application import Sphinx logger = sphinx.util.logging.getLogger(__name__) # Handle the path not being set correctly in actions. -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath("..")) from docs import utils # noqa: E402 @@ -209,10 +210,9 @@ smv_latest_version = "main" smv_branch_whitelist = "main" if os.getenv("BUILD_DOCS_FOR_HEAD", "False").lower() == "true": if not (branch := os.getenv("BRANCH_NAME")): - try: + with contextlib.suppress(git.InvalidGitRepositoryError): branch = git.Repo(PROJECT_ROOT).active_branch.name - except git.InvalidGitRepositoryError: - pass + if branch: logger.info(f"Adding branch {branch} to build whitelist.") diff --git a/docs/netlify_build.py b/docs/netlify_build.py index 1704eece..a6da74df 100644 --- a/docs/netlify_build.py +++ b/docs/netlify_build.py @@ -22,5 +22,5 @@ OUTPUT.write_text(build_script.text, encoding="utf-8") if __name__ == "__main__": # Run the build script - print("Build started") - subprocess.run([sys.executable, OUTPUT.absolute()]) + print("Build started") # noqa: T201 + subprocess.run([sys.executable, OUTPUT.absolute()]) # noqa: S603 diff --git a/docs/utils.py b/docs/utils.py index 3f58e767..3a20b87f 100644 --- a/docs/utils.py +++ b/docs/utils.py @@ -30,16 +30,15 @@ def get_build_root() -> Path: def is_attribute(module: types.ModuleType, parameter: str) -> bool: """Returns true if `parameter` is an attribute of `module`.""" docs = docstring_parser.parse(inspect.getdoc(module), docstring_parser.DocstringStyle.GOOGLE) - for param in docs.params: + for param in docs.params: # noqa: SIM110 # The docstring_parser library can mis-parse arguments like `arg (:obj:`str`)` as `arg (` # which would create a false-negative below, so we just strip away the extra parenthesis. if param.args[0] == "attribute" and param.arg_name.rstrip(" (") == parameter: return True - return False -def linkcode_resolve(repo_link: str, domain: str, info: dict[str, str]) -> typing.Optional[str]: +def linkcode_resolve(repo_link: str, domain: str, info: dict[str, str]) -> str | None: """ Function called by linkcode to get the URL for a given resource. @@ -79,8 +78,7 @@ def linkcode_resolve(repo_link: str, domain: str, info: dict[str, str]) -> typin # This could be caused by trying to link a class attribute if is_attribute(symbol[-1], name): break - else: - raise e + raise e symbol_name = name @@ -97,8 +95,8 @@ def linkcode_resolve(repo_link: str, domain: str, info: dict[str, str]) -> typin pos = _global_assign_pos(source, symbol_name) if pos is None: raise Exception(f"Could not find symbol `{symbol_name}` in {module.__name__}.") - else: - start, end = pos + + start, end = pos _, offset = inspect.getsourcelines(symbol[-2]) if offset != 0: offset -= 1 @@ -126,7 +124,7 @@ class NodeWithBody(typing.Protocol): body: list[ast.AST] -def _global_assign_pos(ast_: NodeWithBody, name: str) -> typing.Union[tuple[int, int], None]: +def _global_assign_pos(ast_: NodeWithBody, name: str) -> tuple[int, int] | None: """ Find the first instance where the `name` global is defined in `ast_`. @@ -149,6 +147,7 @@ def _global_assign_pos(ast_: NodeWithBody, name: str) -> typing.Union[tuple[int, pos_in_if = _global_assign_pos(ast_obj, name) if pos_in_if is not None: return pos_in_if + return None def cleanup() -> None: @@ -200,7 +199,7 @@ def build_api_doc() -> None: logger.info(f"Skipping api-doc for {output_folder.as_posix()} as it already exists.") return - result = subprocess.run(cmd, cwd=build_root, stdout=subprocess.PIPE, check=True, env=os.environ) + result = subprocess.run(cmd, cwd=build_root, stdout=subprocess.PIPE, check=True, env=os.environ) # noqa: S603 logger.debug("api-doc Output:\n" + result.stdout.decode(encoding="utf-8") + "\n") cleanup() diff --git a/poetry.lock b/poetry.lock index ce01951e..dc482c45 100644 --- a/poetry.lock +++ b/poetry.lock @@ -234,14 +234,14 @@ lxml = ["lxml"] [[package]] name = "certifi" -version = "2022.12.7" +version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." category = "dev" optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, - {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, + {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, + {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, ] [[package]] @@ -432,63 +432,72 @@ files = [ [[package]] name = "coverage" -version = "7.2.5" +version = "7.2.7" description = "Code coverage measurement for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "coverage-7.2.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:883123d0bbe1c136f76b56276074b0c79b5817dd4238097ffa64ac67257f4b6c"}, - {file = "coverage-7.2.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d2fbc2a127e857d2f8898aaabcc34c37771bf78a4d5e17d3e1f5c30cd0cbc62a"}, - {file = "coverage-7.2.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f3671662dc4b422b15776cdca89c041a6349b4864a43aa2350b6b0b03bbcc7f"}, - {file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780551e47d62095e088f251f5db428473c26db7829884323e56d9c0c3118791a"}, - {file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:066b44897c493e0dcbc9e6a6d9f8bbb6607ef82367cf6810d387c09f0cd4fe9a"}, - {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9a4ee55174b04f6af539218f9f8083140f61a46eabcaa4234f3c2a452c4ed11"}, - {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:706ec567267c96717ab9363904d846ec009a48d5f832140b6ad08aad3791b1f5"}, - {file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ae453f655640157d76209f42c62c64c4d4f2c7f97256d3567e3b439bd5c9b06c"}, - {file = "coverage-7.2.5-cp310-cp310-win32.whl", hash = "sha256:f81c9b4bd8aa747d417407a7f6f0b1469a43b36a85748145e144ac4e8d303cb5"}, - {file = "coverage-7.2.5-cp310-cp310-win_amd64.whl", hash = "sha256:dc945064a8783b86fcce9a0a705abd7db2117d95e340df8a4333f00be5efb64c"}, - {file = "coverage-7.2.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40cc0f91c6cde033da493227797be2826cbf8f388eaa36a0271a97a332bfd7ce"}, - {file = "coverage-7.2.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a66e055254a26c82aead7ff420d9fa8dc2da10c82679ea850d8feebf11074d88"}, - {file = "coverage-7.2.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c10fbc8a64aa0f3ed136b0b086b6b577bc64d67d5581acd7cc129af52654384e"}, - {file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a22cbb5ede6fade0482111fa7f01115ff04039795d7092ed0db43522431b4f2"}, - {file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:292300f76440651529b8ceec283a9370532f4ecba9ad67d120617021bb5ef139"}, - {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7ff8f3fb38233035028dbc93715551d81eadc110199e14bbbfa01c5c4a43f8d8"}, - {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:a08c7401d0b24e8c2982f4e307124b671c6736d40d1c39e09d7a8687bddf83ed"}, - {file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef9659d1cda9ce9ac9585c045aaa1e59223b143f2407db0eaee0b61a4f266fb6"}, - {file = "coverage-7.2.5-cp311-cp311-win32.whl", hash = "sha256:30dcaf05adfa69c2a7b9f7dfd9f60bc8e36b282d7ed25c308ef9e114de7fc23b"}, - {file = "coverage-7.2.5-cp311-cp311-win_amd64.whl", hash = "sha256:97072cc90f1009386c8a5b7de9d4fc1a9f91ba5ef2146c55c1f005e7b5c5e068"}, - {file = "coverage-7.2.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bebea5f5ed41f618797ce3ffb4606c64a5de92e9c3f26d26c2e0aae292f015c1"}, - {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828189fcdda99aae0d6bf718ea766b2e715eabc1868670a0a07bf8404bf58c33"}, - {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e8a95f243d01ba572341c52f89f3acb98a3b6d1d5d830efba86033dd3687ade"}, - {file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8834e5f17d89e05697c3c043d3e58a8b19682bf365048837383abfe39adaed5"}, - {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d1f25ee9de21a39b3a8516f2c5feb8de248f17da7eead089c2e04aa097936b47"}, - {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1637253b11a18f453e34013c665d8bf15904c9e3c44fbda34c643fbdc9d452cd"}, - {file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8e575a59315a91ccd00c7757127f6b2488c2f914096077c745c2f1ba5b8c0969"}, - {file = "coverage-7.2.5-cp37-cp37m-win32.whl", hash = "sha256:509ecd8334c380000d259dc66feb191dd0a93b21f2453faa75f7f9cdcefc0718"}, - {file = "coverage-7.2.5-cp37-cp37m-win_amd64.whl", hash = "sha256:12580845917b1e59f8a1c2ffa6af6d0908cb39220f3019e36c110c943dc875b0"}, - {file = "coverage-7.2.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b5016e331b75310610c2cf955d9f58a9749943ed5f7b8cfc0bb89c6134ab0a84"}, - {file = "coverage-7.2.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:373ea34dca98f2fdb3e5cb33d83b6d801007a8074f992b80311fc589d3e6b790"}, - {file = "coverage-7.2.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a063aad9f7b4c9f9da7b2550eae0a582ffc7623dca1c925e50c3fbde7a579771"}, - {file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38c0a497a000d50491055805313ed83ddba069353d102ece8aef5d11b5faf045"}, - {file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b3b05e22a77bb0ae1a3125126a4e08535961c946b62f30985535ed40e26614"}, - {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0342a28617e63ad15d96dca0f7ae9479a37b7d8a295f749c14f3436ea59fdcb3"}, - {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf97ed82ca986e5c637ea286ba2793c85325b30f869bf64d3009ccc1a31ae3fd"}, - {file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c2c41c1b1866b670573657d584de413df701f482574bad7e28214a2362cb1fd1"}, - {file = "coverage-7.2.5-cp38-cp38-win32.whl", hash = "sha256:10b15394c13544fce02382360cab54e51a9e0fd1bd61ae9ce012c0d1e103c813"}, - {file = "coverage-7.2.5-cp38-cp38-win_amd64.whl", hash = "sha256:a0b273fe6dc655b110e8dc89b8ec7f1a778d78c9fd9b4bda7c384c8906072212"}, - {file = "coverage-7.2.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c587f52c81211d4530fa6857884d37f514bcf9453bdeee0ff93eaaf906a5c1b"}, - {file = "coverage-7.2.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4436cc9ba5414c2c998eaedee5343f49c02ca93b21769c5fdfa4f9d799e84200"}, - {file = "coverage-7.2.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6599bf92f33ab041e36e06d25890afbdf12078aacfe1f1d08c713906e49a3fe5"}, - {file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:857abe2fa6a4973f8663e039ead8d22215d31db613ace76e4a98f52ec919068e"}, - {file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f5cab2d7f0c12f8187a376cc6582c477d2df91d63f75341307fcdcb5d60303"}, - {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:aa387bd7489f3e1787ff82068b295bcaafbf6f79c3dad3cbc82ef88ce3f48ad3"}, - {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:156192e5fd3dbbcb11cd777cc469cf010a294f4c736a2b2c891c77618cb1379a"}, - {file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd3b4b8175c1db502adf209d06136c000df4d245105c8839e9d0be71c94aefe1"}, - {file = "coverage-7.2.5-cp39-cp39-win32.whl", hash = "sha256:ddc5a54edb653e9e215f75de377354e2455376f416c4378e1d43b08ec50acc31"}, - {file = "coverage-7.2.5-cp39-cp39-win_amd64.whl", hash = "sha256:338aa9d9883aaaad53695cb14ccdeb36d4060485bb9388446330bef9c361c252"}, - {file = "coverage-7.2.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:8877d9b437b35a85c18e3c6499b23674684bf690f5d96c1006a1ef61f9fdf0f3"}, - {file = "coverage-7.2.5.tar.gz", hash = "sha256:f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47"}, + {file = "coverage-7.2.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d39b5b4f2a66ccae8b7263ac3c8170994b65266797fb96cbbfd3fb5b23921db8"}, + {file = "coverage-7.2.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6d040ef7c9859bb11dfeb056ff5b3872436e3b5e401817d87a31e1750b9ae2fb"}, + {file = "coverage-7.2.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba90a9563ba44a72fda2e85302c3abc71c5589cea608ca16c22b9804262aaeb6"}, + {file = "coverage-7.2.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d9405291c6928619403db1d10bd07888888ec1abcbd9748fdaa971d7d661b2"}, + {file = "coverage-7.2.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31563e97dae5598556600466ad9beea39fb04e0229e61c12eaa206e0aa202063"}, + {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ebba1cd308ef115925421d3e6a586e655ca5a77b5bf41e02eb0e4562a111f2d1"}, + {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cb017fd1b2603ef59e374ba2063f593abe0fc45f2ad9abdde5b4d83bd922a353"}, + {file = "coverage-7.2.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62a5c7dad11015c66fbb9d881bc4caa5b12f16292f857842d9d1871595f4495"}, + {file = "coverage-7.2.7-cp310-cp310-win32.whl", hash = "sha256:ee57190f24fba796e36bb6d3aa8a8783c643d8fa9760c89f7a98ab5455fbf818"}, + {file = "coverage-7.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:f75f7168ab25dd93110c8a8117a22450c19976afbc44234cbf71481094c1b850"}, + {file = "coverage-7.2.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:06a9a2be0b5b576c3f18f1a241f0473575c4a26021b52b2a85263a00f034d51f"}, + {file = "coverage-7.2.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5baa06420f837184130752b7c5ea0808762083bf3487b5038d68b012e5937dbe"}, + {file = "coverage-7.2.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdec9e8cbf13a5bf63290fc6013d216a4c7232efb51548594ca3631a7f13c3a3"}, + {file = "coverage-7.2.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:52edc1a60c0d34afa421c9c37078817b2e67a392cab17d97283b64c5833f427f"}, + {file = "coverage-7.2.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63426706118b7f5cf6bb6c895dc215d8a418d5952544042c8a2d9fe87fcf09cb"}, + {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:afb17f84d56068a7c29f5fa37bfd38d5aba69e3304af08ee94da8ed5b0865833"}, + {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:48c19d2159d433ccc99e729ceae7d5293fbffa0bdb94952d3579983d1c8c9d97"}, + {file = "coverage-7.2.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0e1f928eaf5469c11e886fe0885ad2bf1ec606434e79842a879277895a50942a"}, + {file = "coverage-7.2.7-cp311-cp311-win32.whl", hash = "sha256:33d6d3ea29d5b3a1a632b3c4e4f4ecae24ef170b0b9ee493883f2df10039959a"}, + {file = "coverage-7.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:5b7540161790b2f28143191f5f8ec02fb132660ff175b7747b95dcb77ac26562"}, + {file = "coverage-7.2.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f2f67fe12b22cd130d34d0ef79206061bfb5eda52feb6ce0dba0644e20a03cf4"}, + {file = "coverage-7.2.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a342242fe22407f3c17f4b499276a02b01e80f861f1682ad1d95b04018e0c0d4"}, + {file = "coverage-7.2.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:171717c7cb6b453aebac9a2ef603699da237f341b38eebfee9be75d27dc38e01"}, + {file = "coverage-7.2.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49969a9f7ffa086d973d91cec8d2e31080436ef0fb4a359cae927e742abfaaa6"}, + {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b46517c02ccd08092f4fa99f24c3b83d8f92f739b4657b0f146246a0ca6a831d"}, + {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:a3d33a6b3eae87ceaefa91ffdc130b5e8536182cd6dfdbfc1aa56b46ff8c86de"}, + {file = "coverage-7.2.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:976b9c42fb2a43ebf304fa7d4a310e5f16cc99992f33eced91ef6f908bd8f33d"}, + {file = "coverage-7.2.7-cp312-cp312-win32.whl", hash = "sha256:8de8bb0e5ad103888d65abef8bca41ab93721647590a3f740100cd65c3b00511"}, + {file = "coverage-7.2.7-cp312-cp312-win_amd64.whl", hash = "sha256:9e31cb64d7de6b6f09702bb27c02d1904b3aebfca610c12772452c4e6c21a0d3"}, + {file = "coverage-7.2.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58c2ccc2f00ecb51253cbe5d8d7122a34590fac9646a960d1430d5b15321d95f"}, + {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d22656368f0e6189e24722214ed8d66b8022db19d182927b9a248a2a8a2f67eb"}, + {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a895fcc7b15c3fc72beb43cdcbdf0ddb7d2ebc959edac9cef390b0d14f39f8a9"}, + {file = "coverage-7.2.7-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e84606b74eb7de6ff581a7915e2dab7a28a0517fbe1c9239eb227e1354064dcd"}, + {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0a5f9e1dbd7fbe30196578ca36f3fba75376fb99888c395c5880b355e2875f8a"}, + {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:419bfd2caae268623dd469eff96d510a920c90928b60f2073d79f8fe2bbc5959"}, + {file = "coverage-7.2.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2aee274c46590717f38ae5e4650988d1af340fe06167546cc32fe2f58ed05b02"}, + {file = "coverage-7.2.7-cp37-cp37m-win32.whl", hash = "sha256:61b9a528fb348373c433e8966535074b802c7a5d7f23c4f421e6c6e2f1697a6f"}, + {file = "coverage-7.2.7-cp37-cp37m-win_amd64.whl", hash = "sha256:b1c546aca0ca4d028901d825015dc8e4d56aac4b541877690eb76490f1dc8ed0"}, + {file = "coverage-7.2.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:54b896376ab563bd38453cecb813c295cf347cf5906e8b41d340b0321a5433e5"}, + {file = "coverage-7.2.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3d376df58cc111dc8e21e3b6e24606b5bb5dee6024f46a5abca99124b2229ef5"}, + {file = "coverage-7.2.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e330fc79bd7207e46c7d7fd2bb4af2963f5f635703925543a70b99574b0fea9"}, + {file = "coverage-7.2.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e9d683426464e4a252bf70c3498756055016f99ddaec3774bf368e76bbe02b6"}, + {file = "coverage-7.2.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d13c64ee2d33eccf7437961b6ea7ad8673e2be040b4f7fd4fd4d4d28d9ccb1e"}, + {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7aa5f8a41217360e600da646004f878250a0d6738bcdc11a0a39928d7dc2050"}, + {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8fa03bce9bfbeeef9f3b160a8bed39a221d82308b4152b27d82d8daa7041fee5"}, + {file = "coverage-7.2.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:245167dd26180ab4c91d5e1496a30be4cd721a5cf2abf52974f965f10f11419f"}, + {file = "coverage-7.2.7-cp38-cp38-win32.whl", hash = "sha256:d2c2db7fd82e9b72937969bceac4d6ca89660db0a0967614ce2481e81a0b771e"}, + {file = "coverage-7.2.7-cp38-cp38-win_amd64.whl", hash = "sha256:2e07b54284e381531c87f785f613b833569c14ecacdcb85d56b25c4622c16c3c"}, + {file = "coverage-7.2.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:537891ae8ce59ef63d0123f7ac9e2ae0fc8b72c7ccbe5296fec45fd68967b6c9"}, + {file = "coverage-7.2.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:06fb182e69f33f6cd1d39a6c597294cff3143554b64b9825d1dc69d18cc2fff2"}, + {file = "coverage-7.2.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:201e7389591af40950a6480bd9edfa8ed04346ff80002cec1a66cac4549c1ad7"}, + {file = "coverage-7.2.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f6951407391b639504e3b3be51b7ba5f3528adbf1a8ac3302b687ecababf929e"}, + {file = "coverage-7.2.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f48351d66575f535669306aa7d6d6f71bc43372473b54a832222803eb956fd1"}, + {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b29019c76039dc3c0fd815c41392a044ce555d9bcdd38b0fb60fb4cd8e475ba9"}, + {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:81c13a1fc7468c40f13420732805a4c38a105d89848b7c10af65a90beff25250"}, + {file = "coverage-7.2.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:975d70ab7e3c80a3fe86001d8751f6778905ec723f5b110aed1e450da9d4b7f2"}, + {file = "coverage-7.2.7-cp39-cp39-win32.whl", hash = "sha256:7ee7d9d4822c8acc74a5e26c50604dff824710bc8de424904c0982e25c39c6cb"}, + {file = "coverage-7.2.7-cp39-cp39-win_amd64.whl", hash = "sha256:eb393e5ebc85245347950143969b241d08b52b88a3dc39479822e073a1a8eb27"}, + {file = "coverage-7.2.7-pp37.pp38.pp39-none-any.whl", hash = "sha256:b7b4c971f05e6ae490fef852c218b0e79d4e52f79ef0c8475566584a8fb3e01d"}, + {file = "coverage-7.2.7.tar.gz", hash = "sha256:924d94291ca674905fe9481f12294eb11f2d3d3fd1adb20314ba89e94f44ed59"}, ] [package.dependencies] @@ -544,14 +553,14 @@ files = [ [[package]] name = "docutils" -version = "0.19" +version = "0.20.1" description = "Docutils -- Python Documentation Utilities" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, - {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, ] [[package]] @@ -586,14 +595,14 @@ testing = ["pre-commit"] [[package]] name = "fakeredis" -version = "2.11.2" +version = "2.13.0" description = "Fake implementation of redis API for testing purposes." category = "main" optional = true python-versions = ">=3.7,<4.0" files = [ - {file = "fakeredis-2.11.2-py3-none-any.whl", hash = "sha256:69a504328a89e5e5f2d05a4236b570fb45244c96997c5002c8c6a0503b95f289"}, - {file = "fakeredis-2.11.2.tar.gz", hash = "sha256:e0fef512b8ec49679d373456aa4698a4103005ecd7ca0b13170a2c1d3af949c5"}, + {file = "fakeredis-2.13.0-py3-none-any.whl", hash = "sha256:df7bb44fb9e593970c626325230e1c321f954ce7b204d4c4452eae5233d554ed"}, + {file = "fakeredis-2.13.0.tar.gz", hash = "sha256:53f00f44f771d2b794f1ea036fa07a33476ab7368f1b0e908daab3eff80336f6"}, ] [package.dependencies] @@ -622,134 +631,6 @@ docs = ["furo (>=2023.3.27)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1 testing = ["covdefaults (>=2.3)", "coverage (>=7.2.3)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] -name = "flake8" -version = "6.0.0" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = ">=3.8.1" -files = [ - {file = "flake8-6.0.0-py2.py3-none-any.whl", hash = "sha256:3833794e27ff64ea4e9cf5d410082a8b97ff1a06c16aa3d2027339cd0f1195c7"}, - {file = "flake8-6.0.0.tar.gz", hash = "sha256:c61007e76655af75e6785a931f452915b371dc48f56efd765247c8fe68f2b181"}, -] - -[package.dependencies] -mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.10.0,<2.11.0" -pyflakes = ">=3.0.0,<3.1.0" - -[[package]] -name = "flake8-annotations" -version = "3.0.0" -description = "Flake8 Type Annotation Checks" -category = "dev" -optional = false -python-versions = ">=3.8.1,<4.0.0" -files = [ - {file = "flake8_annotations-3.0.0-py3-none-any.whl", hash = "sha256:ea927d31016515e9aa6e256651d74baeeee6fa4ad3f8383715ec5c0460a4c225"}, - {file = "flake8_annotations-3.0.0.tar.gz", hash = "sha256:88c8b35a0db10b9a92be69ed3f81494509a18db1c3162551e57bc0fc35fab065"}, -] - -[package.dependencies] -attrs = ">=21.4" -flake8 = ">=5.0" - -[[package]] -name = "flake8-bugbear" -version = "23.2.13" -description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "flake8-bugbear-23.2.13.tar.gz", hash = "sha256:39259814a83f33c8409417ee12dd4050c9c0bb4c8707c12fc18ae62b2f3ddee1"}, - {file = "flake8_bugbear-23.2.13-py3-none-any.whl", hash = "sha256:f136bd0ca2684f101168bba2310dec541e11aa6b252260c17dcf58d18069a740"}, -] - -[package.dependencies] -attrs = ">=19.2.0" -flake8 = ">=3.0.0" - -[package.extras] -dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "pytest", "tox"] - -[[package]] -name = "flake8-docstrings" -version = "1.7.0" -description = "Extension for flake8 which uses pydocstyle to check docstrings" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "flake8_docstrings-1.7.0-py2.py3-none-any.whl", hash = "sha256:51f2344026da083fc084166a9353f5082b01f72901df422f74b4d953ae88ac75"}, - {file = "flake8_docstrings-1.7.0.tar.gz", hash = "sha256:4c8cc748dc16e6869728699e5d0d685da9a10b0ea718e090b1ba088e67a941af"}, -] - -[package.dependencies] -flake8 = ">=3" -pydocstyle = ">=2.1" - -[[package]] -name = "flake8-import-order" -version = "0.18.2" -description = "Flake8 and pylama plugin that checks the ordering of import statements." -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "flake8-import-order-0.18.2.tar.gz", hash = "sha256:e23941f892da3e0c09d711babbb0c73bc735242e9b216b726616758a920d900e"}, - {file = "flake8_import_order-0.18.2-py2.py3-none-any.whl", hash = "sha256:82ed59f1083b629b030ee9d3928d9e06b6213eb196fe745b3a7d4af2168130df"}, -] - -[package.dependencies] -pycodestyle = "*" -setuptools = "*" - -[[package]] -name = "flake8-string-format" -version = "0.3.0" -description = "string format checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "flake8-string-format-0.3.0.tar.gz", hash = "sha256:65f3da786a1461ef77fca3780b314edb2853c377f2e35069723348c8917deaa2"}, - {file = "flake8_string_format-0.3.0-py2.py3-none-any.whl", hash = "sha256:812ff431f10576a74c89be4e85b8e075a705be39bc40c4b4278b5b13e2afa9af"}, -] - -[package.dependencies] -flake8 = "*" - -[[package]] -name = "flake8-tidy-imports" -version = "4.8.0" -description = "A flake8 plugin that helps you write tidier imports." -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "flake8-tidy-imports-4.8.0.tar.gz", hash = "sha256:df44f9c841b5dfb3a7a1f0da8546b319d772c2a816a1afefcce43e167a593d83"}, - {file = "flake8_tidy_imports-4.8.0-py3-none-any.whl", hash = "sha256:25bd9799358edefa0e010ce2c587b093c3aba942e96aeaa99b6d0500ae1bf09c"}, -] - -[package.dependencies] -flake8 = ">=3.8.0" - -[[package]] -name = "flake8-todo" -version = "0.7" -description = "TODO notes checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "flake8-todo-0.7.tar.gz", hash = "sha256:6e4c5491ff838c06fe5a771b0e95ee15fc005ca57196011011280fc834a85915"}, -] - -[package.dependencies] -pycodestyle = ">=2.0.0,<3.0.0" - -[[package]] name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" @@ -835,20 +716,20 @@ files = [ [[package]] name = "furo" -version = "2022.12.7" +version = "2023.5.20" description = "A clean customisable Sphinx documentation theme." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "furo-2022.12.7-py3-none-any.whl", hash = "sha256:7cb76c12a25ef65db85ab0743df907573d03027a33631f17d267e598ebb191f7"}, - {file = "furo-2022.12.7.tar.gz", hash = "sha256:d8008f8efbe7587a97ba533c8b2df1f9c21ee9b3e5cad0d27f61193d38b1a986"}, + {file = "furo-2023.5.20-py3-none-any.whl", hash = "sha256:594a8436ddfe0c071f3a9e9a209c314a219d8341f3f1af33fdf7c69544fab9e6"}, + {file = "furo-2023.5.20.tar.gz", hash = "sha256:40e09fa17c6f4b22419d122e933089226dcdb59747b5b6c79363089827dea16f"}, ] [package.dependencies] beautifulsoup4 = "*" pygments = ">=2.7" -sphinx = ">=5.0,<7.0" +sphinx = ">=6.0,<8.0" sphinx-basic-ng = "*" [[package]] @@ -933,6 +814,24 @@ files = [ ] [[package]] +name = "isort" +version = "5.12.0" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, + {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, +] + +[package.extras] +colors = ["colorama (>=0.4.3)"] +pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] +plugins = ["setuptools"] +requirements-deprecated-finder = ["pip-api", "pipreqs"] + +[[package]] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." @@ -1096,18 +995,6 @@ files = [ ] [[package]] -name = "mccabe" -version = "0.7.0" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] - -[[package]] name = "mslex" version = "0.3.0" description = "shlex for windows" @@ -1205,14 +1092,14 @@ files = [ [[package]] name = "nodeenv" -version = "1.7.0" +version = "1.8.0" description = "Node.js virtual environment builder" category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ - {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, - {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, + {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, + {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, ] [package.dependencies] @@ -1231,34 +1118,19 @@ files = [ ] [[package]] -name = "pep8-naming" -version = "0.13.3" -description = "Check PEP-8 naming conventions, plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pep8-naming-0.13.3.tar.gz", hash = "sha256:1705f046dfcd851378aac3be1cd1551c7c1e5ff363bacad707d43007877fa971"}, - {file = "pep8_naming-0.13.3-py3-none-any.whl", hash = "sha256:1a86b8c71a03337c97181917e2b472f0f5e4ccb06844a0d6f0a33522549e7a80"}, -] - -[package.dependencies] -flake8 = ">=5.0.0" - -[[package]] name = "platformdirs" -version = "3.5.0" +version = "3.5.1" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.5.0-py3-none-any.whl", hash = "sha256:47692bc24c1958e8b0f13dd727307cff1db103fca36399f457da8e05f222fdc4"}, - {file = "platformdirs-3.5.0.tar.gz", hash = "sha256:7954a68d0ba23558d753f73437c55f89027cf8f5108c19844d4b82e5af396335"}, + {file = "platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"}, + {file = "platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"}, ] [package.extras] -docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.2.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] @@ -1279,14 +1151,14 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.1.1" +version = "3.3.2" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "pre_commit-3.1.1-py2.py3-none-any.whl", hash = "sha256:b80254e60668e1dd1f5c03a1c9e0413941d61f568a57d745add265945f65bfe8"}, - {file = "pre_commit-3.1.1.tar.gz", hash = "sha256:d63e6537f9252d99f65755ae5b79c989b462d511ebbc481b561db6a297e1e865"}, + {file = "pre_commit-3.3.2-py2.py3-none-any.whl", hash = "sha256:8056bc52181efadf4aac792b1f4f255dfd2fb5a350ded7335d251a68561e8cb6"}, + {file = "pre_commit-3.3.2.tar.gz", hash = "sha256:66e37bec2d882de1f17f88075047ef8962581f83c234ac08da21a0c58953d1f0"}, ] [package.dependencies] @@ -1392,18 +1264,6 @@ cffi = ">=1.5.0" idna = ["idna (>=2.1)"] [[package]] -name = "pycodestyle" -version = "2.10.0" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pycodestyle-2.10.0-py2.py3-none-any.whl", hash = "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"}, - {file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"}, -] - -[[package]] name = "pycparser" version = "2.21" description = "C parser in Python" @@ -1416,36 +1276,6 @@ files = [ ] [[package]] -name = "pydocstyle" -version = "6.3.0" -description = "Python docstring style checker" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019"}, - {file = "pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1"}, -] - -[package.dependencies] -snowballstemmer = ">=2.2.0" - -[package.extras] -toml = ["tomli (>=1.2.3)"] - -[[package]] -name = "pyflakes" -version = "3.0.1" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pyflakes-3.0.1-py2.py3-none-any.whl", hash = "sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf"}, - {file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"}, -] - -[[package]] name = "pygments" version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." @@ -1462,18 +1292,17 @@ plugins = ["importlib-metadata"] [[package]] name = "pytest" -version = "7.2.1" +version = "7.3.1" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"}, - {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"}, + {file = "pytest-7.3.1-py3-none-any.whl", hash = "sha256:3799fa815351fea3a5e96ac7e503a96fa51cc9942c3753cda7651b93c1cfa362"}, + {file = "pytest-7.3.1.tar.gz", hash = "sha256:434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"}, ] [package.dependencies] -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" @@ -1482,18 +1311,18 @@ pluggy = ">=0.12,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-cov" -version = "4.0.0" +version = "4.1.0" description = "Pytest plugin for measuring coverage." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "pytest-cov-4.0.0.tar.gz", hash = "sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470"}, - {file = "pytest_cov-4.0.0-py3-none-any.whl", hash = "sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b"}, + {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"}, + {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"}, ] [package.dependencies] @@ -1505,14 +1334,14 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale [[package]] name = "pytest-xdist" -version = "3.2.0" +version = "3.3.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-xdist-3.2.0.tar.gz", hash = "sha256:fa10f95a2564cd91652f2d132725183c3b590d9fdcdec09d3677386ecf4c1ce9"}, - {file = "pytest_xdist-3.2.0-py3-none-any.whl", hash = "sha256:336098e3bbd8193276867cc87db8b22903c3927665dff9d1ac8684c02f597b68"}, + {file = "pytest-xdist-3.3.1.tar.gz", hash = "sha256:d5ee0520eb1b7bcca50a60a518ab7a7707992812c578198f8b44fdfac78e8c93"}, + {file = "pytest_xdist-3.3.1-py3-none-any.whl", hash = "sha256:ff9daa7793569e6a68544850fd3927cd257cc03a7ef76c95e86915355e82b5f2"}, ] [package.dependencies] @@ -1591,18 +1420,18 @@ files = [ [[package]] name = "redis" -version = "4.5.4" +version = "4.5.5" description = "Python client for Redis database and key-value store" category = "main" optional = true python-versions = ">=3.7" files = [ - {file = "redis-4.5.4-py3-none-any.whl", hash = "sha256:2c19e6767c474f2e85167909061d525ed65bea9301c0770bb151e041b7ac89a2"}, - {file = "redis-4.5.4.tar.gz", hash = "sha256:73ec35da4da267d6847e47f68730fdd5f62e2ca69e3ef5885c6a78a9374c3893"}, + {file = "redis-4.5.5-py3-none-any.whl", hash = "sha256:77929bc7f5dab9adf3acba2d3bb7d7658f1e0c2f1cafe7eb36434e751c471119"}, + {file = "redis-4.5.5.tar.gz", hash = "sha256:dc87a0bdef6c8bfe1ef1e1c40be7034390c2ae02d92dcd0c7ca1729443899880"}, ] [package.dependencies] -async-timeout = {version = ">=4.0.2", markers = "python_version <= \"3.11.2\""} +async-timeout = {version = ">=4.0.2", markers = "python_full_version <= \"3.11.2\""} [package.extras] hiredis = ["hiredis (>=1.0.0)"] @@ -1610,14 +1439,14 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "releases" -version = "2.1.0" +version = "2.1.1" description = "A Sphinx extension for changelog manipulation" category = "dev" optional = false python-versions = ">=3.6" files = [ - {file = "releases-2.1.0-py3-none-any.whl", hash = "sha256:21d2efb9b67b0bbd28a43775cbb5c3c300bb37fcf0dc3e635f570dc9ea3202c8"}, - {file = "releases-2.1.0.tar.gz", hash = "sha256:1303b87d6f0427fbdcc40c31bb893b1dab5be4c8619a4b1c2710c0a218e3c79c"}, + {file = "releases-2.1.1-py3-none-any.whl", hash = "sha256:cd06449c915ce9729aaebe19a836744998f83f9ebb0cf92e54949c88ab3402f1"}, + {file = "releases-2.1.1.tar.gz", hash = "sha256:ae0683c3f309931a3717c6976e0f079929d05d34214b432a95764e61367f58d1"}, ] [package.dependencies] @@ -1626,14 +1455,14 @@ sphinx = ">=4" [[package]] name = "requests" -version = "2.30.0" +version = "2.31.0" description = "Python HTTP for Humans." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "requests-2.30.0-py3-none-any.whl", hash = "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294"}, - {file = "requests-2.30.0.tar.gz", hash = "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4"}, + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, ] [package.dependencies] @@ -1647,6 +1476,33 @@ socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] +name = "ruff" +version = "0.0.270" +description = "An extremely fast Python linter, written in Rust." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.0.270-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:f74c4d550f7b8e808455ac77bbce38daafc458434815ba0bc21ae4bdb276509b"}, + {file = "ruff-0.0.270-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:643de865fd35cb76c4f0739aea5afe7b8e4d40d623df7e9e6ea99054e5cead0a"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eca02e709b3308eb7255b5f74e779be23b5980fca3862eae28bb23069cd61ae4"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3ed3b198768d2b3a2300fb18f730cd39948a5cc36ba29ae9d4639a11040880be"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:739495d2dbde87cf4e3110c8d27bc20febf93112539a968a4e02c26f0deccd1d"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:08188f8351f4c0b6216e8463df0a76eb57894ca59a3da65e4ed205db980fd3ae"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0827b074635d37984fc98d99316bfab5c8b1231bb83e60dacc83bd92883eedb4"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0d61ae4841313f6eeb8292dc349bef27b4ce426e62c36e80ceedc3824e408734"}, + {file = "ruff-0.0.270-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0eb412f20e77529a01fb94d578b19dcb8331b56f93632aa0cce4a2ea27b7aeba"}, + {file = "ruff-0.0.270-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b775e2c5fc869359daf8c8b8aa0fd67240201ab2e8d536d14a0edf279af18786"}, + {file = "ruff-0.0.270-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:21f00e47ab2308617c44435c8dfd9e2e03897461c9e647ec942deb2a235b4cfd"}, + {file = "ruff-0.0.270-py3-none-musllinux_1_2_i686.whl", hash = "sha256:0bbfbf6fd2436165566ca85f6e57be03ed2f0a994faf40180cfbb3604c9232ef"}, + {file = "ruff-0.0.270-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8af391ef81f7be960be10886a3c1aac0b298bde7cb9a86ec2b05faeb2081ce6b"}, + {file = "ruff-0.0.270-py3-none-win32.whl", hash = "sha256:b4c037fe2f75bcd9aed0c89c7c507cb7fa59abae2bd4c8b6fc331a28178655a4"}, + {file = "ruff-0.0.270-py3-none-win_amd64.whl", hash = "sha256:0012f9b7dc137ab7f1f0355e3c4ca49b562baf6c9fa1180948deeb6648c52957"}, + {file = "ruff-0.0.270-py3-none-win_arm64.whl", hash = "sha256:9613456b0b375766244c25045e353bc8890c856431cd97893c97b10cc93bd28d"}, + {file = "ruff-0.0.270.tar.gz", hash = "sha256:95db07b7850b30ebf32b27fe98bc39e0ab99db3985edbbf0754d399eb2f0e690"}, +] + +[[package]] name = "semantic-version" version = "2.6.0" description = "A library implementing the 'SemVer' scheme." @@ -1660,19 +1516,19 @@ files = [ [[package]] name = "setuptools" -version = "67.7.2" +version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"}, - {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"}, + {file = "setuptools-67.8.0-py3-none-any.whl", hash = "sha256:5df61bf30bb10c6f756eb19e7c9f3b473051f48db77fddbe06ff2ca307df9a6f"}, + {file = "setuptools-67.8.0.tar.gz", hash = "sha256:62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -1737,21 +1593,21 @@ files = [ [[package]] name = "sphinx" -version = "6.1.3" +version = "7.0.1" description = "Python documentation generator" category = "dev" optional = false python-versions = ">=3.8" files = [ - {file = "Sphinx-6.1.3.tar.gz", hash = "sha256:0dac3b698538ffef41716cf97ba26c1c7788dba73ce6f150c1ff5b4720786dd2"}, - {file = "sphinx-6.1.3-py3-none-any.whl", hash = "sha256:807d1cb3d6be87eb78a381c3e70ebd8d346b9a25f3753e9947e866b2786865fc"}, + {file = "Sphinx-7.0.1.tar.gz", hash = "sha256:61e025f788c5977d9412587e733733a289e2b9fdc2fef8868ddfbfc4ccfe881d"}, + {file = "sphinx-7.0.1-py3-none-any.whl", hash = "sha256:60c5e04756c1709a98845ed27a2eed7a556af3993afb66e77fec48189f742616"}, ] [package.dependencies] alabaster = ">=0.7,<0.8" babel = ">=2.9" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.18,<0.20" +docutils = ">=0.18.1,<0.21" imagesize = ">=1.3" Jinja2 = ">=3.0" packaging = ">=21.0" @@ -1768,26 +1624,26 @@ sphinxcontrib-serializinghtml = ">=1.1.5" [package.extras] docs = ["sphinxcontrib-websupport"] lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"] -test = ["cython", "html5lib", "pytest (>=4.6)"] +test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] [[package]] name = "sphinx-autodoc-typehints" -version = "1.22" +version = "1.23.0" description = "Type hints (PEP 484) support for the Sphinx autodoc extension" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "sphinx_autodoc_typehints-1.22-py3-none-any.whl", hash = "sha256:ef4a8b9d52de66065aa7d3adfabf5a436feb8a2eff07c2ddc31625d8807f2b69"}, - {file = "sphinx_autodoc_typehints-1.22.tar.gz", hash = "sha256:71fca2d5eee9b034204e4c686ab20b4d8f5eb9409396216bcae6c87c38e18ea6"}, + {file = "sphinx_autodoc_typehints-1.23.0-py3-none-any.whl", hash = "sha256:ac099057e66b09e51b698058ba7dd76e57e1fe696cd91b54e121d3dad188f91d"}, + {file = "sphinx_autodoc_typehints-1.23.0.tar.gz", hash = "sha256:5d44e2996633cdada499b6d27a496ddf9dbc95dd1f0f09f7b37940249e61f6e9"}, ] [package.dependencies] sphinx = ">=5.3" [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.21)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.5)", "diff-cover (>=7.3)", "nptyping (>=2.4.1)", "pytest (>=7.2.1)", "pytest-cov (>=4)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.4)"] +docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23.4)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "nptyping (>=2.5)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "sphobjinv (>=2.3.1)", "typing-extensions (>=4.5)"] type-comment = ["typed-ast (>=1.5.4)"] [[package]] @@ -1932,14 +1788,14 @@ files = [ [[package]] name = "taskipy" -version = "1.10.3" +version = "1.11.0" description = "tasks runner for python projects" category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ - {file = "taskipy-1.10.3-py3-none-any.whl", hash = "sha256:4c0070ca53868d97989f7ab5c6f237525d52ee184f9b967576e8fe427ed9d0b8"}, - {file = "taskipy-1.10.3.tar.gz", hash = "sha256:112beaf21e3d5569950b99162a1de003fa885fabee9e450757a6b874be914877"}, + {file = "taskipy-1.11.0-py3-none-any.whl", hash = "sha256:4e40cd41747a54bc8a9b3c21057c25cac645309c2d8ac897bdc1e7235e9c900e"}, + {file = "taskipy-1.11.0.tar.gz", hash = "sha256:521e8b3b65dc1ff9bb036cae989dbe5aec1626a61cf4744e5c0d0d2450c7fcb4"}, ] [package.dependencies] @@ -1962,14 +1818,14 @@ files = [ [[package]] name = "typing-extensions" -version = "4.5.0" +version = "4.6.2" description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, - {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, + {file = "typing_extensions-4.6.2-py3-none-any.whl", hash = "sha256:3a8b36f13dd5fdc5d1b16fe317f5668545de77fa0b8e02006381fd49d731ab98"}, + {file = "typing_extensions-4.6.2.tar.gz", hash = "sha256:06006244c70ac8ee83fa8282cb188f697b8db25bc8b4df07be1873c43897060c"}, ] [[package]] @@ -2105,4 +1961,4 @@ async-rediscache = ["async-rediscache"] [metadata] lock-version = "2.0" python-versions = "3.10.* || 3.11.*" -content-hash = "4437af2f65113039f877664819a25b659ce794e8644aa369cbcac1e524cd76fe" +content-hash = "60349114a7283acb6320194ebd4d618ff1a546b0e4081ea8f3839e6901a4bf23" diff --git a/pydis_core/__init__.py b/pydis_core/__init__.py index a09feeaa..94f4ac10 100644 --- a/pydis_core/__init__.py +++ b/pydis_core/__init__.py @@ -12,4 +12,4 @@ __all__ = [ StartupError, ] -__all__ = list(map(lambda module: module.__name__, __all__)) +__all__ = [module.__name__ for module in __all__] diff --git a/pydis_core/_bot.py b/pydis_core/_bot.py index b45647f3..57336460 100644 --- a/pydis_core/_bot.py +++ b/pydis_core/_bot.py @@ -3,7 +3,6 @@ import socket import types import warnings from contextlib import suppress -from typing import Optional import aiohttp import discord @@ -19,7 +18,7 @@ try: from async_rediscache import RedisSession REDIS_AVAILABLE = True except ImportError: - RedisSession = None + RedisSession = object REDIS_AVAILABLE = False log = get_logger() @@ -42,9 +41,9 @@ class BotBase(commands.Bot): guild_id: int, allowed_roles: list, http_session: aiohttp.ClientSession, - redis_session: Optional[RedisSession] = None, - api_client: Optional[APIClient] = None, - statsd_url: Optional[str] = None, + redis_session: RedisSession | None = None, + api_client: APIClient | None = None, + statsd_url: str | None = None, **kwargs, ): """ @@ -77,16 +76,16 @@ class BotBase(commands.Bot): elif redis_session: self.redis_session = redis_session - self._resolver: Optional[aiohttp.AsyncResolver] = None - self._connector: Optional[aiohttp.TCPConnector] = None + self._resolver: aiohttp.AsyncResolver | None = None + self._connector: aiohttp.TCPConnector | None = None - self._statsd_timerhandle: Optional[asyncio.TimerHandle] = None - self._guild_available: Optional[asyncio.Event] = None + self._statsd_timerhandle: asyncio.TimerHandle | None = None + self._guild_available: asyncio.Event | None = None self._extension_loading_task: asyncio.Task | None = None - self.stats: Optional[AsyncStatsClient] = None + self.stats: AsyncStatsClient | None = None - self.all_extensions: Optional[frozenset[str]] = None + self.all_extensions: frozenset[str] | None = None def _connect_statsd( self, @@ -176,7 +175,7 @@ class BotBase(commands.Bot): super().add_command(command) self._add_root_aliases(command) - def remove_command(self, name: str) -> Optional[commands.Command]: + def remove_command(self, name: str) -> commands.Command | None: """ Remove a command/alias as normal and then remove its root aliases from the bot. diff --git a/pydis_core/async_stats.py b/pydis_core/async_stats.py index 411325e3..ae409467 100644 --- a/pydis_core/async_stats.py +++ b/pydis_core/async_stats.py @@ -2,7 +2,6 @@ import asyncio import socket -from typing import Optional from statsd.client.base import StatsClientBase @@ -15,7 +14,7 @@ class AsyncStatsClient(StatsClientBase): def __init__( self, loop: asyncio.AbstractEventLoop, - host: str = 'localhost', + host: str = "localhost", port: int = 8125, prefix: str = None ): @@ -35,7 +34,7 @@ class AsyncStatsClient(StatsClientBase): self._addr = addr self._prefix = prefix self._loop = loop - self._transport: Optional[asyncio.DatagramTransport] = None + self._transport: asyncio.DatagramTransport | None = None async def create_socket(self) -> None: """Use :obj:`asyncio.loop.create_datagram_endpoint` from the loop given on init to create a socket.""" @@ -51,7 +50,7 @@ class AsyncStatsClient(StatsClientBase): async def _async_send(self, data: str) -> None: """Send data to the statsd server using the async transport.""" - self._transport.sendto(data.encode('ascii'), self._addr) + self._transport.sendto(data.encode("ascii"), self._addr) -__all__ = ['AsyncStatsClient'] +__all__ = ["AsyncStatsClient"] diff --git a/pydis_core/exts/__init__.py b/pydis_core/exts/__init__.py index afd56166..9d59e8ad 100644 --- a/pydis_core/exts/__init__.py +++ b/pydis_core/exts/__init__.py @@ -1,4 +1,4 @@ """Reusable Discord cogs.""" __all__ = [] -__all__ = list(map(lambda module: module.__name__, __all__)) +__all__ = [module.__name__ for module in __all__] diff --git a/pydis_core/site_api.py b/pydis_core/site_api.py index c17d2642..80eeff2b 100644 --- a/pydis_core/site_api.py +++ b/pydis_core/site_api.py @@ -1,7 +1,6 @@ """An API wrapper around the Site API.""" import asyncio -from typing import Optional from urllib.parse import quote as quote_url import aiohttp @@ -17,8 +16,8 @@ class ResponseCodeError(ValueError): def __init__( self, response: aiohttp.ClientResponse, - response_json: Optional[dict] = None, - response_text: Optional[str] = None + response_json: dict | None = None, + response_text: str | None = None ): """ Initialize a new :obj:`ResponseCodeError` instance. @@ -42,7 +41,7 @@ class ResponseCodeError(ValueError): class APIClient: """A wrapper for the Django Site API.""" - session: Optional[aiohttp.ClientSession] = None + session: aiohttp.ClientSession | None = None loop: asyncio.AbstractEventLoop = None def __init__(self, site_api_url: str, site_api_token: str, **session_kwargs): @@ -57,13 +56,13 @@ class APIClient: self.site_api_url = site_api_url auth_headers = { - 'Authorization': f"Token {site_api_token}" + "Authorization": f"Token {site_api_token}" } - if 'headers' in session_kwargs: - session_kwargs['headers'].update(auth_headers) + if "headers" in session_kwargs: + session_kwargs["headers"].update(auth_headers) else: - session_kwargs['headers'] = auth_headers + session_kwargs["headers"] = auth_headers # aiohttp will complain if APIClient gets instantiated outside a coroutine. Thankfully, we # don't and shouldn't need to do that, so we can avoid scheduling a task to create it. @@ -134,7 +133,7 @@ class APIClient: """Equivalent to :meth:`APIClient.request` with PUT passed as the method.""" return await self.request("PUT", endpoint, raise_for_status=raise_for_status, **kwargs) - async def delete(self, endpoint: str, *, raise_for_status: bool = True, **kwargs) -> Optional[dict]: + async def delete(self, endpoint: str, *, raise_for_status: bool = True, **kwargs) -> dict | None: """ Send a DELETE request to the site API and return the JSON response. @@ -154,4 +153,4 @@ class APIClient: return await resp.json() -__all__ = ['APIClient', 'ResponseCodeError'] +__all__ = ["APIClient", "ResponseCodeError"] diff --git a/pydis_core/utils/__init__.py b/pydis_core/utils/__init__.py index 0542231e..8a61082a 100644 --- a/pydis_core/utils/__init__.py +++ b/pydis_core/utils/__init__.py @@ -1,17 +1,7 @@ """Useful utilities and tools for Discord bot development.""" from pydis_core.utils import ( - _monkey_patches, - caching, - channel, - commands, - cooldown, - function, - interactions, - logging, - members, - regex, - scheduling, + _monkey_patches, caching, channel, commands, cooldown, function, interactions, logging, members, regex, scheduling ) from pydis_core.utils._extensions import unqualify @@ -47,4 +37,4 @@ __all__ = [ unqualify, ] -__all__ = list(map(lambda module: module.__name__, __all__)) +__all__ = [module.__name__ for module in __all__] diff --git a/pydis_core/utils/_monkey_patches.py b/pydis_core/utils/_monkey_patches.py index f0a8dc9c..2df56039 100644 --- a/pydis_core/utils/_monkey_patches.py +++ b/pydis_core/utils/_monkey_patches.py @@ -1,8 +1,7 @@ """Contains all common monkey patches, used to alter discord to fit our needs.""" import logging -import typing -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone from functools import partial, partialmethod from discord import Forbidden, http @@ -24,7 +23,7 @@ class _Command(commands.Command): super().__init__(*args, **kwargs) self.root_aliases = kwargs.get("root_aliases", []) - if not isinstance(self.root_aliases, (list, tuple)): + if not isinstance(self.root_aliases, list | tuple): raise TypeError("Root aliases of a command must be a list or a tuple of strings.") @@ -47,17 +46,17 @@ def _patch_typing() -> None: log.debug("Patching send_typing, which should fix things breaking when Discord disables typing events. Stay safe!") original = http.HTTPClient.send_typing - last_403: typing.Optional[datetime] = None + last_403: datetime | None = None async def honeybadger_type(self: http.HTTPClient, channel_id: int) -> None: nonlocal last_403 - if last_403 and (datetime.utcnow() - last_403) < timedelta(minutes=5): + if last_403 and (datetime.now(tz=timezone.utc) - last_403) < timedelta(minutes=5): log.warning("Not sending typing event, we got a 403 less than 5 minutes ago.") return try: await original(self, channel_id) except Forbidden: - last_403 = datetime.utcnow() + last_403 = datetime.now(tz=timezone.utc) log.warning("Got a 403 from typing event!") http.HTTPClient.send_typing = honeybadger_type diff --git a/pydis_core/utils/commands.py b/pydis_core/utils/commands.py index 7afd8137..2bc5b668 100644 --- a/pydis_core/utils/commands.py +++ b/pydis_core/utils/commands.py @@ -1,10 +1,9 @@ -from typing import Optional from discord import Message from discord.ext.commands import BadArgument, Context, clean_content -async def clean_text_or_reply(ctx: Context, text: Optional[str] = None) -> str: +async def clean_text_or_reply(ctx: Context, text: str | None = None) -> str: """ Cleans a text argument or replied message's content. diff --git a/pydis_core/utils/cooldown.py b/pydis_core/utils/cooldown.py index 5129befd..0fe7102a 100644 --- a/pydis_core/utils/cooldown.py +++ b/pydis_core/utils/cooldown.py @@ -26,6 +26,7 @@ _HashableArgsTuple = tuple[Hashable, ...] if typing.TYPE_CHECKING: import typing_extensions + from pydis_core import BotBase P = typing.ParamSpec("P") @@ -34,7 +35,7 @@ R = typing.TypeVar("R") """The command's return value.""" -class CommandOnCooldown(CommandError, typing.Generic[P, R]): +class CommandOnCooldown(CommandError, typing.Generic[P, R]): # noqa: N818 """Raised when a command is invoked while on cooldown.""" def __init__( diff --git a/pydis_core/utils/function.py b/pydis_core/utils/function.py index d89163ec..98737af0 100644 --- a/pydis_core/utils/function.py +++ b/pydis_core/utils/function.py @@ -99,7 +99,7 @@ def command_wraps( Returns: A decorator that behaves like :func:`functools.wraps`, with the wrapper replaced with the function :func:`update_wrapper_globals` returned. - """ # noqa: D200 + """ def decorator(wrapper: Callable[_P, _R]) -> Callable[_P, _R]: return functools.update_wrapper( update_wrapper_globals(wrapper, wrapped, ignored_conflict_names=ignored_conflict_names), diff --git a/pydis_core/utils/interactions.py b/pydis_core/utils/interactions.py index a6746e1e..6e419342 100644 --- a/pydis_core/utils/interactions.py +++ b/pydis_core/utils/interactions.py @@ -1,4 +1,5 @@ -from typing import Literal, Optional, Sequence +from collections.abc import Sequence +from typing import Literal from discord import ButtonStyle, HTTPException, Interaction, Message, NotFound, ui @@ -43,8 +44,8 @@ class ViewWithUserAndRoleCheck(ui.View): *, allowed_users: Sequence[int], allowed_roles: Sequence[int], - timeout: Optional[float] = 180.0, - message: Optional[Message] = None + timeout: float | None = 180.0, + message: Message | None = None ) -> None: super().__init__(timeout=timeout) self.allowed_users = allowed_users @@ -97,7 +98,7 @@ class DeleteMessageButton(ui.Button): style (:literal-url:`ButtonStyle <https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.ButtonStyle>`): The style of the button, set to ``ButtonStyle.secondary`` if not specified. label: The label of the button, set to "Delete" if not specified. - """ # noqa: E501 + """ def __init__( self, diff --git a/pydis_core/utils/logging.py b/pydis_core/utils/logging.py index 7814f348..ecccb91a 100644 --- a/pydis_core/utils/logging.py +++ b/pydis_core/utils/logging.py @@ -32,7 +32,7 @@ class CustomLogger(LoggerClass): self.log(TRACE_LEVEL, msg, *args, **kwargs) -def get_logger(name: typing.Optional[str] = None) -> CustomLogger: +def get_logger(name: str | None = None) -> CustomLogger: """ Utility to make mypy recognise that logger is of type :obj:`CustomLogger`. diff --git a/pydis_core/utils/members.py b/pydis_core/utils/members.py index fa8481cc..542f945f 100644 --- a/pydis_core/utils/members.py +++ b/pydis_core/utils/members.py @@ -9,7 +9,7 @@ from pydis_core.utils import logging log = logging.get_logger(__name__) -async def get_or_fetch_member(guild: discord.Guild, member_id: int) -> typing.Optional[discord.Member]: +async def get_or_fetch_member(guild: discord.Guild, member_id: int) -> discord.Member | None: """ Attempt to get a member from cache; on failure fetch from the API. diff --git a/pydis_core/utils/scheduling.py b/pydis_core/utils/scheduling.py index d4458bc1..1e2e25e7 100644 --- a/pydis_core/utils/scheduling.py +++ b/pydis_core/utils/scheduling.py @@ -5,7 +5,7 @@ import contextlib import inspect import typing from collections import abc -from datetime import datetime +from datetime import datetime, timezone from functools import partial from pydis_core.utils import logging @@ -69,7 +69,8 @@ class Scheduler: self._log.trace(f"Scheduling task #{task_id}...") msg = f"Cannot schedule an already started coroutine for #{task_id}" - assert inspect.getcoroutinestate(coroutine) == "CORO_CREATED", msg + if inspect.getcoroutinestate(coroutine) != "CORO_CREATED": + raise ValueError(msg) if task_id in self._scheduled_tasks: self._log.debug(f"Did not schedule task #{task_id}; task was already scheduled.") @@ -99,7 +100,7 @@ class Scheduler: task_id: A unique ID to create the task with. coroutine: The function to be called. """ - now_datetime = datetime.now(time.tzinfo) if time.tzinfo else datetime.utcnow() + now_datetime = datetime.now(time.tzinfo) if time.tzinfo else datetime.now(tz=timezone.utc) delay = (time - now_datetime).total_seconds() if delay > 0: coroutine = self._await_later(delay, task_id, coroutine) @@ -108,7 +109,7 @@ class Scheduler: def schedule_later( self, - delay: typing.Union[int, float], + delay: int | float, task_id: abc.Hashable, coroutine: abc.Coroutine ) -> None: @@ -152,7 +153,7 @@ class Scheduler: async def _await_later( self, - delay: typing.Union[int, float], + delay: int | float, task_id: abc.Hashable, coroutine: abc.Coroutine ) -> None: @@ -218,7 +219,7 @@ def create_task( coro: abc.Coroutine[typing.Any, typing.Any, TASK_RETURN], *, suppressed_exceptions: tuple[type[Exception], ...] = (), - event_loop: typing.Optional[asyncio.AbstractEventLoop] = None, + event_loop: asyncio.AbstractEventLoop | None = None, **kwargs, ) -> asyncio.Task[TASK_RETURN]: """ diff --git a/pyproject.toml b/pyproject.toml index 5c4ebaf0..641fda7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,37 +34,30 @@ aiodns = "3.0.0" async-rediscache = ["async-rediscache"] [tool.poetry.group.dev.dependencies] -taskipy = "1.10.3" +taskipy = "1.11.0" python-dotenv = "1.0.0" [tool.poetry.group.test.dependencies] -pytest = "7.2.1" -pytest-cov = "4.0.0" -pytest-xdist = "3.2.0" +pytest = "7.3.1" +pytest-cov = "4.1.0" +pytest-xdist = "3.3.1" [tool.poetry.group.lint.dependencies] -flake8 = "6.0.0" -flake8-annotations = "3.0.0" -flake8-bugbear = "23.2.13" -flake8-docstrings = "1.7.0" -flake8-import-order = "0.18.2" -flake8-string-format = "0.3.0" -flake8-tidy-imports = "4.8.0" -flake8-todo = "0.7" -pep8-naming = "0.13.3" -pre-commit = "3.1.1" -typing-extensions = "4.5.0" +isort = "5.12.0" +ruff = "0.0.270" +pre-commit = "3.3.2" +typing-extensions = "4.6.2" [tool.poetry.group.doc.dependencies] -Sphinx = "6.1.3" +Sphinx = "7.0.1" GitPython = "3.1.31" -sphinx-autodoc-typehints = "1.22" -furo = "2022.12.7" +sphinx-autodoc-typehints = "1.23.0" +furo = "2023.5.20" six = "1.16.0" -releases = "2.1.0" +releases = "2.1.1" sphinx-multiversion = "0.2.4" docstring-parser = "0.15" -typing-extensions = "4.5.0" +typing-extensions = "4.6.2" tomli = "2.0.1" [tool.taskipy.tasks] @@ -82,3 +75,33 @@ build-backend = "poetry.core.masonry.api" branch = true source_pkgs = ["pydis_core"] source = ["tests"] + +[tool.isort] +multi_line_output = 6 +order_by_type = false +case_sensitive = true +combine_as_imports = true +line_length = 120 +atomic = true +known_first_party = ["dev", "pydis_core", "docs"] + +[tool.ruff] +target-version = "py310" +extend-exclude = [".cache"] +ignore = [ + "ANN002", "ANN003", "ANN101", "ANN102", "ANN204", "ANN206", "ANN401", + "B904", + "C401", "C408", + "D100", "D104", "D105", "D107", "D203", "D212", "D214", "D215", "D301", + "D400", "D401", "D402", "D404", "D405", "D406", "D407", "D408", "D409", "D410", "D411", "D412", "D413", "D414", "D416", "D417", + "E731", + "RET504", + "RUF005", + "S311", + "SIM102", "SIM108", +] +line-length = 120 +select = ["ANN", "B", "C4", "D", "DTZ", "E", "F", "ISC", "INT", "N", "PGH", "PIE", "Q", "RET", "RSE", "RUF", "S", "SIM", "T20", "TID", "UP", "W"] + +[tool.ruff.per-file-ignores] +"tests/*" = ["ANN", "D"] diff --git a/tests/pydis_core/test_api.py b/tests/pydis_core/test_api.py index 92444e19..56977f07 100644 --- a/tests/pydis_core/test_api.py +++ b/tests/pydis_core/test_api.py @@ -32,7 +32,7 @@ class APIClientTests(unittest.IsolatedAsyncioTestCase): def test_response_code_error_initialization_with_json(self): """Test the initialization of `ResponseCodeError` with json.""" - json_data = {'hello': 'world'} + json_data = {"hello": "world"} error = site_api.ResponseCodeError( response=self.error_api_response, response_json=json_data, @@ -42,7 +42,7 @@ class APIClientTests(unittest.IsolatedAsyncioTestCase): def test_response_code_error_string_representation_with_nonempty_response_json(self): """Test the string representation of `ResponseCodeError` initialized with json.""" - json_data = {'hello': 'world'} + json_data = {"hello": "world"} error = site_api.ResponseCodeError( response=self.error_api_response, response_json=json_data @@ -51,7 +51,7 @@ class APIClientTests(unittest.IsolatedAsyncioTestCase): def test_response_code_error_initialization_with_text(self): """Test the initialization of `ResponseCodeError` with text.""" - text_data = 'Lemon will eat your soul' + text_data = "Lemon will eat your soul" error = site_api.ResponseCodeError( response=self.error_api_response, response_text=text_data, @@ -61,7 +61,7 @@ class APIClientTests(unittest.IsolatedAsyncioTestCase): def test_response_code_error_string_representation_with_nonempty_response_text(self): """Test the string representation of `ResponseCodeError` initialized with text.""" - text_data = 'Lemon will eat your soul' + text_data = "Lemon will eat your soul" error = site_api.ResponseCodeError( response=self.error_api_response, response_text=text_data diff --git a/tests/pydis_core/utils/test_regex.py b/tests/pydis_core/utils/test_regex.py index 01a2412b..1cf90711 100644 --- a/tests/pydis_core/utils/test_regex.py +++ b/tests/pydis_core/utils/test_regex.py @@ -1,10 +1,9 @@ import unittest -from typing import Optional from pydis_core.utils.regex import DISCORD_INVITE -def match_regex(s: str) -> Optional[str]: +def match_regex(s: str) -> str | None: """Helper function to run re.match on a string. Return the invite capture group, if the string matches the pattern @@ -14,7 +13,7 @@ def match_regex(s: str) -> Optional[str]: return result if result is None else result.group("invite") -def search_regex(s: str) -> Optional[str]: +def search_regex(s: str) -> str | None: """Helper function to run re.search on a string. Return the invite capture group, if the string matches the pattern diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 423884f0..00000000 --- a/tox.ini +++ /dev/null @@ -1,19 +0,0 @@ -[flake8] -max-line-length=120 -docstring-convention=all -import-order-style=pycharm -application_import_names=pydis_core,docs,tests -exclude=.cache,.venv,.git,constants.py,bot/ -extend-ignore= - B311,W503,E226,S311,T000,E731 - # Missing Docstrings - D100,D104,D105,D107, - # Docstring Whitespace - D203,D212,D214,D215, - # Docstring Quotes - D301,D302, - # Docstring Content - D400,D401,D402,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D416,D417 - # Type Annotations - ANN002,ANN003,ANN101,ANN102,ANN204,ANN206,ANN401 -per-file-ignores=tests/*:D,ANN |