Skip to content
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

mypy: Few simple typing fixes #74

Merged
merged 5 commits into from
Feb 4, 2025
Merged

mypy: Few simple typing fixes #74

merged 5 commits into from
Feb 4, 2025

Conversation

lslebodn
Copy link
Collaborator

@lslebodn lslebodn commented Feb 4, 2025

and also

  • Change order of linters
    black and idiff log diff which need to be applied.
    flak8 does not report diff but can report similar issues.

  • tests: Use plain assert-statements instead of self.assert* functions
    Mypy ignored self.assertIsNotNone and still reported failure Item "None" of "Optional[QueryResponseContainer]" has no attribute "responses" [union-attr]

Tests were automatically converted using: unittest2pytest -f self_assert -w tests/

@lslebodn lslebodn changed the title mypy: Few simple typing fixes Draft: mypy: Few simple typing fixes Feb 4, 2025
@JAVGan
Copy link
Collaborator

JAVGan commented Feb 4, 2025

Seems like the CI is still failing

@lslebodn lslebodn changed the title Draft: mypy: Few simple typing fixes mypy: Few simple typing fixes Feb 4, 2025
@lslebodn
Copy link
Collaborator Author

lslebodn commented Feb 4, 2025

Seems like the CI is still failing

I's green now :-)

Copy link
Collaborator

@JAVGan JAVGan left a comment

Choose a reason for hiding this comment

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

LGTM

Lukas Slebodnik added 5 commits February 4, 2025 16:30
black and idiff log diff which need to be applied.
flak8 does nto report diff but can report similar issues
Migrated using: `unittest2pytest -f self_assert -w tests/`
error: Item "None" of "Optional[QueryResponseContainer]" has no attribute "responses"  [union-attr]

Note: Mypy ignored `self.assertIsNotNone`
tests/test_client.py:43: error: Missing named argument "response" for "HTTPError"  [call-arg]
tests/test_client.py:176: error: Unsupported target for indexed assignment ("Collection[Any]")  [index]
tests/test_client.py:177: error: Unsupported target for indexed assignment ("Collection[Any]")  [index]
@JAVGan JAVGan merged commit e8cb26e into main Feb 4, 2025
22 checks passed
@JAVGan JAVGan deleted the mypy branch February 4, 2025 19:34
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