commitizen-py3.13➜ commitizen git:(master) mypy commitizen/ tests/
commitizen/config/base_config.py:10: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/config/base_config.py:12: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/exceptions.py:45: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:96: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:98: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:100: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:101: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:102: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:104: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:114: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:115: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:116: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:141: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:142: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:164: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:165: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:168: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:229: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
Success: no issues found in 109 source files
commitizen-py3.13➜ commitizen git:(master) mypy --disallow-untyped-defs commitizen
commitizen/out.py:11: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/out.py:16: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/out.py:36: error: Function is missing a return type annotation [no-untyped-def]
commitizen/config/base_config.py:9: error: Function is missing a return type annotation [no-untyped-def]
commitizen/config/base_config.py:9: note: Use "-> None" if function does not return a value
commitizen/config/base_config.py:10: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/config/base_config.py:12: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/config/base_config.py:22: error: Function is missing a type annotation [no-untyped-def]
commitizen/providers/base_provider.py:32: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/base_provider.py:61: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/base_provider.py:69: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/base_provider.py:82: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/base_provider.py:90: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/poetry_provider.py:18: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/commitizen_provider.py:14: error: Function is missing a return type annotation [no-untyped-def]
commitizen/providers/cargo_provider.py:31: error: Function is missing a return type annotation [no-untyped-def]
commitizen/exceptions.py:43: error: Function is missing a type annotation [no-untyped-def]
commitizen/exceptions.py:45: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/exceptions.py:53: error: Function is missing a type annotation [no-untyped-def]
commitizen/exceptions.py:60: error: Function is missing a type annotation [no-untyped-def]
commitizen/cmd.py:31: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/git.py:39: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/git.py:46: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/git.py:63: error: Function is missing a return type annotation [no-untyped-def]
commitizen/git.py:66: error: Function is missing a type annotation [no-untyped-def]
commitizen/git.py:71: error: Function is missing a type annotation [no-untyped-def]
commitizen/git.py:76: error: Function is missing a type annotation [no-untyped-def]
commitizen/git.py:80: error: Function is missing a return type annotation [no-untyped-def]
commitizen/git.py:163: error: Function is missing a return type annotation [no-untyped-def]
commitizen/git.py:291: error: Function is missing a type annotation [no-untyped-def]
commitizen/cz/base.py:79: error: Function is missing a return type annotation [no-untyped-def]
commitizen/hooks.py:9: error: Function is missing a type annotation [no-untyped-def]
commitizen/config/yaml_config.py:20: error: Function is missing a return type annotation [no-untyped-def]
commitizen/config/yaml_config.py:20: note: Use "-> None" if function does not return a value
commitizen/config/yaml_config.py:44: error: Function is missing a type annotation [no-untyped-def]
commitizen/config/toml_config.py:20: error: Function is missing a return type annotation [no-untyped-def]
commitizen/config/toml_config.py:20: note: Use "-> None" if function does not return a value
commitizen/config/toml_config.py:33: error: Function is missing a type annotation [no-untyped-def]
commitizen/config/json_config.py:19: error: Function is missing a return type annotation [no-untyped-def]
commitizen/config/json_config.py:19: note: Use "-> None" if function does not return a value
commitizen/config/json_config.py:23: error: Function is missing a type annotation [no-untyped-def]
commitizen/cz/utils.py:9: error: Function is missing a type annotation [no-untyped-def]
commitizen/cz/utils.py:15: error: Function is missing a type annotation [no-untyped-def]
commitizen/changelog.py:66: error: Function is missing a return type annotation [no-untyped-def]
commitizen/changelog.py:66: note: Use "-> None" if function does not return a value
commitizen/changelog.py:166: error: Function is missing a return type annotation [no-untyped-def]
commitizen/changelog.py:221: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/providers/scm_provider.py:26: error: Function is missing a return type annotation [no-untyped-def]
commitizen/cz/conventional_commits/conventional_commits.py:12: error: Function is missing a type annotation [no-untyped-def]
commitizen/cz/conventional_commits/conventional_commits.py:23: error: Function is missing a type annotation [no-untyped-def]
commitizen/commands/list_cz.py:9: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/list_cz.py:12: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/list_cz.py:12: note: Use "-> None" if function does not return a value
commitizen/commands/schema.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/schema.py:12: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/schema.py:12: note: Use "-> None" if function does not return a value
commitizen/commands/init.py:82: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/init.py:88: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/init.py:88: note: Use "-> None" if function does not return a value
commitizen/commands/init.py:210: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/init.py:305: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/init.py:326: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/init.py:372: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/info.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/info.py:12: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/info.py:12: note: Use "-> None" if function does not return a value
commitizen/commands/example.py:8: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/example.py:12: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/example.py:12: note: Use "-> None" if function does not return a value
commitizen/commands/commit.py:95: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/commit.py:95: note: Use "-> None" if function does not return a value
commitizen/commands/commit.py:96: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:98: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:100: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:101: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:102: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:104: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:114: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:115: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:116: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:141: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/commit.py:142: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/check.py:20: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/check.py:51: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/check.py:51: note: Use "-> None" if function does not return a value
commitizen/commands/check.py:64: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/check.py:64: note: Use "-> None" if function does not return a value
commitizen/commands/check.py:100: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/version.py:13: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/version.py:19: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/version.py:19: note: Use "-> None" if function does not return a value
commitizen/commands/changelog.py:31: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/commands/changelog.py:135: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/changelog.py:153: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/changelog.py:153: note: Use "-> None" if function does not return a value
commitizen/commands/changelog.py:158: error: Function is missing a return type annotation [no-untyped-def]
commitizen/commands/changelog.py:164: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:165: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:168: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/commands/changelog.py:229: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
commitizen/cli.py:47: error: Function is missing a return type annotation [no-untyped-def]
commitizen/cli.py:552: error: Function is missing a return type annotation [no-untyped-def]
commitizen/cli.py:552: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
commitizen/cli.py:598: error: Function is missing a return type annotation [no-untyped-def]
commitizen/cli.py:598: note: Use "-> None" if function does not return a value
Found 71 errors in 28 files (checked 57 source files)
Uh oh!
There was an error while loading. Please reload this page.
Description
possible_tagsaset[str]to avoid linear-time search for each candidate tag.Sequencetolist) and make the parameter type as abstract as possible (e.g. fromlisttoSequenceorIterable)smart_open.# type: ignoreto bypassmypycheck. We can address those potential errors in the future?castalso for bypassingmypycheck.ruffrules more strict.commands.Note that I didn't run
mypy --disallow-untyped-defs tests/because typingtests/does not help much for development.Before (4b6b3fb)
Very long error messages after running mypy
After
Checklist
Code Changes
poetry alllocally to ensure this change passes linter check and tests