Skip to content

Commit 9b42049

Browse files
josixLee-W
andcommitted
refactor: remove redundant return None
Co-authored-by: Wei Lee <[email protected]>
1 parent 9898d3e commit 9b42049

File tree

4 files changed

+67
-63
lines changed

4 files changed

+67
-63
lines changed

commitizen/commands/commit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def prompt_commit_questions(self) -> str:
7575

7676
return message
7777

78-
def force_edit(self, message: str) -> str:
78+
def manual_edit(self, message: str) -> str:
7979
editor = git.get_core_editor()
8080
if editor is None:
8181
raise RuntimeError("No 'editor' value given and no default available.")
@@ -95,7 +95,7 @@ def force_edit(self, message: str) -> str:
9595
def __call__(self):
9696
dry_run: bool = self.arguments.get("dry_run")
9797
write_message_to_file: bool = self.arguments.get("write_message_to_file")
98-
force_edit: bool = self.arguments.get("edit")
98+
manual_edit: bool = self.arguments.get("edit")
9999

100100
is_all: bool = self.arguments.get("all")
101101
if is_all:
@@ -122,8 +122,8 @@ def __call__(self):
122122
else:
123123
m = self.prompt_commit_questions()
124124

125-
if force_edit:
126-
m = self.force_edit(m)
125+
if manual_edit:
126+
m = self.manual_edit(m)
127127

128128
out.info(f"\n{m}\n")
129129

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you're a first-time contributor, you can check the issues with [good first is
2222
(We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.)
2323
7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/).
2424
8. Run `./scripts/format` and `./scripts/test` to ensure you follow the coding style and the tests pass.
25-
9. Optionally, update the `./docs/README.md`.
25+
9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `scripts/gen_cli_help_screenshots.py`).
2626
9. **Do not** update the `CHANGELOG.md`, it will be automatically created after merging to `master`.
2727
10. **Do not** update the versions in the project, they will be automatically updated.
2828
10. If your changes are about documentation. Run `poetry run mkdocs serve` to serve documentation locally and check whether there is any warning or error.

0 commit comments

Comments
 (0)