diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 073186a..ebbddeb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,28 +2,28 @@ ci: autoupdate_schedule: monthly repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.21.2 hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/asottile/reorder-python-imports - rev: v3.12.0 + rev: v3.16.0 hooks: - id: reorder-python-imports args: ["--application-directories", "src"] files: flemi - - repo: https://github.com/psf/black - rev: 23.11.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black files: flemi - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 files: flemi - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: fix-byte-order-marker - id: trailing-whitespace diff --git a/flemi/api/auth/views.py b/flemi/api/auth/views.py index 11b680a..b30accb 100644 --- a/flemi/api/auth/views.py +++ b/flemi/api/auth/views.py @@ -12,7 +12,6 @@ from .schemas import LoginSchema from .schemas import RegisterSchema - # create authentication blueprint for API v4 auth_bp = APIBlueprint("auth", __name__, url_prefix="/auth") diff --git a/flemi/api/me/views.py b/flemi/api/me/views.py index 2ed5233..06269cd 100644 --- a/flemi/api/me/views.py +++ b/flemi/api/me/views.py @@ -8,7 +8,6 @@ from .schemas import BasicProfileEditSchema from .schemas import PrivateUserOutSchema - me_bp = APIBlueprint("me", __name__, url_prefix="/me") diff --git a/flemi/extensions.py b/flemi/extensions.py index 2b80707..ed61765 100644 --- a/flemi/extensions.py +++ b/flemi/extensions.py @@ -3,7 +3,6 @@ from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy - db = SQLAlchemy() migrate = Migrate() auth = HTTPTokenAuth() diff --git a/flemi/models.py b/flemi/models.py index a372185..5654571 100644 --- a/flemi/models.py +++ b/flemi/models.py @@ -2,6 +2,7 @@ MIT License Copyright (c) 2020 Andy Zhou """ + import hashlib import os from datetime import datetime @@ -18,7 +19,6 @@ from .extensions import db from .shop_items import items - group_user_table = db.Table( "group_user", db.Column("user_id", db.Integer, db.ForeignKey("user.id")), diff --git a/flemi/settings.py b/flemi/settings.py index 4c1bba9..79135ea 100644 --- a/flemi/settings.py +++ b/flemi/settings.py @@ -2,6 +2,7 @@ MIT License Copyright (c) 2020 Andy Zhou """ + import os from os.path import abspath from os.path import dirname