Skip to content

Missing types in v1.16 #1322

Open
Open
@sathieu

Description

The addition of #1310 made my CI fail with the following:

gitlabracadabra/gitlab/pygit2.py:84: error: Call to untyped function "UserPass" in typed context  [no-untyped-call]
gitlabracadabra/gitlab/pygit2.py:86: error: Call to untyped function "UserPass" in typed context  [no-untyped-call]
gitlabracadabra/gitlab/pygit2.py:88: error: Call to untyped function "UserPass" in typed context  [no-untyped-call]
gitlabracadabra/gitlab/pygit2.py:90: error: Call to untyped function "UserPass" in typed context  [no-untyped-call]
gitlabracadabra/gitlab/pygit2.py:100: error: Call to untyped function "RemoteCallbacks" in typed context  [no-untyped-call]
gitlabracadabra/gitlab/pygit2.py:101: error: Cannot assign to a method  [method-assign]
gitlabracadabra/gitlab/pygit2.py:101: error: Incompatible types in assignment (expression has type "Callable[[str, str | None, CredentialType], UserPass]", variable has type "Callable[[str, str | None, CredentialType], Any]")  [assignment]
gitlabracadabra/gitlab/pygit2.py:103: error: Cannot assign to a method  [method-assign]
gitlabracadabra/objects/object.py:71: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
gitlabracadabra/mixins/mirrors.py:57: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:59: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:64: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:65: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:66: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:67: error: "Repository" has no attribute "config"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:82: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:83: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:89: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:90: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:106: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:108: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:142: error: Incompatible types in assignment (expression has type "None", variable has type "str")  [assignment]
gitlabracadabra/mixins/mirrors.py:161: error: Statement is unreachable  [unreachable]
gitlabracadabra/mixins/mirrors.py:166: error: "Repository" has no attribute "config"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:168: error: "Repository" has no attribute "config"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:170: error: All overload variants of "peel" of "Reference" require at least one argument  [call-overload]
gitlabracadabra/mixins/mirrors.py:170: note: Possible overload variants:
gitlabracadabra/mixins/mirrors.py:170: note:     def peel(self, type: Any) -> Commit
gitlabracadabra/mixins/mirrors.py:170: note:     def peel(self, type: Any) -> Tree
gitlabracadabra/mixins/mirrors.py:170: note:     def peel(self, type: Any) -> Tag
gitlabracadabra/mixins/mirrors.py:170: note:     def peel(self, type: Any) -> Blob
gitlabracadabra/mixins/mirrors.py:170: note:     def peel(self, type: None) -> Commit | Tree | Blob
gitlabracadabra/mixins/mirrors.py:171: error: "Repository" has no attribute "references"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:221: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:223: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:224: error: "Repository" has no attribute "remotes"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:225: error: "Repository" has no attribute "config"  [attr-defined]
gitlabracadabra/mixins/mirrors.py:231: error: "Repository" has no attribute "references"  [attr-defined]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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