Skip to content

Commit 01f311a

Browse files
lint fixes
1 parent eddfd91 commit 01f311a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/eligibility_signposting_api/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
init_logging()
1717
logger = logging.getLogger(__name__)
1818

19+
1920
def main() -> None: # pragma: no cover
2021
"""Run the Flask app as a local process."""
2122
app = create_app()
@@ -29,7 +30,6 @@ def lambda_handler(event: LambdaEvent, context: LambdaContext) -> dict[str, Any]
2930

3031

3132
def create_app() -> Flask:
32-
3333
app = Flask(__name__)
3434
logger.info("app created")
3535

src/eligibility_signposting_api/config.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from yarl import URL
66

7-
LOG_LEVEL = logging.getLevelNamesMapping().get(os.getenv("LOG_LEVEL", None), logging.WARNING)
7+
LOG_LEVEL = logging.getLevelNamesMapping().get(os.getenv("LOG_LEVEL", ""), logging.WARNING)
88

99
AwsRegion = NewType("AwsRegion", str)
1010
AwsAccessKey = NewType("AwsAccessKey", str)
@@ -22,10 +22,4 @@ def config() -> dict[str, Any]:
2222

2323
def init_logging() -> None:
2424
log_format = "%(asctime)s %(levelname)-8s %(name)s %(module)s.py:%(funcName)s():%(lineno)d %(message)s"
25-
logging.basicConfig(
26-
level=LOG_LEVEL,
27-
format=log_format,
28-
handlers=[
29-
logging.StreamHandler()
30-
]
31-
)
25+
logging.basicConfig(level=LOG_LEVEL, format=log_format, handlers=[logging.StreamHandler()])

0 commit comments

Comments
 (0)