-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(typehint): use redundant alias imports for mypy
This commit also better aligns the repo with `pyvista/CONTRIBUTING.md`. Fixes Issue #163
- Loading branch information
1 parent
9334f9d
commit faeeaa8
Showing
23 changed files
with
915 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[codespell] | ||
skip = *.pyc,*.txt,*.gif,*.png,*.jpg,*.ply,*.vtk,*.vti,*.vtu,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,doc/_build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/examples/*,*.mypy_cache/*,*cover,./tests/tinypages/_build/*,*/_autosummary/* | ||
ignore-words-list = lod,byteorder,flem,parm,doubleclick,revered | ||
quiet-level = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[flake8] | ||
exclude = .git,__pycache__,build,dist,doc/examples,doc/_build,pyvista/**/__init__.py,pyvista/__init__.py,.venv,.venv/**/*.py, .venv/**/*.pyi | ||
ignore = | ||
# whitespace before ':' | ||
E203, | ||
# line break before binary operator | ||
W503, | ||
# line length too long | ||
E501, | ||
# do not assign a lambda expression, use a def | ||
E731, | ||
# too many leading '#' for block comment | ||
E266, | ||
# ambiguous variable name | ||
E741, | ||
# module level import not at top of file | ||
E402, | ||
# Quotes (temporary) | ||
Q0, | ||
# bare excepts (temporary) | ||
B001, E722 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://gitlab.com/PyCQA/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [ | ||
"flake8-black==0.3.2", | ||
"flake8-isort==4.1.1", | ||
"flake8-quotes==3.3.1", | ||
] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
args: [ | ||
"doc examples examples_flask pyvista tests", | ||
"*.py *.rst *.md", | ||
] | ||
|
||
- repo: https://github.com/pycqa/pydocstyle | ||
rev: 6.1.1 | ||
hooks: | ||
- id: pydocstyle | ||
additional_dependencies: [toml==0.10.2] | ||
files: ^(pyvista/|other/) | ||
exclude: ^pyvista/ext/ | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
- id: no-commit-to-branch | ||
args: [--branch, main] | ||
|
||
# this validates our github workflow files | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.15.1 | ||
hooks: | ||
- id: check-github-workflows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
{ | ||
"[markdown]": { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.markdownlint": true | ||
}, | ||
"editor.defaultFormatter": null, | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"editor.wordWrap": "bounded", | ||
"editor.wordWrapColumn": 90 | ||
}, | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
}, | ||
"editor.defaultFormatter": "ms-python.python", | ||
"editor.formatOnSave": true, | ||
"files.trimTrailingWhitespace": true | ||
}, | ||
"cSpell.allowCompoundWords": true, | ||
"cSpell.dictionaries": [ | ||
"python" | ||
], | ||
"cSpell.ignorePaths": [ | ||
"*.dll", | ||
"*.html", | ||
"*.css", | ||
"*.json", | ||
"*.git/**", | ||
"**/build/**", | ||
".venv/", | ||
"*.bat" | ||
], | ||
"cSpell.words": [ | ||
"autocrlf", | ||
"bdist", | ||
"CICD", | ||
"cobertura", | ||
"deps", | ||
"DICOM", | ||
"docparams", | ||
"docstrings", | ||
"docutils", | ||
"fspath", | ||
"genindex", | ||
"gitlabci", | ||
"GLFM", | ||
"guiqtbot", | ||
"Hendry", | ||
"ipynb", | ||
"iscc", | ||
"isort", | ||
"Kaszynski", | ||
"Kubernetes", | ||
"modindex", | ||
"mypy", | ||
"NSIS", | ||
"nsist", | ||
"numfig", | ||
"pwsh", | ||
"pyinstaller", | ||
"pylint", | ||
"pylintrc", | ||
"pynsist", | ||
"pyproject", | ||
"pyqt", | ||
"pyside", | ||
"pytest", | ||
"pytestqt", | ||
"PYTHONIOENCODING", | ||
"pyvista", | ||
"pyvistaqt", | ||
"pyvistaqtdoc", | ||
"qapp", | ||
"qtbot", | ||
"QTBUG", | ||
"qtpy", | ||
"rcfile", | ||
"recommonmark", | ||
"rgba", | ||
"rsrc", | ||
"sphinxcontrib", | ||
"tada", | ||
"tldr", | ||
"toctree", | ||
"todos", | ||
"venv", | ||
"virtualenv", | ||
"vmtk" | ||
], | ||
"editor.acceptSuggestionOnEnter": "off", | ||
"editor.formatOnSave": false, | ||
"editor.rulers": [ | ||
90 | ||
], | ||
"editor.tabCompletion": "on", | ||
"esbonio.sphinx.buildDir": "${workspaceFolder}/docs/_build", | ||
"esbonio.sphinx.confDir": "${workspaceFolder}/docs", | ||
"esbonio.sphinx.forceFullBuild": false, | ||
"explorer.compactFolders": false, | ||
"files.exclude": { | ||
"**/.git": false | ||
}, | ||
"git-graph.referenceLabels.alignment": "Branches (aligned to the graph) & Tags (on the right)", | ||
"grammarly.files.include": [ | ||
"**/README.rst", | ||
"**/CODE_OF_CONDUCT.md", | ||
"**/CONTRIBUTING.md" | ||
], | ||
"markdownlint.config": { | ||
"MD026": false, // Trailing punctuation okay in headers (e.g. emojis) | ||
"MD033": false, // Some HTML is fine | ||
"MD041": false, // Allow non-headings for first line in file | ||
"MD046": false // Allow indented code blocks (M029 errors otherwise) | ||
}, | ||
"mypy.dmypyExecutable": "${workspaceFolder}/.venv/Scripts/dmypy.exe", | ||
"powershell.integratedConsole.showOnStartup": false, | ||
"powershell.powerShellDefaultVersion": "PowerShell Core 7 (x64)", | ||
"python.formatting.provider": "black", | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.flake8Path": "${workspaceFolder}/.venv/Scripts/flake8.exe", | ||
"python.linting.mypyArgs": [ | ||
"--config-file", | ||
"mypy.ini" | ||
], | ||
"python.linting.mypyEnabled": false, | ||
"python.linting.mypyPath": "${workspaceFolder}/.venv/Scripts/mypy.exe", | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.pylintPath": "${workspaceFolder}/.venv/Scripts/pylint.exe", | ||
"python.terminal.activateEnvInCurrentTerminal": true, | ||
"python.terminal.activateEnvironment": true, | ||
"python.testing.pytestArgs": [ | ||
"${workspaceFolder}/tests" | ||
], | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.pytestPath": "${workspaceFolder}/.venv/Scripts/pytest.exe", | ||
"restructuredtext.linter.rstcheck.executablePath": "${workspaceFolder}/.venv/Scripts/rstcheck.exe", | ||
"trailing-spaces.syntaxIgnore": [ | ||
"markdown" | ||
] | ||
} |
Oops, something went wrong.