Skip to content

chore(tests): remove type errors#338

Merged
radoering merged 2 commits into
python-poetry:masterfrom
branchv:mypy/tests
May 1, 2022
Merged

chore(tests): remove type errors#338
radoering merged 2 commits into
python-poetry:masterfrom
branchv:mypy/tests

Conversation

@branchv
Copy link
Copy Markdown
Member

@branchv branchv commented May 1, 2022

Removes tests from mypy's ignored list

The first commit 9f8ffc2 fixes type issues, while the second 81bfebd just adds explicit return types -> None

dependency = Dependency("foo", "^1.2.3")

dependency.marker = 'python_version >= "3.6" and python_version < "4.0"'
dependency.marker = 'python_version >= "3.6" and python_version < "4.0"' # type: ignore[assignment]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an issue with marker's setter accepting the union str | BaseMarker and mypy not being able to understand: python/mypy#3004

Comment thread pyproject.toml

[[tool.mypy.overrides]]
module = ['tests.*']
disallow_untyped_decorators = false
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only disabled due to pytest not currently being in mypy's environment

needs python-poetry/poetry#5279

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@branchv branchv requested a review from a team May 1, 2022 02:12
@radoering radoering merged commit f26e236 into python-poetry:master May 1, 2022
@branchv branchv deleted the mypy/tests branch May 1, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants