Skip to content

Commit

Permalink
Implement PEP-8 code style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jonakoudijs committed Jul 27, 2024
1 parent 56ddd22 commit 1cfbd04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
"""

# import modules
import os, json, gevent, datetime, redis, logging
import os
import json
import gevent
import datetime

Check failure on line 9 in src/functions.py

View workflow job for this annotation

GitHub Actions / Python Lint

Ruff (F401)

src/functions.py:9:8: F401 `datetime` imported but unused
import redis
import logging
from steam.client import SteamClient
from deta import Deta


def app_info(app_id):
connect_retries = 2
connect_timeout = 3
current_time = str(datetime.datetime.now())

logging.info("Started requesting app info", extra={"app_id": app_id})

Expand Down
12 changes: 7 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"""

# import modules
from deta import Deta
from typing import Union
from fastapi import FastAPI, Response, status
import os
import json
import semver
import typing
import logging
from fastapi import FastAPI, Response
from functions import app_info, cache_read, cache_write, log_level
import os, datetime, json, semver, typing, logging, logfmter
from logfmter import Logfmter

# load configuration
Expand Down Expand Up @@ -65,7 +67,7 @@ def read_app(app_id: int, pretty: bool = False):
else:
info = app_info(app_id)

if info == None:
if info is None:
logging.info(
"The SteamCMD backend returned no actual data and failed",
extra={"app_id": app_id},
Expand Down

0 comments on commit 1cfbd04

Please sign in to comment.