Skip to content

Tests errors in command/__init.py__ #285

@christian-hawk

Description

@christian-hawk

Description

Errors being raised on tests, also breaks github actions on pull request (even if test passes)

Steps to reproduce

  1. git clone https://github.com/commitizen-tools/commitizen.git
  2. cd commitizen
  3. poetry install
  4. pre-commit install -t pre-commit -t pre-push -t commit-msg
  5. `poetry run scripts/test

Current behavior

============================= 262 passed in 7.07s ==============================
All done! ✨ 🍰 ✨
65 files would be left unchanged.
commitizen/commands/init.py:50: error: Argument "choices" to "select" has incompatible type "List[str]"; expected "List[Union[str, Choice, Dict[str, Any]]]"
commitizen/commands/init.py:50: note: "List" is invariant -- see http://mypy.readthedocs.io/en/latest/common_issues.html#variance
commitizen/commands/init.py:50: note: Consider using "Sequence" instead, which is covariant
commitizen/commands/init.py:82: error: Argument "choices" to "select" has incompatible type "Optional[List[str]]"; expected "List[Union[str, Choice, Dict[str, Any]]]"
Found 2 errors in 1 file (checked 57 source files)

Desired behavior

Test passes with no error

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment

  • cz version: 2.4.1
  • python: 3.6.9
  • Linux (Ubuntu 18.04 LTS)

The github actions happens also in my PR #284

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions