-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge original typing from types-redis, adapt it for valkey.
Signed-off-by: Raphaël Vinot <[email protected]>
- Loading branch information
Showing
71 changed files
with
17,592 additions
and
484 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Python application | ||
|
||
on: | ||
push: | ||
branches: [ types ] | ||
pull_request: | ||
branches: [ types ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{matrix.python-version}} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
|
||
- name: Install package | ||
run: | | ||
pip install mypy cryptography pyopenssl requests | ||
pip install types-setuptools | ||
pip install types-cachetools | ||
pip install -r dev_requirements.txt | ||
pip install .[libvalkey] | ||
- name: Run MyPy | ||
run: | | ||
mypy --exclude build . |
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,24 +1,63 @@ | ||
[mypy] | ||
#, docs/examples, tests | ||
files = valkey | ||
check_untyped_defs = True | ||
follow_imports_for_stubs asyncio.= True | ||
#disallow_any_decorated = 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-valkey.asyncio.lock] | ||
# TODO: Remove once locks has been rewritten | ||
strict = True | ||
show_error_context = True | ||
pretty = True | ||
exclude = docs|build | ||
|
||
# These next few are various gradations of forcing use of type annotations | ||
disallow_untyped_calls = False | ||
disallow_incomplete_defs = False | ||
disallow_untyped_defs = False | ||
|
||
# This one can be tricky to get passing if you use a lot of untyped libraries | ||
warn_return_any = False | ||
|
||
[mypy-valkey._parsers.*] | ||
ignore_errors = True | ||
|
||
[mypy-valkey._cache] | ||
ignore_errors = True | ||
|
||
[mypy-tests.*] | ||
ignore_errors = True | ||
[mypy-tests.test_bloom] | ||
ignore_errors = False | ||
[mypy-tests.test_asyncio.test_bloom] | ||
ignore_errors = False | ||
[mypy-tests.test_cache] | ||
ignore_errors = False | ||
[mypy-tests.test_asyncio.test_cache] | ||
ignore_errors = False | ||
[mypy-tests.test_commands] | ||
ignore_errors = False | ||
[mypy-tests.test_asyncio.test_commands] | ||
ignore_errors = False | ||
#[mypy-tests.test_cluster] | ||
#ignore_errors = False | ||
#[mypy-tests.test_asyncio.test_cluster] | ||
#ignore_errors = False | ||
#[mypy-tests.test_connection_pool] | ||
#ignore_errors = False | ||
#[mypy-tests.test_asyncio.test_connection_pool] | ||
#ignore_errors = False | ||
#[mypy-tests.test_connection] | ||
#ignore_errors = False | ||
#[mypy-tests.test_asyncio.test_connection] | ||
#ignore_errors = False | ||
[mypy-tests.test_pipeline] | ||
ignore_errors = False | ||
[mypy-tests.test_asyncio.test_pipeline] | ||
ignore_errors = False | ||
[mypy-tests.test_pubsub] | ||
ignore_errors = False | ||
[mypy-tests.test_asyncio.test_pubsub] | ||
ignore_errors = False | ||
|
||
[mypy-benchmarks.*] | ||
ignore_errors = True | ||
|
||
[mypy-whitelist] | ||
ignore_errors = True | ||
|
||
[mypy-tasks] | ||
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
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
Oops, something went wrong.