mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 08:40:34 +03:00
pre-commit: pre-commit runs mypy *in its own venv*
As such it doesn't have access to any extra modules you installed for your program, or manually running `mypy <file>`. So, leverage `additional_dependencies` to list anything that mypy ends up complaining "that's not installed". Ref: plugins\eddn.py:40: error: Library stubs not installed for "requests" (or incompatible with Python 3.10) plugins\eddn.py:40: note: Hint: "python3 -m pip install types-requests" plugins\eddn.py:40: note: (or run "mypy --install-types" to install all missing stub packages) plugins\eddn.py:40: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 1 source file)
This commit is contained in:
parent
4766f817fd
commit
67c2077962
@ -1,6 +1,11 @@
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
# This can be used to check how pre-commit is being run
|
||||
# - repo: meta
|
||||
# hooks:
|
||||
# - id: identity
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: 'v4.1.0'
|
||||
hooks:
|
||||
@ -44,6 +49,9 @@ repos:
|
||||
rev: 'v0.931'
|
||||
hooks:
|
||||
- id: mypy
|
||||
# verbose: true
|
||||
# log_file: 'pre-commit_mypy.log'
|
||||
additional_dependencies: [ types-requests ]
|
||||
# args: [ "--follow-imports", "skip", "--ignore-missing-imports", "--scripts-are-modules" ]
|
||||
|
||||
### # pydocstyle.exe <file>
|
||||
|
Loading…
x
Reference in New Issue
Block a user