1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-30 16:53:54 +00:00

Add flake8

This commit is contained in:
Mo 2022-07-03 18:41:44 +02:00
parent 5c511a00f5
commit a017e43fed
3 changed files with 16 additions and 2 deletions

10
.flake8 Normal file
View file

@ -0,0 +1,10 @@
[flake8]
ignore =
E402,
E501,
E711,
E712,
W503,
exclude =
advlabdb/__init__.py,
migrations/,

View file

@ -33,3 +33,8 @@ repos:
rev: 1.7.4 rev: 1.7.4
hooks: hooks:
- id: bandit - id: bandit
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8

View file

@ -7,11 +7,10 @@ from functools import cache
from flask import flash, url_for from flask import flash, url_for
from flask_admin.menu import MenuLink from flask_admin.menu import MenuLink
from flask_security import current_user from flask_security import current_user
from sqlalchemy import select
from wtforms.fields import BooleanField, IntegerField, SelectField, StringField from wtforms.fields import BooleanField, IntegerField, SelectField, StringField
from wtforms.validators import DataRequired, NumberRange, Optional from wtforms.validators import DataRequired, NumberRange, Optional
from . import app, db from . import app
from .models import MAX_MARK, MIN_MARK, Semester from .models import MAX_MARK, MIN_MARK, Semester