summaryrefslogtreecommitdiff
path: root/jwt/help.py
Commit message (Collapse)AuthorAgeFilesLines
* Make mypy configuration stricter and improve typing (#830)Aarni Koskela2022-12-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Mypy as pre-commit check + api_jws typing (#787)Julian Maurin2022-08-031-6/+7
| | | | | | | | | * feat(mypy): from tox to pre-commit * fix(mypy): apply mypy fixes * feat(api_jws): typing Co-authored-by: JulianMaurin <julian.maurin@backmarket.com>
* Add type hints to jwt/help.py and add missing types dependency (#784)Kevin Kirsche2022-08-011-5/+6
| | | | | | | * refactor: add type hints to jwt/help.py * refactor: include cryptography types when installing development environment * fix: unused type: ignore on Python 3.8
* Replace various string interpolations with f-strings (#744)Aarni Koskela2022-04-121-4/+4
|
* Prefer ModuleNotFoundError over ImportError (#565)Jon Dufresne2020-12-211-1/+1
| | | | | | | | | | | ModuleNotFoundError was introduced in Python 3. It is raised when the module does not exist. On the other hand, ImportError is raised during any import failure. For example, a syntax error or other runtime error. Using ModuleNotFoundError means that errors unrelated to a missing package will be propagated to the user. PyJWT doesn't know how to handle these. This also allows more functions to always be available for import
* Update typing syntax and usage for Python 3.6+ (#535)Jon Dufresne2020-12-161-1/+1
| | | | | | | | | | | | | | | | | | Now that Python 2 is not supported, can move away from type comments to type annotation 🎉. The typing module is always available, so remove the guards. Specify the supported Python in the mypy configuration. Move other mypy configurations to one place. This way, whether tox is used or not, the same mypy errors appear. Distribute and install PEP-561 compliant py.typed file. When PyJWT is a imported as a library, this tells mypy to use the provided type annotations rather than going through typeshed. This way, the types are always up to date when running mypy. Remove outdated ignores since dropping Python 2.
* Drop support for legacy contrib algorithms (#514)José Padilla2020-08-241-5/+0
| | | | | * Drop support for legacy contrib algorithms * Update cryptography dep
* Run pyupgrade across project to use modern Python 3 conventions (#491)Jon Dufresne2020-06-081-4/+2
| | | | | | | | pyupgrade is a tool to automatically upgrade Python syntax for newer versions of the language. Running pyupgrade removes several Python-2-isms that are no longer necessary now that the project is Python 3 only. https://github.com/asottile/pyupgrade
* DX Tweaks (#450)José Padilla2019-10-211-2/+8
| | | | | | | | | | * Setup pre-commit hooks * Run initial `tox -e lint` * Fix package name * Fix .travis.yml
* Fix mypy errors (#449)José Padilla2019-10-201-4/+4
|
* Add help moduleJosé Padilla2018-05-191-0/+61