This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 334
Enable mypy in CI #1101
Merged
Andrew-Chen-Wang
merged 19 commits into
aio-libs-abandoned:master
from
Dreamsorcerer:mypy
Oct 31, 2021
Merged
Enable mypy in CI #1101
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5dbe8c5
Enable mypy in CI
Dreamsorcerer 9656b42
Add change file.
Dreamsorcerer fe7547d
Lint
Dreamsorcerer 68add8b
Show diff in CI.
Dreamsorcerer f8d83df
Black
Dreamsorcerer ed06034
Readd "unreachable" code.
Dreamsorcerer bea076b
Fix typing for ConnectionError.
Dreamsorcerer 8617538
Black
Dreamsorcerer e8e21a4
Add client.py
Dreamsorcerer e7d456d
Fixes
Dreamsorcerer 7011de6
Black
Dreamsorcerer 250e6ed
Imports
Dreamsorcerer 8aff9bb
Simplify cmds.
Dreamsorcerer ae2dfa6
Simplify cmds further.
Dreamsorcerer f613529
Give up
Dreamsorcerer f5a8e80
Fix
Dreamsorcerer 792bfb0
Rename to _Sentinel.
Dreamsorcerer e78801b
Move self.encoder check.
Dreamsorcerer 6180fa8
More precise type for auth_args.
Dreamsorcerer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[mypy] | ||
#, docs/examples, tests | ||
files = aioredis | ||
check_untyped_defs = True | ||
follow_imports_for_stubs = True | ||
#disallow_any_decorated = True | ||
#disallow_any_generics = True | ||
#disallow_incomplete_defs = True | ||
disallow_subclassing_any = True | ||
#disallow_untyped_calls = True | ||
disallow_untyped_decorators = True | ||
#disallow_untyped_defs = True | ||
implicit_reexport = False | ||
no_implicit_optional = True | ||
show_error_codes = True | ||
strict_equality = True | ||
warn_incomplete_stub = True | ||
warn_redundant_casts = True | ||
warn_unreachable = True | ||
warn_unused_ignores = True | ||
disallow_any_unimported = True | ||
#warn_return_any = True | ||
|
||
[mypy-aioredis.client] | ||
# TODO: Fix | ||
ignore_errors = True | ||
|
||
[mypy-aioredis.lock] | ||
# TODO: Remove once locks has been rewritten | ||
ignore_errors = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Enable Mypy in CI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# flake8: noqa | ||
try: | ||
from typing import Protocol, TypedDict # lgtm [py/unused-import] | ||
except ImportError: | ||
from typing_extensions import Protocol, TypedDict # lgtm [py/unused-import] | ||
import sys | ||
|
||
if sys.version_info >= (3, 8): | ||
from typing import Protocol, TypedDict | ||
else: | ||
from typing_extensions import Protocol, TypedDict | ||
|
||
__all__ = ("Protocol", "TypedDict") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out things are to be enabled in future PRs.