Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing types in v1.16 #1322

Open
sathieu opened this issue Oct 15, 2024 · 1 comment
Open

Missing types in v1.16 #1322

sathieu opened this issue Oct 15, 2024 · 1 comment

Comments

@sathieu
Copy link
Contributor

sathieu commented Oct 15, 2024

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]
@RileyEv
Copy link

RileyEv commented Oct 15, 2024

Getting the same here

error: "Repository" is not exported from module "pygit2" (reportPrivateImportUsage)

using pyright

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants