From 2e9ca5ba3886564be68770f8c511c5480fe5bf78 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+kotlinisland@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:16:08 +1000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=80=20add=20`dprint`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 3 +++ .vscode/extensions.json | 3 ++- dprint.json | 12 ++++++++++++ lefthook.yml | 4 ++++ pyproject.toml | 5 ++++- uv.lock | 24 +++++++++++++++++++++++- 6 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 dprint.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f68a1a9c..215b6b45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,9 @@ jobs: uv run --no-sync ruff check --output-format=github uv run --no-sync ruff format --check + - name: dprint + run: uv run --no-sync dprint check + - name: pytest run: uv run --no-sync pytest diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f5325d68..49c1a865 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -7,7 +7,8 @@ "ms-python.python", "redhat.vscode-yaml", "seatonjiang.gitmoji-vscode", - "tamasfe.even-better-toml" + "tamasfe.even-better-toml", + "dprint.dprint" ], "unwantedRecommendations": ["ms-pyright.pyright", "ms-python.vscode-pylance"] } diff --git a/dprint.json b/dprint.json new file mode 100644 index 00000000..b4c1b0e0 --- /dev/null +++ b/dprint.json @@ -0,0 +1,12 @@ +{ + "excludes": [ + "**/*-lock.json", + "**/node_modules" + ], + "plugins": [ + "https://plugins.dprint.dev/json-0.20.0.wasm", + "https://plugins.dprint.dev/markdown-0.18.0.wasm", + "https://plugins.dprint.dev/toml-0.7.0.wasm", + "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm" + ] +} diff --git a/lefthook.yml b/lefthook.yml index 8e18296f..7dbf737c 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -9,6 +9,10 @@ pre-commit: glob: "*.{py,pyi}" run: uv run --no-sync ruff format {staged_files} stage_fixed: true + dprint-format: + glob: "*.{md,json,yml,yaml,toml}" + run: uv run --no-sync dprint fmt {staged_files} + stage_fixed: true ignore-format: glob: "*.{py,pyi}" run: uv run --no-sync tool/format_ignores.py {staged_files} diff --git a/pyproject.toml b/pyproject.toml index e4b050b0..e5110665 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,10 @@ dependencies = [] [dependency-groups] numpy = ["numtype[numpy]"] -lint = ["ruff>=0.11.3"] +lint = [ + "dprint-py>=0.49.1.2", + "ruff>=0.11.3", +] pytest = [ {include-group = "numpy"}, "pytest>=8.3.5", diff --git a/uv.lock b/uv.lock index d00183d0..9fef8eb2 100644 --- a/uv.lock +++ b/uv.lock @@ -155,6 +155,20 @@ version = "0.9.5" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/f1/2a/8c3ac3d8bc94e6de8d7ae270bb5bc437b210bb9d6d9e46630c98f4abd20c/csscompressor-0.9.5.tar.gz", hash = "sha256:afa22badbcf3120a4f392e4d22f9fff485c044a1feda4a950ecc5eba9dd31a05", size = 237808 } +[[package]] +name = "dprint-py" +version = "0.49.1.2" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/30/dbbb1f86459942a23c485f849a3ad2bf3bc959bfa3a5effc55fd3eb7fb70/dprint_py-0.49.1.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:00d5facd5f1a0d0cb5b2703ccc52c2b4f03ea1fa9b5371b6aa4c68955938baa6", size = 7239112 }, + { url = "https://files.pythonhosted.org/packages/3a/11/b68693e796aaa817363c880e621268f614e0c987233cbda191e7feb3ada9/dprint_py-0.49.1.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f454aa75c9512de5472e02b1070d588d359dbf3178fe50a43c6dbbc1fcff43aa", size = 6790952 }, + { url = "https://files.pythonhosted.org/packages/ae/35/fc87c1f66e0f02ddc7805615343793f7e55a9f093ac9663ababefbde6499/dprint_py-0.49.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:275911632234b07163478a729502027e7c1aa4c69b642b04b28ef4e260e57011", size = 6896568 }, + { url = "https://files.pythonhosted.org/packages/5f/1d/20b2c4933051adc7ab0cbcb6cfb4eb20a6bc2a5de1c8c16bbb58b79ad004/dprint_py-0.49.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c17aef24ec6c4ab95bb8703c8ff3c8145fc911fc2503475bfe3394983ed36897", size = 7544423 }, + { url = "https://files.pythonhosted.org/packages/b6/88/8e1531bd4e8a5f2c9ae4bc16c4a984d6c7cd5fc75b8e976883b3ee125496/dprint_py-0.49.1.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e74fba9a128fc33abe5149b25b8412190a6d8dc0895f29b7ab87b8e94fa88a", size = 6820617 }, + { url = "https://files.pythonhosted.org/packages/bc/8f/c39689d22f0941e2239a499cfea5fb8f5e1cfbccab18a8a49d600c7c4814/dprint_py-0.49.1.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:45aaccd1f538fa518421514078b1c8b05c40e5ecae178dc0550a26f5502292b1", size = 7599293 }, + { url = "https://files.pythonhosted.org/packages/4b/e4/143ce61b9bf7df417eb8843fbcadef0d78983399ad174794694c520f51ed/dprint_py-0.49.1.2-py3-none-win_amd64.whl", hash = "sha256:a3bb5e93fcdadc03303757af18e07e58b789ec90e03ef82e8843c426d07b6075", size = 7394750 }, +] + [[package]] name = "exceptiongroup" version = "1.2.2" @@ -643,6 +657,7 @@ basedpyright = [ ] dev = [ { name = "basedpyright" }, + { name = "dprint-py" }, { name = "markdown-callouts" }, { name = "mkdocs-awesome-nav" }, { name = "mkdocs-include-markdown-plugin" }, @@ -668,9 +683,11 @@ docs = [ { name = "pygments" }, ] lint = [ + { name = "dprint-py" }, { name = "ruff" }, ] list-and-test = [ + { name = "dprint-py" }, { name = "numtype", extra = ["numpy"] }, { name = "pytest" }, { name = "ruff" }, @@ -724,6 +741,7 @@ basedpyright = [ ] dev = [ { name = "basedpyright", specifier = ">=1.28.4" }, + { name = "dprint-py", specifier = ">=0.49.1.2" }, { name = "markdown-callouts", specifier = ">=0.4.0" }, { name = "mkdocs-awesome-nav", specifier = ">=3.1.0" }, { name = "mkdocs-include-markdown-plugin", specifier = ">=7.1.5" }, @@ -748,8 +766,12 @@ docs = [ { name = "mkdocstrings", extras = ["python"], specifier = ">=0.29.1" }, { name = "pygments", specifier = ">=2.19.1" }, ] -lint = [{ name = "ruff", specifier = ">=0.11.3" }] +lint = [ + { name = "dprint-py", specifier = ">=0.49.1.2" }, + { name = "ruff", specifier = ">=0.11.3" }, +] list-and-test = [ + { name = "dprint-py", specifier = ">=0.49.1.2" }, { name = "numtype", extras = ["numpy"] }, { name = "pytest", specifier = ">=8.3.5" }, { name = "ruff", specifier = ">=0.11.3" }, From f8fa0f9ad52502dc3524c4f0f4b1bf1a51a216c9 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+kotlinisland@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:17:15 +1000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=96=8C=EF=B8=8F=20format=20files=20wi?= =?UTF-8?q?th=20`dprint`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- .github/ISSUE_TEMPLATE/documentation.yml | 22 +- .github/ISSUE_TEMPLATE/feature-request.yml | 22 +- .github/labeler.yml | 195 +++++----- .taplo.toml | 2 +- CONTRIBUTING.md | 5 +- docs/contributing.md | 6 +- docs/index.md | 30 +- docs/reference.md | 2 +- docs/user_guide/differences.md | 18 +- pyproject.toml | 360 +++++++++--------- src/_numtype/.ruff.toml | 14 +- src/_numtype/@test/.ruff.toml | 4 +- src/numpy-stubs/.ruff.toml | 30 +- src/numpy-stubs/@test/.ruff.toml | 10 +- src/numpy-stubs/@test/generated/.ruff.toml | 14 +- src/numpy-stubs/@test/runtime/.ruff.toml | 25 +- src/numpy-stubs/@test/static/.ruff.toml | 8 +- .../@test/static/accept/.ruff.toml | 6 +- .../@test/static/reject/.ruff.toml | 6 +- src/numtype/@test/.ruff.toml | 6 +- tool/.ruff.toml | 12 +- 22 files changed, 394 insertions(+), 405 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 8180e9b0..28fc9239 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -51,7 +51,7 @@ body: attributes: label: "Type-checker version and configuration:" description: > - Please include the exact version of the type-checker you are using. + Please include the exact version of the type-checker you are using. Popular (static) type checkers include Mypy, Pyright / Pylance, Pytype, Pyre, PyCharm, etc. Also include the full CLI command used to run the type-checker, and all of the relevant configuration options. validations: diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index ccd56b37..240dd808 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -4,15 +4,15 @@ title: "" labels: ["topic: Docs"] body: -- type: textarea - attributes: - label: "Issue with current documentation:" - description: > - Please make sure to leave a reference to the document/code you're - referring to. You can also check the development version of the - documentation. + - type: textarea + attributes: + label: "Issue with current documentation:" + description: > + Please make sure to leave a reference to the document/code you're + referring to. You can also check the development version of the + documentation. -- type: textarea - attributes: - label: "Idea or request for content:" - description: Please describe as clearly as possible what topics you think are missing from the current documentation. + - type: textarea + attributes: + label: "Idea or request for content:" + description: Please describe as clearly as possible what topics you think are missing from the current documentation. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 96542614..537fa094 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -3,15 +3,15 @@ description: Suggest an improvement or propose a new feature. title: "" labels: ["stubs: Enhancement"] body: -- type: markdown - attributes: - value: > - If you're looking to request a new feature or change in functionality, - including adding or changing the meaning of arguments to an existing - function. + - type: markdown + attributes: + value: > + If you're looking to request a new feature or change in functionality, + including adding or changing the meaning of arguments to an existing + function. -- type: textarea - attributes: - label: "Please describe the feature or change you would like to see:" - validations: - required: true + - type: textarea + attributes: + label: "Please describe the feature or change you would like to see:" + validations: + required: true diff --git a/.github/labeler.yml b/.github/labeler.yml index efffe81b..0aa5c44c 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,155 +1,154 @@ "numpy.ctypeslib.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/ctypeslib.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/ctypeslib.pyi "numpy.distutils.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/distutils/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/distutils/** "numpy.dtype": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/dtypes.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/dtypes.pyi "numpy.dtypes.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/dtypes.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/dtypes.pyi "numpy.emath.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/lib/_scimath_impl.pyi - - src/numpy-stubs/lib/scimath.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/lib/_scimath_impl.pyi + - src/numpy-stubs/lib/scimath.pyi "numpy.f2py.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/f2py/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/f2py/** "numpy.fft.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/fft/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/fft/** "numpy.linalg.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/linalg/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/linalg/** "numpy.ma.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/ma/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/ma/** "numpy.matlib.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/matlib.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/matlib.pyi "numpy.matrixlib.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/matrixlib/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/matrixlib/** "numpy.poly*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/lib/_polynomial_impl.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/lib/_polynomial_impl.pyi "numpy.polynomial.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/polynomial/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/polynomial/** "numpy.random.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/random/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/random/** "numpy.rec.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/rec/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/rec/** "numpy.strings.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/_core/strings.pyi - - src/numpy-stubs/strings/**.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/_core/strings.pyi + - src/numpy-stubs/strings/**.pyi "numpy.testing.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/testing/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/testing/** "numpy.ufunc": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/_core/umath.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/_core/umath.pyi "numpy._utils": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/_utils/** + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/_utils/** "numpy.version.*": -- changed-files: - - any-glob-to-any-file: - - src/numpy-stubs/version.pyi + - changed-files: + - any-glob-to-any-file: + - src/numpy-stubs/version.pyi -# Documentation and Testing + # Documentation and Testing "topic: documentation": -- changed-files: - - any-glob-to-any-file: - - docs/** - - README.md - - CONTRIBUTING.md - - mkdocs.yml + - changed-files: + - any-glob-to-any-file: + - docs/** + - README.md + - CONTRIBUTING.md + - mkdocs.yml "topic: testing": -- changed-files: - - any-glob-to-any-file: - - src/**/@test/** - - tool/test/** + - changed-files: + - any-glob-to-any-file: + - src/**/@test/** + - tool/test/** -# Tools and Configuration + # Tools and Configuration "tool: stubtest": -- changed-files: - - any-glob-to-any-file: - - tool/allowlists/** - - tool/stubtest.py + - changed-files: + - any-glob-to-any-file: + - tool/allowlists/** + - tool/stubtest.py "tool: github-actions": -- changed-files: - - any-glob-to-any-file: - - .github/workflows/** + - changed-files: + - any-glob-to-any-file: + - .github/workflows/** "topic: dependencies": -- changed-files: - - any-glob-to-any-file: - - uv.lock - - tool/*.lock + - changed-files: + - any-glob-to-any-file: + - uv.lock + - tool/*.lock "topic: developer experience": -- changed-files: - - any-glob-to-any-file: - - .vscode/** - - lefthook.yml + - changed-files: + - any-glob-to-any-file: + - .vscode/** + - lefthook.yml "topic: automation": -- changed-files: - - any-glob-to-any-file: - - .github/workflows/** - - tool/testgen.py + - changed-files: + - any-glob-to-any-file: + - .github/workflows/** + - tool/testgen.py "topic: code style": -- changed-files: - - any-glob-to-any-file: - - .taplo.toml - - **/.ruff.toml - + - changed-files: + - any-glob-to-any-file: + - .taplo.toml + - **/.ruff.toml diff --git a/.taplo.toml b/.taplo.toml index 26ca2799..b721b65e 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -13,7 +13,7 @@ column_width = 88 compact_arrays = true compact_inline_tables = true crlf = false -indent_string = " " # 4 spaces +indent_string = " " # 4 spaces indent_tables = true reorder_keys = false reorder_arrays = false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36f6f637..6623e47d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,15 +6,14 @@ grow. Pull requests (PRs) are always welcome, but making a PR is just the start. Please respond to comments and requests for changes to help move -the process forward. Please follow our [Code of -Conduct](https://numpy.org/code-of-conduct/), which applies to all +the process forward. Please follow our [Code of Conduct](https://numpy.org/code-of-conduct/), which applies to all interactions, including issues and PRs. For more, please read Thank you for contributing, and happy coding! -______________________________________________________________________ +--- diff --git a/docs/contributing.md b/docs/contributing.md index 822ae1e1..b4ba14e1 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -6,7 +6,7 @@ hide: # Contributing to NumType {% - include-markdown "../CONTRIBUTING.md" - start="" - end="" +include-markdown "../CONTRIBUTING.md" +start="" +end="" %} diff --git a/docs/index.md b/docs/index.md index 91e95f1f..71b3eed6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,31 +15,31 @@ algebra, basic statistical operations, random simulation and much more.
-- :material-book-open-variant:{ .lg .middle }   __User guide__ +- :material-book-open-variant:{ .lg .middle }   **User guide** - --- + --- - The user guide provides in-depth information on the key concepts of - NumType with useful background information and explanation. + The user guide provides in-depth information on the key concepts of + NumType with useful background information and explanation. - [:octicons-arrow-right-24: To the user guide](user_guide/index.md) + [:octicons-arrow-right-24: To the user guide](user_guide/index.md) -- :material-code-brackets:{ .lg .middle }   __API reference__ +- :material-code-brackets:{ .lg .middle }   **API reference** - --- + --- - The reference guide contains a detailed description of the functions, - modules, and objects included in NumType. + The reference guide contains a detailed description of the functions, + modules, and objects included in NumType. - [:octicons-arrow-right-24: To the reference guide](reference.md) + [:octicons-arrow-right-24: To the reference guide](reference.md) -- :fontawesome-solid-user-plus:{ .lg .middle }   __Contributor's guide__ +- :fontawesome-solid-user-plus:{ .lg .middle }   **Contributor's guide** - --- + --- - Want to add to the codebase? The contributing guidelines will guide you - through the process of improving NumType. + Want to add to the codebase? The contributing guidelines will guide you + through the process of improving NumType. - [:octicons-arrow-right-24: To the contributor's guide](contributing.md) + [:octicons-arrow-right-24: To the contributor's guide](contributing.md)
diff --git a/docs/reference.md b/docs/reference.md index e318aaa2..499ab00a 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -5,4 +5,4 @@ hide: # NumType reference -*coming soon* +_coming soon_ diff --git a/docs/user_guide/differences.md b/docs/user_guide/differences.md index eb003112..105ac4d9 100644 --- a/docs/user_guide/differences.md +++ b/docs/user_guide/differences.md @@ -2,7 +2,7 @@ ## Concrete scalar types -Since NumPy 2.2, the `float64` and `complex128` scalar types were made into *concrete* types. +Since NumPy 2.2, the `float64` and `complex128` scalar types were made into _concrete_ types. Before that, they were aliases of `#!py floating[_64Bit]` and `#!py complexfloating[_64Bit, _64Bit]`, respectively. But at runtime, `floating` is not the same as `float64`, so this was incorrect. @@ -28,8 +28,8 @@ To be specific, the following scalar types are proper subclasses in NumType: - `int8`, `int16`, `int32`, and `int64` - `uint8`, `uint16`, `uint32`, and `uint64` -- `float16`, `float32`, *`float64`*, and `longdouble` -- `complex64`, *`complex128`*, and `clongdouble` +- `float16`, `float32`, _`float64`_, and `longdouble` +- `complex64`, _`complex128`_, and `clongdouble` The other numeric scalar types are defined as aliases, and assume a 64-bit platform. @@ -37,7 +37,7 @@ The other numeric scalar types are defined as aliases, and assume a 64-bit platf The purpose of [`#!py numpy.typing.NBitBase`][numpy.typing.NBitBase] was as upper bound to a type parameter, for use in generic abstract scalar types like `#!py floating[T]`. -But the now concrete scalar types will no longer accept *any* `#!py floating[T]`. +But the now concrete scalar types will no longer accept _any_ `#!py floating[T]`. `NBitBase` should therefore not be used anymore. ### Alternatives @@ -58,7 +58,7 @@ def f(x: np.floating[NT]) -> np.floating[NT]: ... /// /// tab | Python 3.12 and above - select: True +select: True ```py import numpy as np @@ -84,7 +84,7 @@ def f(x: FloatT) -> FloatT: ... /// /// tab | Python 3.12 and above - select: True +select: True ```py import numpy as np @@ -112,7 +112,7 @@ def f(x: np.complexfloating[NT]) -> np.floating[NT]: ... /// /// tab | Python 3.12 and above - select: True +select: True ```py import numpy as np @@ -161,7 +161,7 @@ This was done in order to minimize the expected amount of "but it works on my ma ## Return types of `[c]longdouble.item()` and `.tolist()` In Numpy, `longdouble` and `clongdouble` aren't annotated as concrete subclasses of -`[complex]floating`, but as *aliases*. A consequence of this is that their `item` and `tolist` +`[complex]floating`, but as _aliases_. A consequence of this is that their `item` and `tolist` methods had to return the same type as that of all other `floating` and `complexfloating` types, i.e. `float` and `complex`. But this is incorrect for `longdouble` and `clongdouble`: @@ -178,7 +178,7 @@ In NumType, the stubs correctly reflect this runtime behaviour. ## Removed `number.__floordiv__` The abstract `numpy.number` type represents a scalar that's either integer, float, or complex. -But the builtin "floordiv" operator, `//` is only supported for integer and floating scalars. +But the builtin "floordiv" operator, `//` is only supported for integer and floating scalars. Complex numpy scalars will raise an error. But in NumPy, type-checkers will allow you to write the following type-unsafe code: diff --git a/pyproject.toml b/pyproject.toml index e5110665..933c39ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,116 +2,112 @@ requires = ["hatchling"] build-backend = "hatchling.build" - [project] name = "numtype" version = "2.2.4.0.dev0" description = "Experimental Typing Stubs for NumPy" readme = "README.md" authors = [ - {name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com"}, + { name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com" }, ] maintainers = [ - {name = "NumPy Developers", email = "numpy-discussion@python.org"}, + { name = "NumPy Developers", email = "numpy-discussion@python.org" }, ] license = "BSD-3-Clause" keywords = ["numpy", "typing", "stubs"] classifiers = [ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Typing :: Stubs Only", - "Typing :: Typed", + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Typing :: Stubs Only", + "Typing :: Typed", ] packages = [ - {include = "src/_numtype"}, - {include = "src/numpy-stubs"}, - {include = "src/numtype"}, + { include = "src/_numtype" }, + { include = "src/numpy-stubs" }, + { include = "src/numtype" }, ] requires-python = ">=3.10" dependencies = [] - [project.optional-dependencies] - numpy = ["numpy>=2.2.4,<2.3"] - - [project.urls] - Homepage = "https://numpy.org/" - Repository = "https://github.com/numpy/numtype/" - Issues = "https://github.com/numpy/numtype/issues" - Changelog = "https://github.com/numpy/numtype/releases" +[project.optional-dependencies] +numpy = ["numpy>=2.2.4,<2.3"] +[project.urls] +Homepage = "https://numpy.org/" +Repository = "https://github.com/numpy/numtype/" +Issues = "https://github.com/numpy/numtype/issues" +Changelog = "https://github.com/numpy/numtype/releases" [dependency-groups] numpy = ["numtype[numpy]"] lint = [ - "dprint-py>=0.49.1.2", - "ruff>=0.11.3", + "dprint-py>=0.49.1.2", + "ruff>=0.11.3", ] pytest = [ - {include-group = "numpy"}, - "pytest>=8.3.5", - "typing_extensions>=4.13.0", + { include-group = "numpy" }, + "pytest>=8.3.5", + "typing_extensions>=4.13.0", ] list_and_test = [ - {include-group = "lint"}, - {include-group = "pytest"}, + { include-group = "lint" }, + { include-group = "pytest" }, ] types = [ - {include-group = "pytest"}, - "types-setuptools>=78.1.0.20250329", - "types-tabulate>=0.9.0.20241207", + { include-group = "pytest" }, + "types-setuptools>=78.1.0.20250329", + "types-tabulate>=0.9.0.20241207", ] basedpyright = [ - {include-group = "numpy"}, - {include-group = "types"}, - "basedpyright>=1.28.4", + { include-group = "numpy" }, + { include-group = "types" }, + "basedpyright>=1.28.4", ] mypy = [ - {include-group = "types"}, - "mypy[faster-cache]>=1.15.0", + { include-group = "types" }, + "mypy[faster-cache]>=1.15.0", ] typecheck = [ - {include-group = "basedpyright"}, - {include-group = "mypy"}, + { include-group = "basedpyright" }, + { include-group = "mypy" }, ] docs = [ - "mkdocs-material>=9.6.11", - "mkdocs-awesome-nav>=3.1.0", - "markdown-callouts>=0.4.0", - "mkdocs-include-markdown-plugin>=7.1.5", - "mkdocs-minify-plugin>=0.8.0", - "mkdocstrings[python]>=0.29.1", - "pygments>=2.19.1", + "mkdocs-material>=9.6.11", + "mkdocs-awesome-nav>=3.1.0", + "markdown-callouts>=0.4.0", + "mkdocs-include-markdown-plugin>=7.1.5", + "mkdocs-minify-plugin>=0.8.0", + "mkdocstrings[python]>=0.29.1", + "pygments>=2.19.1", ] dev = [ - {include-group = "list_and_test"}, - {include-group = "typecheck"}, - {include-group = "docs"}, + { include-group = "list_and_test" }, + { include-group = "typecheck" }, + { include-group = "docs" }, ] - [tool.hatch.build] exclude = [ - "**/@test", - "**/*.yml", - "**/.*", - "/docs", - "/tool", - "CONTRIBUTING.md", - "uv.lock", + "**/@test", + "**/*.yml", + "**/.*", + "/docs", + "/tool", + "CONTRIBUTING.md", + "uv.lock", ] skip-excluded-dirs = true - [tool.hatch.build.targets.wheel] - packages = ["src/_numtype", "src/numtype", "src/numpy-stubs"] - +[tool.hatch.build.targets.wheel] +packages = ["src/_numtype", "src/numtype", "src/numpy-stubs"] [tool.mypy] mypy_path = "src" @@ -134,7 +130,6 @@ disable_memoryview_promotion = true # bare_literals = false # default_return = false - [tool.pyright] include = ["src", "tool"] ignore = [".venv"] @@ -149,12 +144,12 @@ enableReachabilityAnalysis = false reportCallInDefaultInitializer = true reportImportCycles = true reportImplicitOverride = true -reportInvalidStubStatement = false # required for type-testing +reportInvalidStubStatement = false # required for type-testing reportMissingSuperCall = false reportPrivateUsage = false reportPropertyTypeMismatch = false reportSelfClsParameterName = false -reportShadowedImports = false # causes a ~35% slowdown +reportShadowedImports = false # causes a ~35% slowdown reportUninitializedInstanceVariable = true reportUnnecessaryTypeIgnoreComment = true reportUnusedExpression = false @@ -179,65 +174,64 @@ force-exclude = true line-length = 130 preview = true - [tool.ruff.format] - docstring-code-format = true - line-ending = "lf" - - [tool.ruff.lint] - select = ["ALL"] - ignore = [ - "FBT", # flake8-boolean-trap - "CPY", # flake8-copyright - "EM", # flake8-errmsg - "FIX", # flake8-fixme - "ANN401", # flake8-annotations: any-type - "PYI041", # flake8-pyi: redundant-numeric-union - ] - - [tool.ruff.lint.per-file-ignores] - "*.pyi" = [ - "N", # pep8-naming - "TD", # flake8-todo - "COM812", # flake8-commas: missing-trailing-comma - "PYI054", # flake8-pyi: numeric-literal-too-long - "PLC2701", # pylint/C: import-private-name - ] - - [tool.ruff.lint.flake8-builtins] - builtins-allowed-modules = ["random"] - - [tool.ruff.lint.flake8-import-conventions] - banned-from = [ - "abc", - "basedtyping", - "ctypes", - "datetime", - "os", - "sys", - "numpy", - "numpy.typing", - ] - [tool.ruff.lint.flake8-import-conventions.extend-aliases] - "ctypes" = "ct" - "datetime" = "dt" - "numpy" = "np" - "numpy.typing" = "npt" - "numtype" = "nt" - "_numtype" = "_nt" - - [tool.ruff.lint.isort] - case-sensitive = true - combine-as-imports = true - extra-standard-library = ["_typeshed", "typing_extensions"] - known-first-party = ["numpy", "numtype", "_numtype"] - split-on-trailing-comma = true - - [tool.ruff.lint.pydocstyle] - convention = "numpy" +[tool.ruff.format] +docstring-code-format = true +line-ending = "lf" + +[tool.ruff.lint] +select = ["ALL"] +ignore = [ + "FBT", # flake8-boolean-trap + "CPY", # flake8-copyright + "EM", # flake8-errmsg + "FIX", # flake8-fixme + "ANN401", # flake8-annotations: any-type + "PYI041", # flake8-pyi: redundant-numeric-union +] - [tool.ruff.lint.pylint] - allow-dunder-method-names = ["__array__", "__array_ufunc__"] +[tool.ruff.lint.per-file-ignores] +"*.pyi" = [ + "N", # pep8-naming + "TD", # flake8-todo + "COM812", # flake8-commas: missing-trailing-comma + "PYI054", # flake8-pyi: numeric-literal-too-long + "PLC2701", # pylint/C: import-private-name +] +[tool.ruff.lint.flake8-builtins] +builtins-allowed-modules = ["random"] + +[tool.ruff.lint.flake8-import-conventions] +banned-from = [ + "abc", + "basedtyping", + "ctypes", + "datetime", + "os", + "sys", + "numpy", + "numpy.typing", +] +[tool.ruff.lint.flake8-import-conventions.extend-aliases] +"ctypes" = "ct" +"datetime" = "dt" +"numpy" = "np" +"numpy.typing" = "npt" +"numtype" = "nt" +"_numtype" = "_nt" + +[tool.ruff.lint.isort] +case-sensitive = true +combine-as-imports = true +extra-standard-library = ["_typeshed", "typing_extensions"] +known-first-party = ["numpy", "numtype", "_numtype"] +split-on-trailing-comma = true + +[tool.ruff.lint.pydocstyle] +convention = "numpy" + +[tool.ruff.lint.pylint] +allow-dunder-method-names = ["__array__", "__array_ufunc__"] [tool.pytest.ini_options] minversion = "8.0" @@ -246,77 +240,75 @@ filterwarnings = ["error"] log_cli_level = "INFO" xfail_strict = true - # install tox with `uv tool install tox --with tox-uv --upgrade` # and run with `uvx tox p` [tool.tox] min_version = "4" requires = ["tox-uv>=1"] env_list = [ - "ruff", - "pytest", - "basedpyright", - "mypy", - "3.10", - "3.11", - "3.12", - "3.13", + "ruff", + "pytest", + "basedpyright", + "mypy", + "3.10", + "3.11", + "3.12", + "3.13", ] - [tool.tox.env_run_base] - description = "stubtest ({base_python})" - commands = [ - [ - "uv", - "run", - "-q", - "-p={base_python}", - "--active", - "tool/stubtest.py", - "--concise", - ], - ] - - [tool.tox.env.ruff] - description = "ruff" - runner = "uv-venv-lock-runner" - dependency_groups = ["dev"] - commands = [ - ["ruff", "check", "--show-fixes"], - ["ruff", "format", "--check"], - ] - - [tool.tox.env.pytest] - description = "pytest" - runner = "uv-venv-lock-runner" - dependency_groups = ["dev", "numpy"] - commands = [["pytest"]] - - [tool.tox.env.basedpyright] - description = "basedpyright" - runner = "uv-venv-lock-runner" - dependency_groups = ["dev"] - commands = [["basedpyright", {replace = "posargs", default = [], extend = true}]] +[tool.tox.env_run_base] +description = "stubtest ({base_python})" +commands = [ + [ + "uv", + "run", + "-q", + "-p={base_python}", + "--active", + "tool/stubtest.py", + "--concise", + ], +] - [tool.tox.env.mypy] - description = "mypy" - runner = "uv-venv-lock-runner" - dependency_groups = ["dev", "orjson", "types"] - commands = [ - [ - "mypy", - "--no-incremental", - "--cache-dir=/dev/null", - "--soft-error-limit=-1", - {replace = "posargs", default = ["."], extend = true}, - ], - ] +[tool.tox.env.ruff] +description = "ruff" +runner = "uv-venv-lock-runner" +dependency_groups = ["dev"] +commands = [ + ["ruff", "check", "--show-fixes"], + ["ruff", "format", "--check"], +] +[tool.tox.env.pytest] +description = "pytest" +runner = "uv-venv-lock-runner" +dependency_groups = ["dev", "numpy"] +commands = [["pytest"]] + +[tool.tox.env.basedpyright] +description = "basedpyright" +runner = "uv-venv-lock-runner" +dependency_groups = ["dev"] +commands = [["basedpyright", { replace = "posargs", default = [], extend = true }]] + +[tool.tox.env.mypy] +description = "mypy" +runner = "uv-venv-lock-runner" +dependency_groups = ["dev", "orjson", "types"] +commands = [ + [ + "mypy", + "--no-incremental", + "--cache-dir=/dev/null", + "--soft-error-limit=-1", + { replace = "posargs", default = ["."], extend = true }, + ], +] [tool.typos] - [tool.typos.default] - extend-ignore-identifiers-re = ['ND|nd|nin|NIN|TYP'] +[tool.typos.default] +extend-ignore-identifiers-re = ['ND|nd|nin|NIN|TYP'] - [tool.typos.files] - extend-exclude = ["*.pyi", ".mypyignore"] +[tool.typos.files] +extend-exclude = ["*.pyi", ".mypyignore"] diff --git a/src/_numtype/.ruff.toml b/src/_numtype/.ruff.toml index 11f35bc2..1f3dec9f 100644 --- a/src/_numtype/.ruff.toml +++ b/src/_numtype/.ruff.toml @@ -3,11 +3,11 @@ line-length = 130 [lint] extend-ignore = [ - "A", # flake8-builtins - "PYI042", # flake8-pyi: snake-case-type-alias - "PYI064", # flake8-pyi: redundant-final-literal - "SLF001", # flake8-self: private-member-access - "PLR2044", # pylint/R: empty-comment - "PLR6301", # pylint/R: no-self-use - "PLW3201", # pylint/W: bad-dunder-method-name + "A", # flake8-builtins + "PYI042", # flake8-pyi: snake-case-type-alias + "PYI064", # flake8-pyi: redundant-final-literal + "SLF001", # flake8-self: private-member-access + "PLR2044", # pylint/R: empty-comment + "PLR6301", # pylint/R: no-self-use + "PLW3201", # pylint/W: bad-dunder-method-name ] diff --git a/src/_numtype/@test/.ruff.toml b/src/_numtype/@test/.ruff.toml index a54cb369..7e0016ae 100644 --- a/src/_numtype/@test/.ruff.toml +++ b/src/_numtype/@test/.ruff.toml @@ -2,6 +2,6 @@ extend = "../.ruff.toml" [lint] extend-ignore = [ - "PYI015", # flake8-pyi: assignment-default-in-stub - "PYI017", # flake8-pyi: complex-assignment-in-stub + "PYI015", # flake8-pyi: assignment-default-in-stub + "PYI017", # flake8-pyi: complex-assignment-in-stub ] diff --git a/src/numpy-stubs/.ruff.toml b/src/numpy-stubs/.ruff.toml index 2199b2b9..e7210908 100644 --- a/src/numpy-stubs/.ruff.toml +++ b/src/numpy-stubs/.ruff.toml @@ -3,19 +3,19 @@ line-length = 130 [lint] extend-ignore = [ - "A", # flake8-builtins - "S404", # flake8-bandit: suspicious-subprocess-import - "PYI042", # flake8-pyi: snake-case-type-alias # TODO - "PYI047", # flake8-pyi: unused-private-type-alias # TODO - "PYI064", # flake8-pyi: redundant-final-literal - "SLF001", # flake8-self: private-member-access - "E741", # pycodestyle/E: ambiguous-variable-name - "E742", # pycodestyle/E: ambiguous-class-name - "E743", # pycodestyle/E: ambiguous-function-name - "PLR2044", # pylint/R: empty-comment - "PLR6301", # pylint/R: no-self-use - "PLR0904", # pylint/R: too-many-public-methods - "PLR0913", # pylint/R: too-many-arguments - "PLR0917", # pylint/R: too-many-positional-arguments - "PLW3201", # pylint/W: bad-dunder-method-name + "A", # flake8-builtins + "S404", # flake8-bandit: suspicious-subprocess-import + "PYI042", # flake8-pyi: snake-case-type-alias # TODO + "PYI047", # flake8-pyi: unused-private-type-alias # TODO + "PYI064", # flake8-pyi: redundant-final-literal + "SLF001", # flake8-self: private-member-access + "E741", # pycodestyle/E: ambiguous-variable-name + "E742", # pycodestyle/E: ambiguous-class-name + "E743", # pycodestyle/E: ambiguous-function-name + "PLR2044", # pylint/R: empty-comment + "PLR6301", # pylint/R: no-self-use + "PLR0904", # pylint/R: too-many-public-methods + "PLR0913", # pylint/R: too-many-arguments + "PLR0917", # pylint/R: too-many-positional-arguments + "PLW3201", # pylint/W: bad-dunder-method-name ] diff --git a/src/numpy-stubs/@test/.ruff.toml b/src/numpy-stubs/@test/.ruff.toml index b22acbc1..be34cb5d 100644 --- a/src/numpy-stubs/@test/.ruff.toml +++ b/src/numpy-stubs/@test/.ruff.toml @@ -3,9 +3,9 @@ line-length = 88 [lint] extend-ignore = [ - "D", # pydocstyle - "ERA", # eradicate - "S", # flake8-bandit - "T", # flake8-print - "PLR2004", # pylint: magic-value-comparisons + "D", # pydocstyle + "ERA", # eradicate + "S", # flake8-bandit + "T", # flake8-print + "PLR2004", # pylint: magic-value-comparisons ] diff --git a/src/numpy-stubs/@test/generated/.ruff.toml b/src/numpy-stubs/@test/generated/.ruff.toml index 34b8a979..5dde1b34 100644 --- a/src/numpy-stubs/@test/generated/.ruff.toml +++ b/src/numpy-stubs/@test/generated/.ruff.toml @@ -3,11 +3,11 @@ line-length = 130 [lint] extend-ignore = [ - "PTH", # flake8-use-pathlib - "B015", # flake8-bugbear useless-comparison - "PYI015", # flake8-pyi: assignment-default-in-stub - "PYI017", # flake8-pyi: complex-assignment-in-stub - "SLF001", # flake8-self: private-member-access - "PLR0124", # pylint/R: comparison-with-itself - "PLC2801", # pylint/C: unnecessary-dunder-call + "PTH", # flake8-use-pathlib + "B015", # flake8-bugbear useless-comparison + "PYI015", # flake8-pyi: assignment-default-in-stub + "PYI017", # flake8-pyi: complex-assignment-in-stub + "SLF001", # flake8-self: private-member-access + "PLR0124", # pylint/R: comparison-with-itself + "PLC2801", # pylint/C: unnecessary-dunder-call ] diff --git a/src/numpy-stubs/@test/runtime/.ruff.toml b/src/numpy-stubs/@test/runtime/.ruff.toml index be60d78f..79f67a50 100644 --- a/src/numpy-stubs/@test/runtime/.ruff.toml +++ b/src/numpy-stubs/@test/runtime/.ruff.toml @@ -1,18 +1,17 @@ extend = "../.ruff.toml" - [lint] extend-ignore = [ - "ARG", # flake8-unused-arguments - "B015", # flake8-bugbear: useless-comparison - "B018", # flake8-bugbear: useless-expression - "DTZ001", # flake8-datetimez: call-datetime-without-tzinfo - "SLF001", # flake8-self: private-member-access - "TD002", # flake8-todos: missing-todo-author - "PLC2801", # pylint/C: unnecessary-dunder-call - "PLR0124", # pylint/R: comparison-with-itself - "PLR6301", # pylint/R: no-self-use - "F841", # pyflakes: unused-variable - "UP018", # pyupgrade: native-literals - "RUF046", # ruff: unnecessary-cast-to-int + "ARG", # flake8-unused-arguments + "B015", # flake8-bugbear: useless-comparison + "B018", # flake8-bugbear: useless-expression + "DTZ001", # flake8-datetimez: call-datetime-without-tzinfo + "SLF001", # flake8-self: private-member-access + "TD002", # flake8-todos: missing-todo-author + "PLC2801", # pylint/C: unnecessary-dunder-call + "PLR0124", # pylint/R: comparison-with-itself + "PLR6301", # pylint/R: no-self-use + "F841", # pyflakes: unused-variable + "UP018", # pyupgrade: native-literals + "RUF046", # ruff: unnecessary-cast-to-int ] diff --git a/src/numpy-stubs/@test/static/.ruff.toml b/src/numpy-stubs/@test/static/.ruff.toml index cc58dca1..4296b02d 100644 --- a/src/numpy-stubs/@test/static/.ruff.toml +++ b/src/numpy-stubs/@test/static/.ruff.toml @@ -3,8 +3,8 @@ line-length = 130 [lint] extend-ignore = [ - "PTH", # flake8-use-pathlib - "PYI015", # flake8-pyi: assignment-default-in-stub - "PYI017", # flake8-pyi: complex-assignment-in-stub - "SLF001", # flake8-self: private-member-access + "PTH", # flake8-use-pathlib + "PYI015", # flake8-pyi: assignment-default-in-stub + "PYI017", # flake8-pyi: complex-assignment-in-stub + "SLF001", # flake8-self: private-member-access ] diff --git a/src/numpy-stubs/@test/static/accept/.ruff.toml b/src/numpy-stubs/@test/static/accept/.ruff.toml index 5874b2c6..9b407551 100644 --- a/src/numpy-stubs/@test/static/accept/.ruff.toml +++ b/src/numpy-stubs/@test/static/accept/.ruff.toml @@ -2,7 +2,7 @@ extend = "../.ruff.toml" [lint] extend-ignore = [ - "PT009", # flake8-pytest-style: pytest-unittest-assertion - "PLR0124", # pylint/R: comparison-with-itself - "PLC2801", # pylint/C: unnecessary-dunder-call + "PT009", # flake8-pytest-style: pytest-unittest-assertion + "PLR0124", # pylint/R: comparison-with-itself + "PLC2801", # pylint/C: unnecessary-dunder-call ] diff --git a/src/numpy-stubs/@test/static/reject/.ruff.toml b/src/numpy-stubs/@test/static/reject/.ruff.toml index 5e2cc1ce..a8931477 100644 --- a/src/numpy-stubs/@test/static/reject/.ruff.toml +++ b/src/numpy-stubs/@test/static/reject/.ruff.toml @@ -3,7 +3,7 @@ builtins = ["reveal_type"] [lint] extend-ignore = [ - "B", # flake8-bugbear - "PYI015", # flake8-pyi: assignment-default-in-stub - "SIM300", # flake8-pyi: yoda-conditions + "B", # flake8-bugbear + "PYI015", # flake8-pyi: assignment-default-in-stub + "SIM300", # flake8-pyi: yoda-conditions ] diff --git a/src/numtype/@test/.ruff.toml b/src/numtype/@test/.ruff.toml index fabc170c..b57f763d 100644 --- a/src/numtype/@test/.ruff.toml +++ b/src/numtype/@test/.ruff.toml @@ -2,7 +2,7 @@ extend = "../.ruff.toml" [lint] extend-ignore = [ - "D", # pydocstyle - "S", # flake8-bandit - "PLR2004", # pylint: magic-value-comparisons + "D", # pydocstyle + "S", # flake8-bandit + "PLR2004", # pylint: magic-value-comparisons ] diff --git a/tool/.ruff.toml b/tool/.ruff.toml index 37c553f6..65a50f01 100644 --- a/tool/.ruff.toml +++ b/tool/.ruff.toml @@ -3,10 +3,10 @@ line-length = 88 [lint] extend-ignore = [ - "TRY003", # tryceratops: raise-vanilla-args - "TD003", # flake8-todos: missing-todo-link - "S101", # flake8-bandit: assert - "S404", # flake8-bandit: suspicious-subprocess-import - "S603", # flake8-bandit: subprocess-without-shell-equals-true - "T201", # flake8-print: print + "TRY003", # tryceratops: raise-vanilla-args + "TD003", # flake8-todos: missing-todo-link + "S101", # flake8-bandit: assert + "S404", # flake8-bandit: suspicious-subprocess-import + "S603", # flake8-bandit: subprocess-without-shell-equals-true + "T201", # flake8-print: print ]