Skip to content

Commit

Permalink
Fixes missing imports and undefined variables with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Jul 17, 2023
1 parent 82dd4ab commit a90c0c5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ testpaths = "web"
ignore = [
"E501", # line too long
"E722", # bare expect
"E402", # import not at the top of the file
]
5 changes: 1 addition & 4 deletions web/flaskr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def global_processor():
"config": app.config,
"beta": app.config["BETA"],
"documentation_link": app.config["DOCUMENTATION_LINK"],
"LANGUAGES": LANGUAGES,
**app.config["WORDINGS"],
}

Expand All @@ -67,10 +68,6 @@ def global_processor():
csrf = CSRFProtect()
csrf.init_app(app)

@app.context_processor
def global_processor():
return {"LANGUAGES": LANGUAGES}

# init database
with app.app_context():
import flaskr.routes
Expand Down
2 changes: 2 additions & 0 deletions web/flaskr/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from datetime import date, datetime, timedelta, timezone

from flaskr.utils import secret_key
import os


db = SQLAlchemy()

Expand Down
2 changes: 1 addition & 1 deletion web/flaskr/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ def add_meeting_file_nextcloud(path, meeting_id, is_default):
return jsonify(
status=500,
isfrom="nextcloud",
msg=f"Fichier {title} TROP VOLUMINEUX, ne pas dépasser 20Mo",
msg=f"Fichier {path} TROP VOLUMINEUX, ne pas dépasser 20Mo",
)

meetingFile = MeetingFiles()
Expand Down
4 changes: 3 additions & 1 deletion web/misc/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ def when_ready(server):
def worker_int(worker):
worker.log.info("worker received INT or QUIT signal")
## get traceback info
import threading, sys, traceback
import threading
import sys
import traceback

id2name = {th.ident: th.name for th in threading.enumerate()}
code = []
Expand Down

0 comments on commit a90c0c5

Please sign in to comment.