- Notifications
You must be signed in to change notification settings - Fork676
Closed
Description
Description of the problem, including code/CLI snippet
$ git status --shortM gitlab/v4/objects/container_registry.py$ git commitblack....................................................................Passedflake8...................................................................Passedisort....................................................................Passedmypy.....................................................................Failed- hook id: mypy-exit code: 1gitlab/v4/objects/ldap.py:20: error: Function is missing atype annotationgitlab/v4/objects/repositories.py:15: error: Function is missing atype annotationgitlab/v4/objects/repositories.py:38: error: Function is missing atype annotation...
Maybe the mypy hook could be configured to ignore missing annotations or warn instead of erring -- at least until the annotations are in place:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 80c8fb8..c69e125 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -24,3 +24,4 @@ repos: rev: v0.812 hooks: - id: mypy+ args: ["--allow-untyped-defs"]
Expected Behavior
I'm able to make commits for files that don't have type annotations.
Actual Behavior
mypy fails for missing function annotations.
Specifications
- python-gitlab version: master (85713bb)
- API version you are using (v3/v4): N/A
- Gitlab server version (or gitlab.com): N/A
Metadata
Metadata
Assignees
Labels
No labels