diff --git a/gitlab/v4/objects/appearance.py b/gitlab/v4/objects/appearance.py index 88ab6215d..f811d2053 100644 --- a/gitlab/v4/objects/appearance.py +++ b/gitlab/v4/objects/appearance.py @@ -38,7 +38,7 @@ class ApplicationAppearanceManager(GetWithoutIdMixin, UpdateMixin, RESTManager): def update( self, id: Optional[Union[str, int]] = None, - new_data: Dict[str, Any] = None, + new_data: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> Dict[str, Any]: """Update an object on the server. diff --git a/gitlab/v4/objects/repositories.py b/gitlab/v4/objects/repositories.py index b8dbdd8af..b340e80fb 100644 --- a/gitlab/v4/objects/repositories.py +++ b/gitlab/v4/objects/repositories.py @@ -196,7 +196,7 @@ def repository_contributors( @exc.on_http_error(exc.GitlabListError) def repository_archive( self, - sha: str = None, + sha: Optional[str] = None, streamed: bool = False, action: Optional[Callable[..., Any]] = None, chunk_size: int = 1024, diff --git a/gitlab/v4/objects/settings.py b/gitlab/v4/objects/settings.py index 16b1041c5..cc6b1c0b6 100644 --- a/gitlab/v4/objects/settings.py +++ b/gitlab/v4/objects/settings.py @@ -93,7 +93,7 @@ class ApplicationSettingsManager(GetWithoutIdMixin, UpdateMixin, RESTManager): def update( self, id: Optional[Union[str, int]] = None, - new_data: Dict[str, Any] = None, + new_data: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> Dict[str, Any]: """Update an object on the server. diff --git a/pyproject.toml b/pyproject.toml index 544543bc8..a8b02200f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ disallow_incomplete_defs = true disallow_subclassing_any = true disallow_untyped_decorators = true disallow_untyped_defs = true +no_implicit_optional = true no_implicit_reexport = true strict_equality = true warn_redundant_casts = true @@ -23,7 +24,6 @@ warn_unused_ignores = true # The following need to have changes made to be able to enable them: # disallow_any_generics = true # disallow_untyped_calls = true -# no_implicit_optional = true [[tool.mypy.overrides]] # Overrides for currently untyped modules module = [