diff options
-rw-r--r-- | .pre-commit-config.yaml | 4 | ||||
-rw-r--r-- | docs/conf.py | 6 | ||||
-rw-r--r-- | jwt/api_jws.py | 2 | ||||
-rw-r--r-- | jwt/api_jwt.py | 4 | ||||
-rw-r--r-- | tests/test_algorithms.py | 2 | ||||
-rw-r--r-- | tests/test_api_jws.py | 12 |
6 files changed, 15 insertions, 15 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 724e8a0..1e44345 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,9 @@ repos: - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 20.8b1 hooks: - id: black - language_version: python3.8 + args: ["--target-version=py36"] - repo: https://gitlab.com/pycqa/flake8 rev: 3.7.9 diff --git a/docs/conf.py b/docs/conf.py index 42a978d..18a4ecf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,7 +65,7 @@ author = "José Padilla" release = find_version("../jwt/__init__.py") # The short X.Y version. -version = release.rsplit(u".", 1)[0] +version = release.rsplit(".", 1)[0] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -112,7 +112,7 @@ htmlhelp_basename = "PyJWTdoc" # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "pyjwt", u"PyJWT Documentation", [author], 1)] +man_pages = [(master_doc, "pyjwt", "PyJWT Documentation", [author], 1)] # -- Options for Texinfo output ------------------------------------------- @@ -124,7 +124,7 @@ texinfo_documents = [ ( master_doc, "PyJWT", - u"PyJWT Documentation", + "PyJWT Documentation", author, "PyJWT", "One line description of project.", diff --git a/jwt/api_jws.py b/jwt/api_jws.py index 1e00221..83baaab 100644 --- a/jwt/api_jws.py +++ b/jwt/api_jws.py @@ -131,7 +131,7 @@ class PyJWS: algorithms: List[str] = None, options: Dict = None, complete: bool = False, - **kwargs + **kwargs, ): merged_options = merge_dict(self.options, options) diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py index 521cc65..4862580 100644 --- a/jwt/api_jwt.py +++ b/jwt/api_jwt.py @@ -71,7 +71,7 @@ class PyJWT(PyJWS): algorithms: List[str] = None, options: Dict = None, complete: bool = False, - **kwargs + **kwargs, ) -> Dict[str, Any]: if options is None: @@ -90,7 +90,7 @@ class PyJWT(PyJWS): algorithms=algorithms, options=options, complete=complete, - **kwargs + **kwargs, ) try: diff --git a/tests/test_algorithms.py b/tests/test_algorithms.py index 468f58e..145ac92 100644 --- a/tests/test_algorithms.py +++ b/tests/test_algorithms.py @@ -442,7 +442,7 @@ class TestAlgorithms: key = algo.to_jwk(priv_key) expected = { - "key_ops": [u"sign"], + "key_ops": ["sign"], "kty": "RSA", "e": "AQAB", "n": ( diff --git a/tests/test_api_jws.py b/tests/test_api_jws.py index 464cfeb..6b7efa8 100644 --- a/tests/test_api_jws.py +++ b/tests/test_api_jws.py @@ -493,7 +493,7 @@ class TestJWS: # PEM-formatted RSA key with open("tests/keys/testkey_rsa.priv", "r") as rsa_priv_file: priv_rsakey = load_pem_private_key( - force_bytes(rsa_priv_file.read()), password=None, + force_bytes(rsa_priv_file.read()), password=None ) jws_message = jws.encode(payload, priv_rsakey, algorithm="RS256") @@ -518,7 +518,7 @@ class TestJWS: # PEM-formatted RSA key with open("tests/keys/testkey_rsa.priv", "r") as rsa_priv_file: priv_rsakey = load_pem_private_key( - force_bytes(rsa_priv_file.read()), password=None, + force_bytes(rsa_priv_file.read()), password=None ) jws_message = jws.encode(payload, priv_rsakey, algorithm="RS384") @@ -542,7 +542,7 @@ class TestJWS: # PEM-formatted RSA key with open("tests/keys/testkey_rsa.priv", "r") as rsa_priv_file: priv_rsakey = load_pem_private_key( - force_bytes(rsa_priv_file.read()), password=None, + force_bytes(rsa_priv_file.read()), password=None ) jws_message = jws.encode(payload, priv_rsakey, algorithm="RS512") @@ -586,7 +586,7 @@ class TestJWS: # PEM-formatted EC key with open("tests/keys/testkey_ec.priv", "r") as ec_priv_file: priv_eckey = load_pem_private_key( - force_bytes(ec_priv_file.read()), password=None, + force_bytes(ec_priv_file.read()), password=None ) jws_message = jws.encode(payload, priv_eckey, algorithm="ES256") @@ -611,7 +611,7 @@ class TestJWS: # PEM-formatted EC key with open("tests/keys/testkey_ec.priv", "r") as ec_priv_file: priv_eckey = load_pem_private_key( - force_bytes(ec_priv_file.read()), password=None, + force_bytes(ec_priv_file.read()), password=None ) jws_message = jws.encode(payload, priv_eckey, algorithm="ES384") @@ -635,7 +635,7 @@ class TestJWS: # PEM-formatted EC key with open("tests/keys/testkey_ec.priv", "r") as ec_priv_file: priv_eckey = load_pem_private_key( - force_bytes(ec_priv_file.read()), password=None, + force_bytes(ec_priv_file.read()), password=None ) jws_message = jws.encode(payload, priv_eckey, algorithm="ES512") |