mirror of https://github.com/jab/bidict.git
Drop Pyright in favor of just mypy.
Pyright has been more trouble than it's worth. Update vscode config accordingly (including for devcontainer).
This commit is contained in:
parent
84b1bdc5b0
commit
e5849e210b
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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": [],
|
||||
}
|
|
@ -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,
|
||||
}
|
|
@ -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]:
|
||||
|
|
|
@ -53,7 +53,6 @@ Projects
|
|||
- `Sphinx <https://www.sphinx-doc.org>`__
|
||||
- `Readthedocs <https://readthedocs.org>`__
|
||||
- `mypy <https://mypy.readthedocs.io>`__
|
||||
- `pyright <https://github.com/microsoft/pyright>`__
|
||||
- `ruff <https://github.com/charliermarsh/ruff>`__
|
||||
- `Flake8 <https://flake8.pycqa.org>`__
|
||||
- `Pylint <https://www.pylint.org>`__
|
||||
|
|
|
@ -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",
|
||||
}
|
Loading…
Reference in New Issue