diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 602c165..cf284d4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,14 +9,11 @@ // ARGS set in ./Dockerfile can be overridden here: "args": {} }, - // Set *default* container specific settings.json values on container create. + // Default, container-specific settings here are set on container create. + // Note: The project's .vscode/settings.json is still the right place + // for non-container-specific settings. "settings": { - // Enable pylance's pyright integration (disabled by default): - "python.analysis.typeCheckingMode": "strict", "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.linting.enabled": true, - "python.linting.mypyEnabled": true, - "python.linting.pylintEnabled": false, "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", "python.formatting.blackPath": "/usr/local/py-utils/bin/black", "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", @@ -26,10 +23,9 @@ "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.testing.pytestEnabled": true, "esbonio.sphinx.confDir": "${workspaceFolder}/docs", "restructuredtext.pythonRecommendation.disabled": true, - "terminal.integrated.defaultProfile.linux": "fish", + "terminal.integrated.defaultProfile.linux": "fish" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ @@ -43,7 +39,7 @@ "ms-python.vscode-pylance", "mutantdino.resource-monitor", "tamasfe.even-better-toml", - "trond-snekvik.simple-rst", + "trond-snekvik.simple-rst" ], // Use 'forwardPorts' to make a list of ports inside the container available locally by default. // (Even without this, by default VS Code will notice when a process starts listening on an diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da3d903..a742778 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,11 +27,6 @@ repos: - id: codespell args: ["--uri-ignore-words-list", "*"] # https://github.com/codespell-project/codespell/issues/2473 - - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.285 - hooks: - - id: pyright - - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.991 hooks: diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..7fbf10a --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +// vim: set ft=json5 +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + "recommendations": [ + "charliermarsh.ruff", + // "tamasfe.even-better-toml", + // "lextudio.restructuredtext", + // "trond-snekvik.simple-rst", + ], + "unwantedRecommendations": [], +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b6a938f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +// vim: set ft=json5 +{ + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + // Prefer mypy over Pyright: + "python.analysis.typeCheckingMode": "off", + "python.linting.mypyEnabled": true, + "python.testing.pytestEnabled": true, +} diff --git a/bidict/_iter.py b/bidict/_iter.py index a74d2fd..84392db 100644 --- a/bidict/_iter.py +++ b/bidict/_iter.py @@ -16,7 +16,7 @@ from ._typing import KT, VT, IterItems, MapOrIterItems def iteritems_mapping_or_iterable(arg: MapOrIterItems[KT, VT]) -> IterItems[KT, VT]: """Yield the items in *arg* based on whether it's a mapping.""" - yield from arg.items() if isinstance(arg, t.Mapping) else arg # pyright: ignore + yield from arg.items() if isinstance(arg, t.Mapping) else arg def iteritems(__arg: MapOrIterItems[KT, VT], **kw: VT) -> IterItems[KT, VT]: diff --git a/docs/thanks.rst b/docs/thanks.rst index 49a3efe..f973935 100644 --- a/docs/thanks.rst +++ b/docs/thanks.rst @@ -53,7 +53,6 @@ Projects - `Sphinx `__ - `Readthedocs `__ - `mypy `__ -- `pyright `__ - `ruff `__ - `Flake8 `__ - `Pylint `__ diff --git a/pyrightconfig.json b/pyrightconfig.json deleted file mode 100644 index 8611eeb..0000000 --- a/pyrightconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -// vim: set ft=json5: -{ - "exclude": [ - "docs", - "tests", - "run_tests.py", - ], - "typeCheckingMode": "strict", - // https://github.com/microsoft/pyright/blob/main/docs/configuration.md#diagnostic-rule-defaults - "reportGeneralTypeIssues": "warning", - "reportPrivateUsage": "warning", - "reportUnknownArgumentType": "warning", - "reportUnknownMemberType": "warning", - "reportUnknownVariableType": "warning", - "reportUnnecessaryIsInstance": "warning", - "reportUnnecessaryTypeIgnoreComment": "warning", -}