updated package to conform to pylint
All checks were successful
/ build:package (push) Successful in 11s
/ backend-pylint (push) Successful in 21s

This commit is contained in:
Firq 2023-12-21 17:11:47 +01:00
parent 832196e77e
commit 03901e1d12
Signed by: Firq
GPG key ID: 4DE1059A4666E89F
22 changed files with 10 additions and 9 deletions

1
backend/.gitignore vendored
View file

@ -1,3 +1,4 @@
.venv/ .venv/
__pycache__/ __pycache__/
*.egg-info *.egg-info
dist/

View file

@ -7,8 +7,8 @@ from .routes import routes
from .routes.requests import routes_requests from .routes.requests import routes_requests
from .config import ServerSettings from .config import ServerSettings
instance = Application.get_instance() APP = Application.get_instance()
app, api = instance.app, instance.api app, api = APP.app, APP.api
api.register_blueprint(routes) api.register_blueprint(routes)
api.register_blueprint(routes_requests) api.register_blueprint(routes_requests)

View file

@ -10,7 +10,7 @@ class DatabaseSettings:
class APISettings: class APISettings:
API_TITLE = "Support Organizer" API_TITLE = "Support Organizer"
API_VERSION = "0.1.0-a" API_VERSION = "0.1.0-a1"
OPENAPI_VERSION = "3.1.0" OPENAPI_VERSION = "3.1.0"
# openapi.json settings # openapi.json settings

View file

@ -5,7 +5,7 @@ from ..app import Application
from ..models.interface import HealthGet, HealthStatus from ..models.interface import HealthGet, HealthStatus
from . import routes as blp from . import routes as blp
instance = Application.get_instance() APP = Application.get_instance()
@blp.route("/health") @blp.route("/health")
class ApiVersion(MethodView): class ApiVersion(MethodView):
@ -13,8 +13,8 @@ class ApiVersion(MethodView):
@blp.response(200, HealthGet, description="Successful operation") @blp.response(200, HealthGet, description="Successful operation")
def get(self): def get(self):
response = { response = {
"alive_since": datetime.strftime(instance.alive_since, "%d.%m.%Y %H:%M:%S"), "alive_since": datetime.strftime(APP.alive_since, "%d.%m.%Y %H:%M:%S"),
"alive_for": str(datetime.now() - instance.alive_since), "alive_for": str(datetime.now() - APP.alive_since),
"status": HealthStatus.OK "status": HealthStatus.OK
} }
return response return response

View file

@ -3,7 +3,7 @@ requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "fgo-request-manager" name = "fgo_request_manager"
version = "0.1.0a1" version = "0.1.0a1"
dependencies = [ dependencies = [
"flask~=2.3.3", "flask~=2.3.3",
@ -27,4 +27,4 @@ classifiers = [
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
where = ["."] where = ["."]
include = ["fgo-request-manager*"] include = ["fgo_request_manager*"]