Skip to content

chore: update to mypy 1.16.0 and resolve issues found #3215

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

Merged
merged 1 commit into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitlab/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def gitlab_resource_to_cls(
return class_type


def cls_to_gitlab_resource(cls: RESTObject) -> str:
def cls_to_gitlab_resource(cls: type[RESTObject]) -> str:
dasherized_uppercase = camel_upperlower_regex.sub(r"\1-\2", cls.__name__)
dasherized_lowercase = camel_lowerupper_regex.sub(r"\1-\2", dasherized_uppercase)
return dasherized_lowercase.lower()
Expand Down
2 changes: 1 addition & 1 deletion gitlab/v4/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def extend_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
subparsers.required = True

# populate argparse for all Gitlab Object
classes = set()
classes: set[type[gitlab.base.RESTObject]] = set()
for cls in gitlab.v4.objects.__dict__.values():
if not isinstance(cls, type):
continue
Expand Down
2 changes: 1 addition & 1 deletion requirements-lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ black==25.1.0
commitizen==4.8.2
flake8==7.2.0
isort==6.0.1
mypy==1.15.0
mypy==1.16.0
pylint==3.3.7
pytest==8.3.5
responses==0.25.7
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def error(self, message):
"Raise error instead of exiting on invalid arguments, to make testing easier"
raise ValueError(message)

class Fake:
class Fake(gitlab.base.RESTObject):
_id_attr = None

class FakeManager(CreateMixin, UpdateMixin, gitlab.base.RESTManager):
Expand Down