diff --git a/ldap_jwt_auth/auth/jwt_handler.py b/ldap_jwt_auth/auth/jwt_handler.py index e748507..c77ed34 100644 --- a/ldap_jwt_auth/auth/jwt_handler.py +++ b/ldap_jwt_auth/auth/jwt_handler.py @@ -1,6 +1,7 @@ """ Module for providing a class for handling JWTs. """ + import logging from datetime import datetime, timezone, timedelta from typing import Any, Dict diff --git a/ldap_jwt_auth/core/config.py b/ldap_jwt_auth/core/config.py index 197861e..2791f20 100644 --- a/ldap_jwt_auth/core/config.py +++ b/ldap_jwt_auth/core/config.py @@ -1,6 +1,7 @@ """ Module for the overall configuration for the application. """ + from pathlib import Path from pydantic import BaseModel diff --git a/ldap_jwt_auth/core/constants.py b/ldap_jwt_auth/core/constants.py index 4636e11..402256f 100644 --- a/ldap_jwt_auth/core/constants.py +++ b/ldap_jwt_auth/core/constants.py @@ -1,6 +1,7 @@ """ Module for the constants of the application. """ + import sys from ldap_jwt_auth.core.config import config diff --git a/ldap_jwt_auth/core/logger_setup.py b/ldap_jwt_auth/core/logger_setup.py index 04e579d..c2fea3b 100644 --- a/ldap_jwt_auth/core/logger_setup.py +++ b/ldap_jwt_auth/core/logger_setup.py @@ -1,6 +1,7 @@ """ Module for setting up and configuring the logging system. """ + import logging import logging.config from pathlib import Path diff --git a/ldap_jwt_auth/main.py b/ldap_jwt_auth/main.py index 773c21e..3731375 100644 --- a/ldap_jwt_auth/main.py +++ b/ldap_jwt_auth/main.py @@ -1,6 +1,7 @@ """ Main module contains the API entrypoint. """ + import logging from fastapi import FastAPI, Request, status diff --git a/ldap_jwt_auth/routers/login.py b/ldap_jwt_auth/routers/login.py index 1a78152..61d87f6 100644 --- a/ldap_jwt_auth/routers/login.py +++ b/ldap_jwt_auth/routers/login.py @@ -1,6 +1,7 @@ """ Module for providing an API router which defines login route(s). """ + import logging from typing import Annotated diff --git a/ldap_jwt_auth/routers/refresh.py b/ldap_jwt_auth/routers/refresh.py index a5f1636..285072b 100644 --- a/ldap_jwt_auth/routers/refresh.py +++ b/ldap_jwt_auth/routers/refresh.py @@ -2,6 +2,7 @@ Module for providing an API router which defines a route for managing the refreshing/updating of a JWT access token using a JWT refresh token. """ + import logging from typing import Annotated diff --git a/ldap_jwt_auth/routers/verify.py b/ldap_jwt_auth/routers/verify.py index 54d38e7..5a8d09f 100644 --- a/ldap_jwt_auth/routers/verify.py +++ b/ldap_jwt_auth/routers/verify.py @@ -1,6 +1,7 @@ """ Module for providing an API router which defines a route for managing verification of JWT tokens. """ + import logging from typing import Annotated diff --git a/pyproject.toml b/pyproject.toml index 41d3f70..ec186e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ code-analysis = [ ] formatting = [ - "black==23.12.0" + "black==24.1.1" ] test = [ diff --git a/test/conftest.py b/test/conftest.py index 6d0dbc9..3e5af62 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,6 +1,7 @@ """ Module for providing pytest testing configuration. """ + from pathlib import Path import ldap_jwt_auth.core.config as conf diff --git a/test/unit/auth/test_jwt_handler.py b/test/unit/auth/test_jwt_handler.py index 9010c4d..aa1eac5 100644 --- a/test/unit/auth/test_jwt_handler.py +++ b/test/unit/auth/test_jwt_handler.py @@ -1,6 +1,7 @@ """ Unit tests for the `JWTHandler` class. """ + from datetime import datetime, timezone from unittest.mock import patch