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

Fix mypy errors in shuttle.py #196

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Fix mypy errors in shuttle.py #196

merged 1 commit into from
Aug 25, 2024

Conversation

tianyizheng02
Copy link
Contributor

Run mypy with --strict flag and fix resulting mypy errors in shuttle.py

Contributes to #45 by fixing existing type hint errors prior to introducing mypy to the repo.

Before:

> mypy --strict pittapi/shuttle.py
pittapi/shuttle.py:37: error: Returning Any from function declared to return "dict[str, Any]"  [no-any-return]
pittapi/shuttle.py:43: error: Argument "params" to "get" of "Session" has incompatible type "dict[str, object]"; expected "SupportsItems[str | bytes | int | float, str | bytes | int | float | Iterable[str | bytes | int | float] | None] | tuple[str | bytes | int | float, str | bytes | int | float | Iterable[str | bytes | int | float] | None] | Iterable[tuple[str | bytes | int | float, str | bytes | int | float | Iterable[str | bytes | int | float] | None]] | str | bytes | None"  [arg-type]
pittapi/shuttle.py:44: error: Returning Any from function declared to return "dict[str, Any]"  [no-any-return]
pittapi/shuttle.py:51: error: Returning Any from function declared to return "dict[str, Any]"  [no-any-return]
pittapi/shuttle.py:58: error: Returning Any from function declared to return "dict[str, Any]"  [no-any-return]
Found 5 errors in 1 file (checked 1 source file)

After:

> mypy --strict pittapi/shuttle.py        
Success: no issues found in 1 source file

@tianyizheng02 tianyizheng02 merged commit 39f1fbd into dev Aug 25, 2024
4 checks passed
@tianyizheng02 tianyizheng02 deleted the mypy-shuttle branch August 25, 2024 21:52
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