From 2306f68b87c5f7eecbd838db900a2d3685b81b3c Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Sat, 10 Dec 2022 17:44:04 +0200 Subject: Make mypy configuration stricter and improve typing (#830) * PyJWS._verify_signature: raise early KeyError if header is missing alg * Make Mypy configuration stricter * Improve typing in jwt.utils * Improve typing in jwt.help * Improve typing in jwt.exceptions * Improve typing in jwt.api_jwk * Improve typing in jwt.api_jws * Improve typing & clean up imports in jwt.algorithms * Correct JWS.decode rettype to any (payload could be something else) * Update typing in api_jwt * Improve typing in jwks_client * Improve typing in docs/conf.py * Fix (benign) mistyping in test_advisory * Fix misc type complaints in tests --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pyproject.toml') diff --git a/pyproject.toml b/pyproject.toml index f406505..e7920ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,3 +23,11 @@ python_version = 3.7 ignore_missing_imports = true warn_unused_ignores = true no_implicit_optional = true +strict = true +# TODO: remove these strict loosenings when possible +allow_incomplete_defs = true +allow_untyped_defs = true + +[[tool.mypy.overrides]] +module = "tests.*" +disallow_untyped_calls = false -- cgit v1.2.1