Skip to content

Commit d40e9f2

Browse files
committed
refactor(version): rename class member to align with other classes
1 parent 0a3b9cd commit d40e9f2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

commitizen/commands/version.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ class Version:
2929

3030
def __init__(self, config: BaseConfig, arguments: VersionArgs) -> None:
3131
self.config: BaseConfig = config
32-
self.parameter = arguments
32+
self.arguments = arguments
3333

3434
def __call__(self) -> None:
35-
if self.parameter.get("report"):
35+
if self.arguments.get("report"):
3636
out.write(f"Commitizen Version: {__version__}")
3737
out.write(f"Python Version: {sys.version}")
3838
out.write(f"Operating System: {platform.system()}")
3939
return
4040

41-
if self.parameter.get("verbose"):
41+
if self.arguments.get("verbose"):
4242
out.write(f"Installed Commitizen Version: {__version__}")
4343

44-
if not self.parameter.get("commitizen") and (
45-
self.parameter.get("project") or self.parameter.get("verbose")
44+
if not self.arguments.get("commitizen") and (
45+
self.arguments.get("project") or self.arguments.get("verbose")
4646
):
4747
try:
4848
version = get_provider(self.config).get_version()
@@ -55,19 +55,19 @@ def __call__(self) -> None:
5555
out.error("Unknown version scheme.")
5656
return
5757

58-
if self.parameter.get("major"):
58+
if self.arguments.get("major"):
5959
version = f"{version_scheme.major}"
60-
elif self.parameter.get("minor"):
60+
elif self.arguments.get("minor"):
6161
version = f"{version_scheme.minor}"
6262

6363
out.write(
6464
f"Project Version: {version}"
65-
if self.parameter.get("verbose")
65+
if self.arguments.get("verbose")
6666
else version
6767
)
6868
return
6969

70-
if self.parameter.get("major") or self.parameter.get("minor"):
70+
if self.arguments.get("major") or self.arguments.get("minor"):
7171
out.error(
7272
"Major or minor version can only be used with --project or --verbose."
7373
)

0 commit comments

Comments
 (0)