Skip to content

Commit

Permalink
Simplify the mypy config
Browse files Browse the repository at this point in the history
  • Loading branch information
DMRobertson committed Dec 23, 2021
1 parent 77af583 commit 192a70b
Showing 1 changed file with 5 additions and 40 deletions.
45 changes: 5 additions & 40 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,9 @@ warn_unreachable = true
no_implicit_reexport = true
strict_equality = true

# Include test files manually for now. Can tidy up later.
files = [
"src/nacl",
"tests/test_aead.py",
"tests/test_bindings.py",
"tests/test_box.py",
"tests/test_encoding.py",
"tests/test_exc.py",
"tests/test_generichash.py",
"tests/test_hash.py",
"tests/test_hashlib_scrypt.py",
"tests/test_kx.py",
"tests/test_public.py",
"tests/test_pwhash.py",
"tests/test_sealed_box.py",
"tests/test_secret.py",
"tests/test_secretstream.py",
"tests/test_shorthash.py",
"tests/test_signing.py",
"tests/test_utils.py",
"tests/utils.py",
"tests",
]

[[tool.mypy.overrides]]
Expand All @@ -81,30 +63,13 @@ module = [
disallow_any_expr = false
warn_return_any = false

# Loosen some of the checks within the tests.
# For now this is an explicit list rather than a wildcard "test.*", to make
# it a little easier to run the strict checks on modules first. We can clean
# this up later. Note that we _do_ run the strict checks on `test.utils`.
# Loosen some of the checks within the tests. Note that `tests.utils` passes with the
# strict checks on, but it's included here in the list of modules with looser checks
# to keep mypy's config simple(r).

[[tool.mypy.overrides]]
module = [
"tests.test_aead",
"tests.test_bindings",
"tests.test_box",
"tests.test_encoding",
"tests.test_exc",
"tests.test_generichash",
"tests.test_hash",
"tests.test_hashlib_scrypt",
"tests.test_kx",
"tests.test_public",
"tests.test_pwhash",
"tests.test_signing",
"tests.test_sealed_box",
"tests.test_secret",
"tests.test_secretstream",
"tests.test_shorthash",
"tests.test_utils",
"tests.*",
]
# Some library helpers types' involve `Any`, in particular `pytest.mark.parameterize`
# and `hypothesis.strategies.sampledfrom`.
Expand Down

0 comments on commit 192a70b

Please sign in to comment.