Skip to content

Commit ce05562

Browse files
committed
style: add -> None to __init__
1 parent ea22ca4 commit ce05562

File tree

20 files changed

+22
-22
lines changed

20 files changed

+22
-22
lines changed

commitizen/changelog_formats/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ChangelogFormat(Protocol):
2525

2626
config: BaseConfig
2727

28-
def __init__(self, config: BaseConfig):
28+
def __init__(self, config: BaseConfig) -> None:
2929
self.config = config
3030

3131
@property

commitizen/changelog_formats/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class BaseFormat(ChangelogFormat, metaclass=ABCMeta):
2020
extension: ClassVar[str] = ""
2121
alternative_extensions: ClassVar[set[str]] = set()
2222

23-
def __init__(self, config: BaseConfig):
23+
def __init__(self, config: BaseConfig) -> None:
2424
# Constructor needs to be redefined because `Protocol` prevent instantiation by default
2525
# See: https://bugs.python.org/issue44807
2626
self.config = config

commitizen/commands/bump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
class Bump:
4141
"""Show prompt for the user to create a guided commit."""
4242

43-
def __init__(self, config: BaseConfig, arguments: dict):
43+
def __init__(self, config: BaseConfig, arguments: dict) -> None:
4444
if not git.is_git_project():
4545
raise NotAGitProjectError()
4646

commitizen/commands/changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
class Changelog:
3030
"""Generate a changelog based on the commit history."""
3131

32-
def __init__(self, config: BaseConfig, args: Mapping[str, Any]):
32+
def __init__(self, config: BaseConfig, args: Mapping[str, Any]) -> None:
3333
if not git.is_git_project():
3434
raise NotAGitProjectError()
3535

commitizen/commands/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Check:
1919

2020
def __init__(
2121
self, config: BaseConfig, arguments: dict[str, Any], cwd: str = os.getcwd()
22-
):
22+
) -> None:
2323
"""Initial check command.
2424
2525
Args:

commitizen/commands/commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
class Commit:
3232
"""Show prompt for the user to create a guided commit."""
3333

34-
def __init__(self, config: BaseConfig, arguments: dict):
34+
def __init__(self, config: BaseConfig, arguments: dict) -> None:
3535
if not git.is_git_project():
3636
raise NotAGitProjectError()
3737

commitizen/commands/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class Example:
66
"""Show an example so people understands the rules."""
77

8-
def __init__(self, config: BaseConfig, *args: object):
8+
def __init__(self, config: BaseConfig, *args: object) -> None:
99
self.config: BaseConfig = config
1010
self.cz = factory.committer_factory(self.config)
1111

commitizen/commands/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class Info:
66
"""Show in depth explanation of your rules."""
77

8-
def __init__(self, config: BaseConfig, *args: object):
8+
def __init__(self, config: BaseConfig, *args: object) -> None:
99
self.config: BaseConfig = config
1010
self.cz = factory.committer_factory(self.config)
1111

commitizen/commands/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def is_pre_commit_installed(self) -> bool:
7979

8080

8181
class Init:
82-
def __init__(self, config: BaseConfig, *args: object):
82+
def __init__(self, config: BaseConfig, *args: object) -> None:
8383
self.config: BaseConfig = config
8484
self.encoding = config.settings["encoding"]
8585
self.cz = factory.committer_factory(self.config)

commitizen/commands/list_cz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class ListCz:
77
"""List currently installed rules."""
88

9-
def __init__(self, config: BaseConfig, *args: object):
9+
def __init__(self, config: BaseConfig, *args: object) -> None:
1010
self.config: BaseConfig = config
1111

1212
def __call__(self) -> None:

0 commit comments

Comments
 (0)