Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pre-commit hook for mypy fails #1539

Closed
@antti-mikael

Description

@antti-mikael

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp