From 7de19d1372f87cca1fdb30cfa9e6d3eaf03a1e69 Mon Sep 17 00:00:00 2001 From: billsioros Date: Wed, 24 May 2023 15:56:42 +0300 Subject: [PATCH 1/2] chore: replace `flakeheaven` with `ruff` --- .gitignore | 2 - .pre-commit-config.yaml | 12 +- README.md | 19 - poetry.lock | 648 +++++------------------------------ pyproject.toml | 74 ++-- src/querpyable/querpyable.py | 189 +++++----- 6 files changed, 230 insertions(+), 714 deletions(-) diff --git a/.gitignore b/.gitignore index 2395167..364d759 100644 --- a/.gitignore +++ b/.gitignore @@ -150,5 +150,3 @@ Thumbs.db #thumbnail cache on Windows # End of https://www.toptal.com/developers/gitignore/api/python - -.flakeheaven_cache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41555d7..dba424c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,6 @@ ci: autofix_prs: true autoupdate_commit_msg: 'ci: `pre-commit.ci` auto update' repos: - - repo: https://github.com/humitos/mirrors-autoflake.git - rev: v1.1 - hooks: - - id: autoflake - args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: @@ -18,10 +13,11 @@ repos: hooks: - id: black language_version: python3 - - repo: https://github.com/flakeheaven/flakeheaven - rev: 3.3.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.269 hooks: - - id: flakeheaven + - id: ruff + args: [--fix, --exit-non-zero-on-fix] exclude: ^docs|tests - repo: https://github.com/codespell-project/codespell rev: v2.2.4 diff --git a/README.md b/README.md index 2821ccf..294f006 100644 --- a/README.md +++ b/README.md @@ -90,25 +90,6 @@ Queryable \ pip install querpyable ``` -In order to locally set up the project please follow the instructions below: - -```shell -# Set up the GitHub repository -git init -git config --local user.name Vasilis Sioros -git config --local user.email billsioros97@gmail.com -git add . -git commit -m "feat: initial commit" -git remote add origin https://github.com/billsioros/querpyable - -# Create a virtual environment using poetry and install the required dependencies -poetry shell -poetry install - -# Install pre-commit hooks -pre-commit install --install-hooks -``` - ## :book: Documentation The project's documentation can be found [here](https://billsioros.github.io/querpyable/). diff --git a/poetry.lock b/poetry.lock index 389fc57..3a76a2c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,46 +1,3 @@ -[[package]] -name = "astor" -version = "0.8.1" -description = "Read/rewrite/write Python ASTs" -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" - -[[package]] -name = "attrs" -version = "23.1.0" -description = "Classes Without Boilerplate" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] - -[[package]] -name = "bandit" -version = "1.7.5" -description = "Security oriented static analyser for python code." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} -GitPython = ">=1.0.1" -PyYAML = ">=5.3.1" -rich = "*" -stevedore = ">=1.20.0" - -[package.extras] -test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)", "tomli (>=1.1.0)"] -toml = ["tomli (>=1.1.0)"] -yaml = ["PyYAML"] - [[package]] name = "black" version = "23.3.0" @@ -146,7 +103,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7 [[package]] name = "coverage" -version = "7.2.5" +version = "7.2.6" description = "Code coverage measurement for Python" category = "dev" optional = false @@ -187,14 +144,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "darglint" -version = "1.8.1" -description = "A utility for ensuring Google-style docstrings stay up to date with the source code." -category = "dev" -optional = false -python-versions = ">=3.6,<4.0" - [[package]] name = "distlib" version = "0.3.6" @@ -219,22 +168,6 @@ category = "dev" optional = false python-versions = ">=3.5,<4.0" -[[package]] -name = "entrypoints" -version = "0.4" -description = "Discover and load entry points from installed packages." -category = "dev" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "eradicate" -version = "2.2.0" -description = "Removes commented-out code." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "exceptiongroup" version = "1.1.1" @@ -258,198 +191,6 @@ python-versions = ">=3.7" docs = ["furo (>=2023.3.27)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] 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 = "4.0.1" -description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.8.0,<2.9.0" -pyflakes = ">=2.4.0,<2.5.0" - -[[package]] -name = "flake8-bandit" -version = "3.0.0" -description = "Automated security testing with bandit and flake8." -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -bandit = ">=1.7.3" -flake8 = "*" -flake8-polyfill = "*" -pycodestyle = "*" - -[[package]] -name = "flake8-broken-line" -version = "0.5.0" -description = "Flake8 plugin to forbid backslashes for line breaks" -category = "dev" -optional = false -python-versions = ">=3.6,<4.0" - -[package.dependencies] -flake8 = ">=3.5,<6" - -[[package]] -name = "flake8-bugbear" -version = "22.12.6" -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" - -[package.dependencies] -attrs = ">=19.2.0" -flake8 = ">=3.0.0" - -[package.extras] -dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "tox"] - -[[package]] -name = "flake8-commas" -version = "2.1.0" -description = "Flake8 lint for trailing commas." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = ">=2" - -[[package]] -name = "flake8-comprehensions" -version = "3.12.0" -description = "A flake8 plugin to help you write better list/set/dict comprehensions." -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -flake8 = ">=3.0,<3.2.0 || >3.2.0" - -[[package]] -name = "flake8-debugger" -version = "4.1.2" -description = "ipdb/pdb statement checker plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -flake8 = ">=3.0" -pycodestyle = "*" - -[[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" - -[package.dependencies] -flake8 = ">=3" -pydocstyle = ">=2.1" - -[[package]] -name = "flake8-eradicate" -version = "1.4.0" -description = "Flake8 plugin to find commented out code" -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" - -[package.dependencies] -attrs = "*" -eradicate = ">=2.0,<3.0" -flake8 = ">=3.5,<6" - -[[package]] -name = "flake8-isort" -version = "4.2.0" -description = "flake8 plugin that integrates isort ." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = ">=3.2.1,<6" -isort = ">=4.3.5,<6" - -[package.extras] -test = ["pytest-cov"] - -[[package]] -name = "flake8-polyfill" -version = "1.0.2" -description = "Polyfill package for Flake8 plugins" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = "*" - -[[package]] -name = "flake8-quotes" -version = "3.3.2" -description = "Flake8 lint for quotes." -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = "*" - -[[package]] -name = "flake8-rst-docstrings" -version = "0.2.7" -description = "Python docstring reStructuredText (RST) validator" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -flake8 = ">=3.0.0" -pygments = "*" -restructuredtext-lint = "*" - -[[package]] -name = "flake8-string-format" -version = "0.3.0" -description = "string format checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = "*" - -[[package]] -name = "flakeheaven" -version = "3.3.0" -description = "FlakeHeaven is a [Flake8](https://gitlab.com/pycqa/flake8) wrapper to make it cool." -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" - -[package.dependencies] -colorama = "*" -entrypoints = "*" -flake8 = ">=4.0.1,<5.0.0" -pygments = "*" -toml = "*" -urllib3 = "*" - -[package.extras] -docs = ["alabaster", "myst-parser (>=0.18.0,<0.19.0)", "pygments-github-lexers", "sphinx"] - [[package]] name = "ghp-import" version = "2.1.0" @@ -682,14 +423,6 @@ category = "dev" optional = false python-versions = ">=3.7" -[[package]] -name = "mccabe" -version = "0.6.1" -description = "McCabe checker, plugin for flake8" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "mdurl" version = "0.1.2" @@ -934,25 +667,6 @@ category = "dev" optional = false python-versions = ">=3.7" -[[package]] -name = "pbr" -version = "5.11.1" -description = "Python Build Reasonableness" -category = "dev" -optional = false -python-versions = ">=2.6" - -[[package]] -name = "pep8-naming" -version = "0.13.2" -description = "Check PEP-8 naming conventions, plugin for flake8" -category = "dev" -optional = false -python-versions = ">=3.7" - -[package.dependencies] -flake8 = ">=3.9.1" - [[package]] name = "pkginfo" version = "1.9.6" @@ -1026,14 +740,6 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" -[[package]] -name = "pycodestyle" -version = "2.8.0" -description = "Python style guide checker" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - [[package]] name = "pycparser" version = "2.21" @@ -1042,28 +748,6 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -[[package]] -name = "pydocstyle" -version = "6.3.0" -description = "Python docstring style checker" -category = "dev" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -snowballstemmer = ">=2.2.0" - -[package.extras] -toml = ["tomli (>=1.2.3)"] - -[[package]] -name = "pyflakes" -version = "2.4.0" -description = "passive checker of Python programs" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - [[package]] name = "pygments" version = "2.15.1" @@ -1285,17 +969,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] requests = ">=2.0.1,<3.0.0" -[[package]] -name = "restructuredtext-lint" -version = "1.4.0" -description = "reStructuredText linter" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -docutils = ">=0.11,<1.0" - [[package]] name = "rfc3986" version = "2.0.0" @@ -1322,6 +995,14 @@ pygments = ">=2.13.0,<3.0.0" [package.extras] jupyter = ["ipywidgets (>=7.5.1,<9)"] +[[package]] +name = "ruff" +version = "0.0.269" +description = "An extremely fast Python linter, written in Rust." +category = "dev" +optional = false +python-versions = ">=3.7" + [[package]] name = "secretstorage" version = "3.3.3" @@ -1371,25 +1052,6 @@ category = "dev" optional = false python-versions = ">=3.6" -[[package]] -name = "snowballstemmer" -version = "2.2.0" -description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "stevedore" -version = "5.1.0" -description = "Manage dynamic plugins for Python applications" -category = "dev" -optional = false -python-versions = ">=3.8" - -[package.dependencies] -pbr = ">=2.0.0,<2.1.0 || >2.1.0" - [[package]] name = "termcolor" version = "2.3.0" @@ -1401,14 +1063,6 @@ python-versions = ">=3.7" [package.extras] tests = ["pytest", "pytest-cov"] -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - [[package]] name = "tomli" version = "2.0.1" @@ -1464,7 +1118,7 @@ urllib3 = ">=1.26.0" [[package]] name = "typing-extensions" -version = "4.5.0" +version = "4.6.1" description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false @@ -1531,35 +1185,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "wemake-python-styleguide" -version = "0.17.0" -description = "The strictest and most opinionated python linter ever" -category = "dev" -optional = false -python-versions = ">=3.7,<4.0" - -[package.dependencies] -astor = ">=0.8,<0.9" -attrs = "*" -darglint = ">=1.2,<2.0" -flake8 = ">=3.7,<5" -flake8-bandit = ">=2.1,<4" -flake8-broken-line = ">=0.5,<0.6" -flake8-bugbear = ">=22.9,<23.0" -flake8-commas = ">=2.0,<3.0" -flake8-comprehensions = ">=3.1,<4.0" -flake8-debugger = ">=4.0,<5.0" -flake8-docstrings = ">=1.3,<2.0" -flake8-eradicate = ">=1.0,<2.0" -flake8-isort = ">=4.0,<5.0" -flake8-quotes = ">=3.0,<4.0" -flake8-rst-docstrings = ">=0.2,<0.3" -flake8-string-format = ">=0.3,<0.4" -pep8-naming = ">=0.13,<0.14" -pygments = ">=2.4,<3.0" -typing_extensions = ">=4.0,<5.0" - [[package]] name = "wheel" version = "0.40.0" @@ -1586,21 +1211,9 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "8677391228fba0446e5310fb7614ac85770d12f3edaea08632102c5da70b55fa" +content-hash = "bb340404eab8a4529e322aa323680fbe51840658f1921fa4d357e655e2bfcf05" [metadata.files] -astor = [ - {file = "astor-0.8.1-py2.py3-none-any.whl", hash = "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5"}, - {file = "astor-0.8.1.tar.gz", hash = "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e"}, -] -attrs = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, -] -bandit = [ - {file = "bandit-1.7.5-py3-none-any.whl", hash = "sha256:75665181dc1e0096369112541a056c59d1c5f66f9bb74a8d686c3c362b83f549"}, - {file = "bandit-1.7.5.tar.gz", hash = "sha256:bdfc739baa03b880c2d15d0431b31c658ffc348e907fe197e54e0389dd59e11e"}, -] black = [ {file = "black-23.3.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915"}, {file = "black-23.3.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:67de8d0c209eb5b330cce2469503de11bca4085880d62f1628bd9972cc3366b9"}, @@ -1796,57 +1409,57 @@ colorama = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] coverage = [ - {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.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:496b86f1fc9c81a1cd53d8842ef712e950a4611bba0c42d33366a7b91ba969ec"}, + {file = "coverage-7.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fbe6e8c0a9a7193ba10ee52977d4d5e7652957c1f56ccefed0701db8801a2a3b"}, + {file = "coverage-7.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d06b721c2550c01a60e5d3093f417168658fb454e5dfd9a23570e9bffe39a1"}, + {file = "coverage-7.2.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:77a04b84d01f0e12c66f16e69e92616442dc675bbe51b90bfb074b1e5d1c7fbd"}, + {file = "coverage-7.2.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35db06450272473eab4449e9c2ad9bc6a0a68dab8e81a0eae6b50d9c2838767e"}, + {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6727a0d929ff0028b1ed8b3e7f8701670b1d7032f219110b55476bb60c390bfb"}, + {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aac1d5fdc5378f6bac2c0c7ebe7635a6809f5b4376f6cf5d43243c1917a67087"}, + {file = "coverage-7.2.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1c9e4a5eb1bbc3675ee57bc31f8eea4cd7fb0cbcbe4912cf1cb2bf3b754f4a80"}, + {file = "coverage-7.2.6-cp310-cp310-win32.whl", hash = "sha256:71f739f97f5f80627f1fee2331e63261355fd1e9a9cce0016394b6707ac3f4ec"}, + {file = "coverage-7.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:fde5c7a9d9864d3e07992f66767a9817f24324f354caa3d8129735a3dc74f126"}, + {file = "coverage-7.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bc7b667f8654376e9353dd93e55e12ce2a59fb6d8e29fce40de682273425e044"}, + {file = "coverage-7.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:697f4742aa3f26c107ddcb2b1784a74fe40180014edbd9adaa574eac0529914c"}, + {file = "coverage-7.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:541280dde49ce74a4262c5e395b48ea1207e78454788887118c421cb4ffbfcac"}, + {file = "coverage-7.2.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7f1a8328eeec34c54f1d5968a708b50fc38d31e62ca8b0560e84a968fbf9a9"}, + {file = "coverage-7.2.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4bbd58eb5a2371bf160590f4262109f66b6043b0b991930693134cb617bc0169"}, + {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ae82c5f168d2a39a5d69a12a69d4dc23837a43cf2ca99be60dfe59996ea6b113"}, + {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f5440cdaf3099e7ab17a5a7065aed59aff8c8b079597b61c1f8be6f32fe60636"}, + {file = "coverage-7.2.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a6f03f87fea579d55e0b690d28f5042ec1368650466520fbc400e7aeaf09e995"}, + {file = "coverage-7.2.6-cp311-cp311-win32.whl", hash = "sha256:dc4d5187ef4d53e0d4c8eaf530233685667844c5fb0b855fea71ae659017854b"}, + {file = "coverage-7.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:c93d52c3dc7b9c65e39473704988602300e3cc1bad08b5ab5b03ca98bbbc68c1"}, + {file = "coverage-7.2.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:42c692b55a647a832025a4c048007034fe77b162b566ad537ce65ad824b12a84"}, + {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7786b2fa7809bf835f830779ad285215a04da76293164bb6745796873f0942d"}, + {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25bad4196104761bc26b1dae9b57383826542ec689ff0042f7f4f4dd7a815cba"}, + {file = "coverage-7.2.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2692306d3d4cb32d2cceed1e47cebd6b1d2565c993d6d2eda8e6e6adf53301e6"}, + {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:392154d09bd4473b9d11351ab5d63391f3d5d24d752f27b3be7498b0ee2b5226"}, + {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:fa079995432037b5e2ef5ddbb270bcd2ded9f52b8e191a5de11fe59a00ea30d8"}, + {file = "coverage-7.2.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d712cefff15c712329113b01088ba71bbcef0f7ea58478ca0bbec63a824844cb"}, + {file = "coverage-7.2.6-cp37-cp37m-win32.whl", hash = "sha256:004948e296149644d208964300cb3d98affc5211e9e490e9979af4030b0d6473"}, + {file = "coverage-7.2.6-cp37-cp37m-win_amd64.whl", hash = "sha256:c1d7a31603c3483ac49c1726723b0934f88f2c011c660e6471e7bd735c2fa110"}, + {file = "coverage-7.2.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3436927d1794fa6763b89b60c896f9e3bd53212001026ebc9080d23f0c2733c1"}, + {file = "coverage-7.2.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44c9b9f1a245f3d0d202b1a8fa666a80b5ecbe4ad5d0859c0fb16a52d9763224"}, + {file = "coverage-7.2.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e3783a286d5a93a2921396d50ce45a909aa8f13eee964465012f110f0cbb611"}, + {file = "coverage-7.2.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3cff6980fe7100242170092bb40d2b1cdad79502cd532fd26b12a2b8a5f9aee0"}, + {file = "coverage-7.2.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c534431153caffc7c495c3eddf7e6a6033e7f81d78385b4e41611b51e8870446"}, + {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:3062fd5c62df988cea9f2972c593f77fed1182bfddc5a3b12b1e606cb7aba99e"}, + {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6284a2005e4f8061c58c814b1600ad0074ccb0289fe61ea709655c5969877b70"}, + {file = "coverage-7.2.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:97729e6828643f168a2a3f07848e1b1b94a366b13a9f5aba5484c2215724edc8"}, + {file = "coverage-7.2.6-cp38-cp38-win32.whl", hash = "sha256:dc11b42fa61ff1e788dd095726a0aed6aad9c03d5c5984b54cb9e1e67b276aa5"}, + {file = "coverage-7.2.6-cp38-cp38-win_amd64.whl", hash = "sha256:cbcc874f454ee51f158afd604a315f30c0e31dff1d5d5bf499fc529229d964dd"}, + {file = "coverage-7.2.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d3cacc6a665221108ecdf90517a8028d07a2783df3417d12dcfef1c517e67478"}, + {file = "coverage-7.2.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:272ab31228a9df857ab5df5d67936d8861464dc89c5d3fab35132626e9369379"}, + {file = "coverage-7.2.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a8723ccec4e564d4b9a79923246f7b9a8de4ec55fa03ec4ec804459dade3c4f"}, + {file = "coverage-7.2.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5906f6a84b47f995cd1bf0aca1c72d591c55ee955f98074e93660d64dfc66eb9"}, + {file = "coverage-7.2.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:52c139b7ab3f0b15f9aad0a3fedef5a1f8c0b2bdc291d88639ca2c97d3682416"}, + {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a5ffd45c6b93c23a8507e2f436983015c6457aa832496b6a095505ca2f63e8f1"}, + {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:4f3c7c19581d471af0e9cb49d928172cd8492cd78a2b7a4e82345d33662929bb"}, + {file = "coverage-7.2.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e8c0e79820cdd67978e1120983786422d279e07a381dbf89d03bbb23ec670a6"}, + {file = "coverage-7.2.6-cp39-cp39-win32.whl", hash = "sha256:13cde6bb0e58fb67d09e2f373de3899d1d1e866c5a9ff05d93615f2f54fbd2bb"}, + {file = "coverage-7.2.6-cp39-cp39-win_amd64.whl", hash = "sha256:6b9f64526286255735847aed0221b189486e0b9ed943446936e41b7e44b08783"}, + {file = "coverage-7.2.6-pp37.pp38.pp39-none-any.whl", hash = "sha256:6babcbf1e66e46052442f10833cfc4a0d3554d8276aa37af8531a83ed3c1a01d"}, + {file = "coverage-7.2.6.tar.gz", hash = "sha256:2025f913f2edb0272ef15d00b1f335ff8908c921c8eb2013536fcaf61f5a683d"}, ] cryptography = [ {file = "cryptography-40.0.2-cp36-abi3-macosx_10_12_universal2.whl", hash = "sha256:8f79b5ff5ad9d3218afb1e7e20ea74da5f76943ee5edb7f76e56ec5161ec782b"}, @@ -1872,10 +1485,6 @@ cryptography = [ csscompressor = [ {file = "csscompressor-0.9.5.tar.gz", hash = "sha256:afa22badbcf3120a4f392e4d22f9fff485c044a1feda4a950ecc5eba9dd31a05"}, ] -darglint = [ - {file = "darglint-1.8.1-py3-none-any.whl", hash = "sha256:5ae11c259c17b0701618a20c3da343a3eb98b3bc4b5a83d31cdd94f5ebdced8d"}, - {file = "darglint-1.8.1.tar.gz", hash = "sha256:080d5106df149b199822e7ee7deb9c012b49891538f14a11be681044f0bb20da"}, -] distlib = [ {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, @@ -1888,14 +1497,6 @@ dotty-dict = [ {file = "dotty_dict-1.3.1-py3-none-any.whl", hash = "sha256:5022d234d9922f13aa711b4950372a06a6d64cb6d6db9ba43d0ba133ebfce31f"}, {file = "dotty_dict-1.3.1.tar.gz", hash = "sha256:4b016e03b8ae265539757a53eba24b9bfda506fb94fbce0bee843c6f05541a15"}, ] -entrypoints = [ - {file = "entrypoints-0.4-py3-none-any.whl", hash = "sha256:f174b5ff827504fd3cd97cc3f8649f3693f51538c7e4bdf3ef002c8429d42f9f"}, - {file = "entrypoints-0.4.tar.gz", hash = "sha256:b706eddaa9218a19ebcd67b56818f05bb27589b1ca9e8d797b74affad4ccacd4"}, -] -eradicate = [ - {file = "eradicate-2.2.0-py3-none-any.whl", hash = "sha256:751813c315a48ce7e3d0483410991015342d380a956e86e0265c61bfb875bcbc"}, - {file = "eradicate-2.2.0.tar.gz", hash = "sha256:c329a05def6a4b558dab58bb1b694f5209706b7c99ba174d226dfdb69a5ba0da"}, -] exceptiongroup = [ {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, @@ -1904,65 +1505,6 @@ filelock = [ {file = "filelock-3.12.0-py3-none-any.whl", hash = "sha256:ad98852315c2ab702aeb628412cbf7e95b7ce8c3bf9565670b4eaecf1db370a9"}, {file = "filelock-3.12.0.tar.gz", hash = "sha256:fc03ae43288c013d2ea83c8597001b1129db351aad9c57fe2409327916b8e718"}, ] -flake8 = [ - {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, - {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, -] -flake8-bandit = [ - {file = "flake8_bandit-3.0.0-py2.py3-none-any.whl", hash = "sha256:61b617f4f7cdaa0e2b1e6bf7b68afb2b619a227bb3e3ae00dd36c213bd17900a"}, - {file = "flake8_bandit-3.0.0.tar.gz", hash = "sha256:54d19427e6a8d50322a7b02e1841c0a7c22d856975f3459803320e0e18e2d6a1"}, -] -flake8-broken-line = [ - {file = "flake8-broken-line-0.5.0.tar.gz", hash = "sha256:7c98de9dd1385b71e888709c7f2aee3f0514107ecb5875bc95d0c03392191c97"}, - {file = "flake8_broken_line-0.5.0-py3-none-any.whl", hash = "sha256:daafb19b67eead0410ce7ba155d51a15b9d020ebe7630d87de9c2b93cedb6703"}, -] -flake8-bugbear = [ - {file = "flake8-bugbear-22.12.6.tar.gz", hash = "sha256:4cdb2c06e229971104443ae293e75e64c6107798229202fbe4f4091427a30ac0"}, - {file = "flake8_bugbear-22.12.6-py3-none-any.whl", hash = "sha256:b69a510634f8a9c298dfda2b18a8036455e6b19ecac4fe582e4d7a0abfa50a30"}, -] -flake8-commas = [ - {file = "flake8-commas-2.1.0.tar.gz", hash = "sha256:940441ab8ee544df564ae3b3f49f20462d75d5c7cac2463e0b27436e2050f263"}, - {file = "flake8_commas-2.1.0-py2.py3-none-any.whl", hash = "sha256:ebb96c31e01d0ef1d0685a21f3f0e2f8153a0381430e748bf0bbbb5d5b453d54"}, -] -flake8-comprehensions = [ - {file = "flake8_comprehensions-3.12.0-py3-none-any.whl", hash = "sha256:013234637ec7dfcb7cd2900578fb53c512f81db909cefe371c019232695c362d"}, - {file = "flake8_comprehensions-3.12.0.tar.gz", hash = "sha256:419ef1a6e8de929203791a5e8ff5e3906caeba13eb3290eebdbf88a9078d502e"}, -] -flake8-debugger = [ - {file = "flake8-debugger-4.1.2.tar.gz", hash = "sha256:52b002560941e36d9bf806fca2523dc7fb8560a295d5f1a6e15ac2ded7a73840"}, - {file = "flake8_debugger-4.1.2-py3-none-any.whl", hash = "sha256:0a5e55aeddcc81da631ad9c8c366e7318998f83ff00985a49e6b3ecf61e571bf"}, -] -flake8-docstrings = [ - {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"}, -] -flake8-eradicate = [ - {file = "flake8-eradicate-1.4.0.tar.gz", hash = "sha256:3088cfd6717d1c9c6c3ac45ef2e5f5b6c7267f7504d5a74b781500e95cb9c7e1"}, - {file = "flake8_eradicate-1.4.0-py3-none-any.whl", hash = "sha256:e3bbd0871be358e908053c1ab728903c114f062ba596b4d40c852fd18f473d56"}, -] -flake8-isort = [ - {file = "flake8-isort-4.2.0.tar.gz", hash = "sha256:26571500cd54976bbc0cf1006ffbcd1a68dd102f816b7a1051b219616ba9fee0"}, - {file = "flake8_isort-4.2.0-py3-none-any.whl", hash = "sha256:5b87630fb3719bf4c1833fd11e0d9534f43efdeba524863e15d8f14a7ef6adbf"}, -] -flake8-polyfill = [ - {file = "flake8-polyfill-1.0.2.tar.gz", hash = "sha256:e44b087597f6da52ec6393a709e7108b2905317d0c0b744cdca6208e670d8eda"}, - {file = "flake8_polyfill-1.0.2-py2.py3-none-any.whl", hash = "sha256:12be6a34ee3ab795b19ca73505e7b55826d5f6ad7230d31b18e106400169b9e9"}, -] -flake8-quotes = [ - {file = "flake8-quotes-3.3.2.tar.gz", hash = "sha256:6e26892b632dacba517bf27219c459a8396dcfac0f5e8204904c5a4ba9b480e1"}, -] -flake8-rst-docstrings = [ - {file = "flake8-rst-docstrings-0.2.7.tar.gz", hash = "sha256:2740067ab9237559dd45a3434d8c987792c7b259ca563621a3b95efe201f5382"}, - {file = "flake8_rst_docstrings-0.2.7-py3-none-any.whl", hash = "sha256:5d56075dce360bcc9c6775bfe7cb431aa395de600ca7e8d40580a28d50b2a803"}, -] -flake8-string-format = [ - {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"}, -] -flakeheaven = [ - {file = "flakeheaven-3.3.0-py3-none-any.whl", hash = "sha256:ae246197a178845b30b63fc03023f7ba925cc84cc96314ec19807dafcd6b39a3"}, - {file = "flakeheaven-3.3.0.tar.gz", hash = "sha256:eb07860e028ff8dd56cce742c4766624a37a4ce397fd34300254ab623d13047b"}, -] ghp-import = [ {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, @@ -2085,10 +1627,6 @@ markupsafe = [ {file = "MarkupSafe-2.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed"}, {file = "MarkupSafe-2.1.2.tar.gz", hash = "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"}, ] -mccabe = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, -] mdurl = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -2188,14 +1726,6 @@ pathspec = [ {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, ] -pbr = [ - {file = "pbr-5.11.1-py2.py3-none-any.whl", hash = "sha256:567f09558bae2b3ab53cb3c1e2e33e726ff3338e7bae3db5dc954b3a44eef12b"}, - {file = "pbr-5.11.1.tar.gz", hash = "sha256:aefc51675b0b533d56bb5fd1c8c6c0522fe31896679882e1c4c63d5e4a0fccb3"}, -] -pep8-naming = [ - {file = "pep8-naming-0.13.2.tar.gz", hash = "sha256:93eef62f525fd12a6f8c98f4dcc17fa70baae2f37fa1f73bec00e3e44392fa48"}, - {file = "pep8_naming-0.13.2-py3-none-any.whl", hash = "sha256:59e29e55c478db69cffbe14ab24b5bd2cd615c0413edf790d47d3fb7ba9a4e23"}, -] pkginfo = [ {file = "pkginfo-1.9.6-py3-none-any.whl", hash = "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546"}, {file = "pkginfo-1.9.6.tar.gz", hash = "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046"}, @@ -2220,22 +1750,10 @@ pre-commit = [ {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"}, ] -pycodestyle = [ - {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, - {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, -] pycparser = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] -pydocstyle = [ - {file = "pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019"}, - {file = "pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1"}, -] -pyflakes = [ - {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, - {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, -] pygments = [ {file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"}, {file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"}, @@ -2423,9 +1941,6 @@ requests-toolbelt = [ {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, ] -restructuredtext-lint = [ - {file = "restructuredtext_lint-1.4.0.tar.gz", hash = "sha256:1b235c0c922341ab6c530390892eb9e92f90b9b75046063e047cacfb0f050c45"}, -] rfc3986 = [ {file = "rfc3986-2.0.0-py2.py3-none-any.whl", hash = "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd"}, {file = "rfc3986-2.0.0.tar.gz", hash = "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c"}, @@ -2434,6 +1949,25 @@ rich = [ {file = "rich-13.3.5-py3-none-any.whl", hash = "sha256:69cdf53799e63f38b95b9bf9c875f8c90e78dd62b2f00c13a911c7a3b9fa4704"}, {file = "rich-13.3.5.tar.gz", hash = "sha256:2d11b9b8dd03868f09b4fffadc84a6a8cda574e40dc90821bd845720ebb8e89c"}, ] +ruff = [ + {file = "ruff-0.0.269-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:3569bcdee679045c09c0161fabc057599759c49219a08d9a4aad2cc3982ccba3"}, + {file = "ruff-0.0.269-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:56347da63757a56cbce7d4b3d6044ca4f1941cd1bbff3714f7554360c3361f83"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6da8ee25ef2f0cc6cc8e6e20942c1d44d25a36dce35070d7184655bc14f63f63"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd81b8e681b9eaa6cf15484f3985bd8bd97c3d114e95bff3e8ea283bf8865062"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f19f59ca3c28742955241fb452f3346241ddbd34e72ac5cb3d84fadebcf6bc8"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:f062059b8289a4fab7f6064601b811d447c2f9d3d432a17f689efe4d68988450"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f5dc7aac52c58e82510217e3c7efd80765c134c097c2815d59e40face0d1fe6"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e131b4dbe798c391090c6407641d6ab12c0fa1bb952379dde45e5000e208dabb"}, + {file = "ruff-0.0.269-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a374434e588e06550df0f8dcb74777290f285678de991fda4e1063c367ab2eb2"}, + {file = "ruff-0.0.269-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:cec2f4b84a14b87f1b121488649eb5b4eaa06467a2387373f750da74bdcb5679"}, + {file = "ruff-0.0.269-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:374b161753a247904aec7a32d45e165302b76b6e83d22d099bf3ff7c232c888f"}, + {file = "ruff-0.0.269-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9ca0a1ddb1d835b5f742db9711c6cf59f213a1ad0088cb1e924a005fd399e7d8"}, + {file = "ruff-0.0.269-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5a20658f0b97d207c7841c13d528f36d666bf445b00b01139f28a8ccb80093bb"}, + {file = "ruff-0.0.269-py3-none-win32.whl", hash = "sha256:03ff42bc91ceca58e0f0f072cb3f9286a9208f609812753474e799a997cdad1a"}, + {file = "ruff-0.0.269-py3-none-win_amd64.whl", hash = "sha256:f3b59ccff57b21ef0967ea8021fd187ec14c528ec65507d8bcbe035912050776"}, + {file = "ruff-0.0.269-py3-none-win_arm64.whl", hash = "sha256:bbeb857b1e508a4487bdb02ca1e6d41dd8d5ac5335a5246e25de8a3dff38c1ff"}, + {file = "ruff-0.0.269.tar.gz", hash = "sha256:11ddcfbab32cf5c420ea9dd5531170ace5a3e59c16d9251c7bd2581f7b16f602"}, +] secretstorage = [ {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, @@ -2454,22 +1988,10 @@ smmap = [ {file = "smmap-5.0.0-py3-none-any.whl", hash = "sha256:2aba19d6a040e78d8b09de5c57e96207b09ed71d8e55ce0959eeee6c8e190d94"}, {file = "smmap-5.0.0.tar.gz", hash = "sha256:c840e62059cd3be204b0c9c9f74be2c09d5648eddd4580d9314c3ecde0b30936"}, ] -snowballstemmer = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] -stevedore = [ - {file = "stevedore-5.1.0-py3-none-any.whl", hash = "sha256:8cc040628f3cea5d7128f2e76cf486b2251a4e543c7b938f58d9a377f6694a2d"}, - {file = "stevedore-5.1.0.tar.gz", hash = "sha256:a54534acf9b89bc7ed264807013b505bf07f74dbe4bcfa37d32bd063870b087c"}, -] termcolor = [ {file = "termcolor-2.3.0-py3-none-any.whl", hash = "sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475"}, {file = "termcolor-2.3.0.tar.gz", hash = "sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a"}, ] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -2487,8 +2009,8 @@ twine = [ {file = "twine-3.8.0.tar.gz", hash = "sha256:8efa52658e0ae770686a13b675569328f1fba9837e5de1867bfe5f46a9aefe19"}, ] typing-extensions = [ - {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.1-py3-none-any.whl", hash = "sha256:6bac751f4789b135c43228e72de18637e9a6c29d12777023a703fd1a6858469f"}, + {file = "typing_extensions-4.6.1.tar.gz", hash = "sha256:558bc0c4145f01e6405f4a5fdbd82050bd221b119f4bf72a961a1cfd471349d6"}, ] urllib3 = [ {file = "urllib3-2.0.2-py3-none-any.whl", hash = "sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"}, @@ -2535,10 +2057,6 @@ webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, ] -wemake-python-styleguide = [ - {file = "wemake-python-styleguide-0.17.0.tar.gz", hash = "sha256:c8869fac392019c2bb3eae4287399245d10d2726b23f1b3c68d1564909c3a71a"}, - {file = "wemake_python_styleguide-0.17.0-py3-none-any.whl", hash = "sha256:d10b953bbe4fba83a34f4c224a0e1849ede89e486eacfc760690e6c87a28eaae"}, -] wheel = [ {file = "wheel-0.40.0-py3-none-any.whl", hash = "sha256:d236b20e7cb522daf2390fa84c55eea81c5c30190f90f29ae2ca1ad8355bf247"}, {file = "wheel-0.40.0.tar.gz", hash = "sha256:cd1196f3faee2b31968d626e1731c94f99cbdb67cf5a46e4f5656cbee7738873"}, diff --git a/pyproject.toml b/pyproject.toml index 0d72d6c..b6a8445 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,10 +26,8 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.9" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] python-semantic-release = "*" -wemake-python-styleguide = "*" -flakeheaven = "*" isort = "*" mypy = "*" black = "*" @@ -47,6 +45,7 @@ mkdocs-redirects = "*" mkdocstrings = { extras = ["python"], version = "*" } mdx-truly-sane-lists = "*" mike = "*" +ruff = "*" [tool.semantic_release] version_toml = "pyproject.toml:tool.poetry.version" @@ -63,7 +62,7 @@ format = { shell = "poetry run isort .; poetry run black .", help = "Format your hooks = { cmd = "poetry run pre-commit run --all-files", help = "Run all pre-commit hooks" } test = { cmd = "poetry run pytest --cov=querpyable", help = "Run the test suite and produce a coverage report" } type-check = { cmd = "poetry run mypy", help = "Run static type checking on your codebase" } -lint = { cmd = "poetry run flakeheaven lint", help = "Lint your code for errors" } +lint = { cmd = "poetry run ruff check src", help = "Lint your code for errors" } docs = { shell = "python -c 'import webbrowser; webbrowser.open(\"http://127.0.0.1:8000\")'; poetry run mkdocs serve", help = "Build and serve the documentation" } export = { cmd = "poetry export --without-hashes --dev -o requirements.txt" } @@ -114,38 +113,49 @@ show_error_codes = true show_error_context = true strict = true -[tool.flakeheaven] +[tool.ruff] +select = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"] +ignore = ["UP007"] + +fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"] +unfixable = [] + exclude = [ - ".git", - ".github", - ".mypy_cache", - ".pytest_cache", - ".vscode", - ".venv", - "build", - "dist", - "docs", - "tests", - "__pycache__", - "README.md" + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".mypy_cache", + ".nox", + ".pants.d", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "venv", ] -format = "colored" -show_source = false -statistics = false -docstring-convention = "google" +per-file-ignores = {} -accept_encodings = "utf-8" -max_line_length = 99 +line-length = 99 -extended_default_ignore = [] +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" -[tool.flakeheaven.plugins] -"flake8-*" = ["+*"] -mccabe = ["+*"] -"pep8-naming" = ["+*"] -pycodestyle = ["+*"] -pyflakes = ["+*"] -"wemake-python-styleguide" = ["+*"] +target-version = "py310" -[tool.pydocstyle] +[tool.ruff.mccabe] +max-complexity = 10 + +[tool.ruff.pydocstyle] convention = "google" + +[tool.ruff.flake8-quotes] +docstring-quotes = "double" diff --git a/src/querpyable/querpyable.py b/src/querpyable/querpyable.py index 0246c30..c0521b7 100644 --- a/src/querpyable/querpyable.py +++ b/src/querpyable/querpyable.py @@ -1,13 +1,14 @@ """A Python implementation of LINQ.""" from abc import ABC, abstractmethod +from collections.abc import Callable, Generator, Iterable from itertools import chain -from typing import Callable, Dict, Generator, Iterable, List, Optional, Tuple, Type, TypeVar +from typing import Optional, TypeVar -T = TypeVar('T') -U = TypeVar('U') -K = TypeVar('K') -V = TypeVar('V') +T = TypeVar("T") +U = TypeVar("U") +K = TypeVar("K") +V = TypeVar("V") class Query(ABC): @@ -25,13 +26,13 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None] class Binary(ABC): @abstractmethod def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None] + self, source1: Generator[T, None, None], source2: Generator[U, None, None], ) -> Generator[T, None, None]: pass class Where(Query): - def __init__(self, predicate: Callable[[T], bool]): + def __init__(self, predicate: Callable[[T], bool]) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -39,7 +40,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Select(Unary): - def __init__(self, selector: Callable[[T], U]): + def __init__(self, selector: Callable[[T], U]) -> None: self.selector = selector def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None]: @@ -47,7 +48,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None] class Take(Query): - def __init__(self, count: int): + def __init__(self, count: int) -> None: self.count = count def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -55,7 +56,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Skip(Query): - def __init__(self, count: int): + def __init__(self, count: int) -> None: self.count = count def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -74,7 +75,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class SelectMany(Unary): - def __init__(self, selector: Callable[[T], Generator[U, None, None]]): + def __init__(self, selector: Callable[[T], Generator[U, None, None]]) -> None: self.selector = selector def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None]: @@ -83,7 +84,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None] class OrderBy(Query): - def __init__(self, key_selector: Callable[[T], U]): + def __init__(self, key_selector: Callable[[T], U]) -> None: self.key_selector = key_selector def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -91,7 +92,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class OrderByDescending(Query): - def __init__(self, key_selector: Callable[[T], U]): + def __init__(self, key_selector: Callable[[T], U]) -> None: self.key_selector = key_selector def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -99,7 +100,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class ThenBy(Query): - def __init__(self, key_selector: Callable[[T], U]): + def __init__(self, key_selector: Callable[[T], U]) -> None: self.key_selector = key_selector def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -107,7 +108,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class ThenByDescending(Query): - def __init__(self, key_selector: Callable[[T], U]): + def __init__(self, key_selector: Callable[[T], U]) -> None: self.key_selector = key_selector def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -117,18 +118,18 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Join(Binary): def __init__( self, - inner: List[U], + inner: list[U], outer_key_selector: Callable[[T], K], inner_key_selector: Callable[[U], K], result_selector: Callable[[T, U], V], - ): + ) -> None: self.inner = inner self.outer_key_selector = outer_key_selector self.inner_key_selector = inner_key_selector self.result_selector = result_selector def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None] + self, source1: Generator[T, None, None], source2: Generator[U, None, None], ) -> Generator[V, None, None]: lookup = {self.inner_key_selector(item): item for item in self.inner} for item in source1: @@ -140,18 +141,18 @@ def __call__( class GroupJoin(Binary): def __init__( self, - inner: List[U], + inner: list[U], outer_key_selector: Callable[[T], K], inner_key_selector: Callable[[U], K], - result_selector: Callable[[T, List[U]], V], - ): + result_selector: Callable[[T, list[U]], V], + ) -> None: self.inner = inner self.outer_key_selector = outer_key_selector self.inner_key_selector = inner_key_selector self.result_selector = result_selector def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None] + self, source1: Generator[T, None, None], source2: Generator[U, None, None], ) -> Generator[V, None, None]: lookup = {self.inner_key_selector(item): item for item in self.inner} for item in source1: @@ -162,13 +163,13 @@ def __call__( class Zip(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None] - ) -> Generator[Tuple[T, U], None, None]: + self, source1: Generator[T, None, None], source2: Generator[U, None, None], + ) -> Generator[tuple[T, U], None, None]: return zip(source1, source2) class All(Query): - def __init__(self, predicate: Callable[[T], bool]): + def __init__(self, predicate: Callable[[T], bool]) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -176,7 +177,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Any(Query): - def __init__(self, predicate: Optional[Callable[[T], bool]] = None): + def __init__(self, predicate: Optional[Callable[[T], bool]] = None) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -186,7 +187,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Contains(Query): - def __init__(self, value: T): + def __init__(self, value: T) -> None: self.value = value def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -194,7 +195,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Count(Query): - def __init__(self, predicate: Callable[[T], bool] = None): + def __init__(self, predicate: Callable[[T], bool] = None) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[int, None, None]: @@ -232,7 +233,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[float class Aggregate(Query): - def __init__(self, func: Callable[[T, T], T]): + def __init__(self, func: Callable[[T, T], T]) -> None: self.func = func def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -240,7 +241,8 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] try: result = next(iterator) except StopIteration: - raise ValueError("Sequence contains no elements.") + msg = "Sequence contains no elements." + raise ValueError(msg) for item in iterator: result = self.func(result, item) return result @@ -248,7 +250,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Concat(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None] + self, source1: Generator[T, None, None], source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from source1 yield from source2 @@ -256,27 +258,27 @@ def __call__( class Union(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None] + self, source1: Generator[T, None, None], source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from set(source1).union(source2) class Intersect(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None] + self, source1: Generator[T, None, None], source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from set(source1).intersection(source2) class Except(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None] + self, source1: Generator[T, None, None], source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from set(source1).difference(source2) class First(Query): - def __init__(self, predicate: Optional[Callable[[T], bool]] = None): + def __init__(self, predicate: Optional[Callable[[T], bool]] = None) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -284,17 +286,19 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N try: return next(iter(source)) except StopIteration: - raise ValueError("Sequence contains no elements.") + msg = "Sequence contains no elements." + raise ValueError(msg) for item in source: if self.predicate(item): return item - raise ValueError("Sequence contains no matching element.") + msg = "Sequence contains no matching element." + raise ValueError(msg) class FirstOrDefault(Query): def __init__( - self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None - ): + self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None, + ) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -310,7 +314,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N class Last(Query): - def __init__(self, predicate: Optional[Callable[[T], bool]] = None): + def __init__(self, predicate: Optional[Callable[[T], bool]] = None) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -321,19 +325,21 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N result = item return result except StopIteration: - raise ValueError("Sequence contains no elements.") + msg = "Sequence contains no elements." + raise ValueError(msg) for item in source: if self.predicate(item): result = item if result is None: - raise ValueError("Sequence contains no matching element.") + msg = "Sequence contains no matching element." + raise ValueError(msg) return result class LastOrDefault(Query): def __init__( - self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None - ): + self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None, + ) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -352,7 +358,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N class Single(Query): - def __init__(self, predicate: Optional[Callable[[T], bool]] = None): + def __init__(self, predicate: Optional[Callable[[T], bool]] = None) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -363,11 +369,13 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N result = next(items) try: next(items) - raise ValueError("Sequence contains more than one element.") + msg = "Sequence contains more than one element." + raise ValueError(msg) except StopIteration: return result except StopIteration: - raise ValueError("Sequence contains no elements.") + msg = "Sequence contains no elements." + raise ValueError(msg) match_count = 0 result = None for item in source: @@ -375,16 +383,18 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N match_count += 1 result = item if match_count == 0: - raise ValueError("Sequence contains no matching element.") + msg = "Sequence contains no matching element." + raise ValueError(msg) if match_count > 1: - raise ValueError("Sequence contains more than one matching element.") + msg = "Sequence contains more than one matching element." + raise ValueError(msg) return result class SingleOrDefault(Query): def __init__( - self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None - ): + self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None, + ) -> None: self.predicate = predicate def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -395,7 +405,8 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N result = next(items) try: next(items) - raise ValueError("Sequence contains more than one element.") + msg = "Sequence contains more than one element." + raise ValueError(msg) except StopIteration: return result except StopIteration: @@ -407,23 +418,25 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N match_count += 1 result = item if match_count > 1: - raise ValueError("Sequence contains more than one matching element.") + msg = "Sequence contains more than one matching element." + raise ValueError(msg) return result class ElementAt(Query): - def __init__(self, index: int): + def __init__(self, index: int) -> None: self.index = index def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: try: return next(item for i, item in enumerate(source) if i == self.index) except StopIteration: - raise ValueError("Sequence contains no element at the specified index.") + msg = "Sequence contains no element at the specified index." + raise ValueError(msg) class ElementAtOrDefault(Query): - def __init__(self, index: int, default: Optional[T] = None): + def __init__(self, index: int, default: Optional[T] = None) -> None: self.index = index def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], None, None]: @@ -434,7 +447,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N class DefaultIfEmpty(Unary): - def __init__(self, default_value: Optional[T] = None): + def __init__(self, default_value: Optional[T] = None) -> None: self.default_value = default_value def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None]: @@ -450,19 +463,19 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class ToDictionary(Query): def __init__( - self, key_selector: Callable[[T], K], value_selector: Optional[Callable[[T], V]] = None - ): + self, key_selector: Callable[[T], K], value_selector: Optional[Callable[[T], V]] = None, + ) -> None: self.key_selector = key_selector self.value_selector = value_selector - def __call__(self, source: Generator[T, None, None]) -> Generator[Dict[K, V], None, None]: + def __call__(self, source: Generator[T, None, None]) -> Generator[dict[K, V], None, None]: if self.value_selector is None: return {self.key_selector(item): item for item in source} return {self.key_selector(item): self.value_selector(item) for item in source} class OfType(Query): - def __init__(self, type_filter: Type[U]): + def __init__(self, type_filter: type[U]) -> None: self.type_filter = type_filter def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None]: @@ -470,7 +483,7 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None] class Queryable(Iterable[T]): - def __init__(self, collection: Iterable[T]): + def __init__(self, collection: Iterable[T]) -> None: self.collection = collection def __call__(self) -> Generator[T, None, None]: @@ -480,59 +493,59 @@ def __iter__(self) -> Generator[T, None, None]: yield from self.collection @classmethod - def range(cls, start: int, stop: int, step: int = 1) -> 'Queryable': + def range(cls, start: int, stop: int, step: int = 1) -> "Queryable": return cls(range(start, stop, step)) @classmethod - def empty() -> 'Queryable': + def empty() -> "Queryable": return cls([]) - def query(self) -> 'Queryable': + def query(self) -> "Queryable": return Queryable(self) - def where(self, predicate: Callable[[T], bool]) -> 'Queryable': + def where(self, predicate: Callable[[T], bool]) -> "Queryable": return Queryable(Where(predicate)(self)) - def select(self, selector: Callable[[T], U]) -> 'Queryable': + def select(self, selector: Callable[[T], U]) -> "Queryable": return Queryable(Select(selector)(self)) - def distinct(self) -> 'Queryable': + def distinct(self) -> "Queryable": return Queryable(Distinct()(self)) - def skip(self, count: int) -> 'Queryable': + def skip(self, count: int) -> "Queryable": return Queryable(Skip(count)(self)) - def take(self, count: int) -> 'Queryable': + def take(self, count: int) -> "Queryable": return Queryable(Take(count)(self)) - def of_type(self, type_filter: Type[U]) -> 'Queryable': + def of_type(self, type_filter: type[U]) -> "Queryable": return Queryable(OfType(type_filter)(self)) - def select_many(self, selector: Callable[[T], Iterable[U]]) -> 'Queryable': + def select_many(self, selector: Callable[[T], Iterable[U]]) -> "Queryable": return Queryable(SelectMany(selector)(self)) - def order_by(self, key_selector: Callable[[T], U]) -> 'Queryable': + def order_by(self, key_selector: Callable[[T], U]) -> "Queryable": return Queryable(OrderBy(key_selector)(self)) - def order_by_descending(self, key_selector: Callable[[T], U]) -> 'Queryable': + def order_by_descending(self, key_selector: Callable[[T], U]) -> "Queryable": return Queryable(OrderByDescending(key_selector)(self)) - def then_by(self, key_selector: Callable[[T], U]) -> 'Queryable': + def then_by(self, key_selector: Callable[[T], U]) -> "Queryable": return Queryable(ThenBy(key_selector)(self)) - def then_by_descending(self, key_selector: Callable[[T], U]) -> 'Queryable': + def then_by_descending(self, key_selector: Callable[[T], U]) -> "Queryable": return Queryable(ThenByDescending(key_selector)(self)) - def concat(self, other: Iterable[T]) -> 'Queryable[T]': + def concat(self, other: Iterable[T]) -> "Queryable[T]": return Queryable(chain(self, other)) def aggregate(self, func: Callable[[T, T], T]) -> T: return Queryable(Aggregate(func)(self)) - def union(self, other: Iterable[T]) -> 'Queryable[T]': + def union(self, other: Iterable[T]) -> "Queryable[T]": return Queryable(Union()(self, other)) - def intersect(self, other: Iterable[T]) -> 'Queryable[T]': + def intersect(self, other: Iterable[T]) -> "Queryable[T]": return Queryable(Intersect()(self, other)) def all(self, predicate: Callable[[T], bool]) -> bool: @@ -544,14 +557,14 @@ def any(self, predicate: Callable[[T], bool] = None) -> bool: def count(self, predicate: Callable[[T], bool] = None) -> int: return Count(predicate)(self) - def except_for(self, other: Iterable[T]) -> 'Queryable[T]': + def except_for(self, other: Iterable[T]) -> "Queryable[T]": return Queryable(Except()(self, other)) def first(self, predicate: Callable[[T], bool] = None) -> T: return First(predicate)(self) def first_or_default( - self, predicate: Callable[[T], bool] = None, default: Optional[T] = None + self, predicate: Callable[[T], bool] = None, default: Optional[T] = None, ) -> T: return FirstOrDefault(predicate, default)(self) @@ -559,7 +572,7 @@ def last(self, predicate: Callable[[T], bool] = None) -> T: return Last(predicate)(self) def last_or_default( - self, predicate: Callable[[T], bool] = None, default: Optional[T] = None + self, predicate: Callable[[T], bool] = None, default: Optional[T] = None, ) -> T: return LastOrDefault(predicate, default)(self) @@ -567,7 +580,7 @@ def single(self, predicate: Callable[[T], bool] = None) -> T: return Single(predicate)(self) def single_or_default( - self, predicate: Callable[[T], bool] = None, default: Optional[T] = None + self, predicate: Callable[[T], bool] = None, default: Optional[T] = None, ) -> T: return SingleOrDefault(predicate, default)(self) @@ -577,20 +590,20 @@ def element_at(self, index: int) -> T: def element_at_or_default(self, index: int, default: Optional[T] = None) -> T: return ElementAtOrDefault(index, default)(self) - def default_if_empty(self, default: T) -> 'Queryable[T]': + def default_if_empty(self, default: T) -> "Queryable[T]": query = DefaultIfEmpty(default) return Queryable(query(self)) def join( self, - inner: List[U], + inner: list[U], outer_key_selector: Callable[[T], K], inner_key_selector: Callable[[U], K], result_selector: Callable[[T, U], V], - ) -> 'Queryable': + ) -> "Queryable": return Queryable( - Join(inner, outer_key_selector, inner_key_selector, result_selector)(self, inner) + Join(inner, outer_key_selector, inner_key_selector, result_selector)(self, inner), ) - def to_list(self) -> List[T]: + def to_list(self) -> list[T]: return list(self) From 7f88538c47102fb33319a7aff8c356d18477d2fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 12:58:00 +0000 Subject: [PATCH 2/2] refactor: `pre-commit.ci` auto fix --- src/querpyable/querpyable.py | 60 +++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/src/querpyable/querpyable.py b/src/querpyable/querpyable.py index c0521b7..3f867b7 100644 --- a/src/querpyable/querpyable.py +++ b/src/querpyable/querpyable.py @@ -26,7 +26,9 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[U, None, None] class Binary(ABC): @abstractmethod def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[U, None, None], ) -> Generator[T, None, None]: pass @@ -129,7 +131,9 @@ def __init__( self.result_selector = result_selector def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[U, None, None], ) -> Generator[V, None, None]: lookup = {self.inner_key_selector(item): item for item in self.inner} for item in source1: @@ -152,7 +156,9 @@ def __init__( self.result_selector = result_selector def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[U, None, None], ) -> Generator[V, None, None]: lookup = {self.inner_key_selector(item): item for item in self.inner} for item in source1: @@ -163,7 +169,9 @@ def __call__( class Zip(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[U, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[U, None, None], ) -> Generator[tuple[T, U], None, None]: return zip(source1, source2) @@ -250,7 +258,9 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class Concat(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from source1 yield from source2 @@ -258,21 +268,27 @@ def __call__( class Union(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from set(source1).union(source2) class Intersect(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from set(source1).intersection(source2) class Except(Binary): def __call__( - self, source1: Generator[T, None, None], source2: Generator[T, None, None], + self, + source1: Generator[T, None, None], + source2: Generator[T, None, None], ) -> Generator[T, None, None]: yield from set(source1).difference(source2) @@ -297,7 +313,9 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N class FirstOrDefault(Query): def __init__( - self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None, + self, + predicate: Optional[Callable[[T], bool]] = None, + default: Optional[T] = None, ) -> None: self.predicate = predicate @@ -338,7 +356,9 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N class LastOrDefault(Query): def __init__( - self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None, + self, + predicate: Optional[Callable[[T], bool]] = None, + default: Optional[T] = None, ) -> None: self.predicate = predicate @@ -393,7 +413,9 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[Optional[T], N class SingleOrDefault(Query): def __init__( - self, predicate: Optional[Callable[[T], bool]] = None, default: Optional[T] = None, + self, + predicate: Optional[Callable[[T], bool]] = None, + default: Optional[T] = None, ) -> None: self.predicate = predicate @@ -463,7 +485,9 @@ def __call__(self, source: Generator[T, None, None]) -> Generator[T, None, None] class ToDictionary(Query): def __init__( - self, key_selector: Callable[[T], K], value_selector: Optional[Callable[[T], V]] = None, + self, + key_selector: Callable[[T], K], + value_selector: Optional[Callable[[T], V]] = None, ) -> None: self.key_selector = key_selector self.value_selector = value_selector @@ -564,7 +588,9 @@ def first(self, predicate: Callable[[T], bool] = None) -> T: return First(predicate)(self) def first_or_default( - self, predicate: Callable[[T], bool] = None, default: Optional[T] = None, + self, + predicate: Callable[[T], bool] = None, + default: Optional[T] = None, ) -> T: return FirstOrDefault(predicate, default)(self) @@ -572,7 +598,9 @@ def last(self, predicate: Callable[[T], bool] = None) -> T: return Last(predicate)(self) def last_or_default( - self, predicate: Callable[[T], bool] = None, default: Optional[T] = None, + self, + predicate: Callable[[T], bool] = None, + default: Optional[T] = None, ) -> T: return LastOrDefault(predicate, default)(self) @@ -580,7 +608,9 @@ def single(self, predicate: Callable[[T], bool] = None) -> T: return Single(predicate)(self) def single_or_default( - self, predicate: Callable[[T], bool] = None, default: Optional[T] = None, + self, + predicate: Callable[[T], bool] = None, + default: Optional[T] = None, ) -> T: return SingleOrDefault(predicate, default)(self)