Skip to content

refactor: improve types and avoid nested loop, add types for untyped functions #1466

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 30 commits into from
Jun 8, 2025
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f4b81b7
style(tags): improve types
bearomorphism May 29, 2025
8b4a5fd
perf(tags): use set
bearomorphism May 29, 2025
51fdc4f
refactor: fix mypy output and better type
bearomorphism May 29, 2025
2ec92cc
refactor(conventional_commits): remove unnecessary checks
bearomorphism May 29, 2025
7ca5f79
refactor: make methods protected, better type
bearomorphism May 30, 2025
7179dd3
style: remove unnecessary noqa
bearomorphism May 30, 2025
9b13386
style: type untyped methods
bearomorphism May 30, 2025
b999189
style: remove Union
bearomorphism May 30, 2025
ea22ca4
style: better type
bearomorphism May 30, 2025
ce05562
style: add `-> None` to __init__
bearomorphism May 30, 2025
28ac03b
build(ruff,mypy): more strict rules
bearomorphism May 30, 2025
95c50e3
fix(BaseConfig): mypy error
bearomorphism May 31, 2025
32836b2
build(mypy): remove disallow_untyped_defs because it's already done b…
bearomorphism May 31, 2025
f0bdd55
refactor(bump): TypedDict for bump argument
bearomorphism May 30, 2025
32d7adb
refactor(changelog): type untyped arguments
bearomorphism May 31, 2025
a4b9ae9
refactor(check): remove unused argument
bearomorphism May 31, 2025
0493765
style(bump): rename class for consistency
bearomorphism May 31, 2025
e67ba23
refactor(check): type CheckArgs arguments
bearomorphism May 31, 2025
1f8c4bc
refactor(commit): type commit args
bearomorphism May 31, 2025
f771da3
refactor(commands): remove unused args, type version command args
bearomorphism May 31, 2025
d72e7ec
style(cli): shorten arg type
bearomorphism May 31, 2025
8562209
docs(bump): comment on a stupid looking pattern
bearomorphism May 31, 2025
9b99924
fix(Check): make parameters backward compatiable
bearomorphism May 31, 2025
92a92bc
style(changelog): rename parameter for consistency
bearomorphism May 31, 2025
95a9140
refactor(bump): improve readability and still bypass mypy check
bearomorphism May 31, 2025
19efaa8
refactor: remove unnecessary bool() and remove Any type from TypedDic…
bearomorphism May 31, 2025
38fe5bf
style(changelog): add TODO to fixable type ignores
bearomorphism Jun 4, 2025
24c8201
style(cli): more specific type ignore
bearomorphism Jun 4, 2025
ac9e742
style(cli): rename kwarg to values
bearomorphism Jun 4, 2025
667efef
refactor(bump): use any to replace 'or' chain
bearomorphism Jun 6, 2025
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
Prev Previous commit
Next Next commit
style(cli): shorten arg type
  • Loading branch information
bearomorphism committed May 31, 2025
commit d72e7ec581c44db0a2589bd68cc93b7e1de43770
3 changes: 1 addition & 2 deletions commitizen/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import argparse
import logging
import sys
from collections.abc import Sequence
from copy import deepcopy
from functools import partial
from pathlib import Path
Expand Down Expand Up @@ -48,7 +47,7 @@ def __call__(
self,
parser: argparse.ArgumentParser,
namespace: argparse.Namespace,
kwarg: str | Sequence[object] | None,
kwarg: object,
option_string: str | None = None,
) -> None:
if not isinstance(kwarg, str):
Expand Down