Browse Source

I love trying different formatters

main
crunk 6 months ago
parent
commit
2a018ab863
  1. 2
      pyproject.toml
  2. 11
      verse/describer/describe_files.py
  3. 2
      verse/file_crawler.py
  4. 4
      verse/start.py

2
pyproject.toml

@ -43,7 +43,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
indent-style = "space"
docstring-code-format = true
line-ending = "auto"
skip-magic-trailing-comma = false

11
verse/describer/describe_files.py

@ -40,15 +40,7 @@ def describe_file(file_id):
describe_form = DescribeFilesForm(
distribusi_file.id, distribusi_file.path, distribusi_file.type
)
print(
f"file: {describe_form.file_path} description: {describe_form.description.data}"
)
print(
f"file: {describe_form.file_path} searchtags: {describe_form.searchtags.data}"
)
print(
f"file: {describe_form.file_path} alttext: {describe_form.alttext.data}"
)
distribusi = Distribusis.query.filter_by(
id=distribusi_file.distribusi
).first()
@ -59,6 +51,7 @@ def describe_file(file_id):
)
)
@describer.route("/stash/<path:path>")
def send_stash_file(path):
return send_from_directory("stash", path)

2
verse/file_crawler.py

@ -70,4 +70,4 @@ def add_distribusi_files(path):
_distribusi_file_with_type(distribusi, full_path)
add_distribusi_files("2018-02-16-Extratonality")
add_distribusi_files("2018-12-WttF-Mastodon-and-the-Fediverse")

4
verse/start.py

@ -14,7 +14,7 @@ from flask_login import current_user, login_required, logout_user
from flask_wtf.csrf import CSRFError
from adminpage import AdminPage
from app import db, create_app, login_manager
from app import create_app, login_manager, db
from describer.describe_files import describer
from distribusikan.distribusikan import distribusikan
from distribusikan.distribusisinfo import DistribusisInfo
@ -29,7 +29,6 @@ from statuspengguna.registeruser import register_user
APP = create_app()
stash_page = Blueprint("stash_page", __name__, static_folder="stash")
APP.register_blueprint(stash_page)
APP.register_blueprint(describer, url_prefix="/describer")
APP.register_blueprint(login_section, url_prefix="/login")
APP.register_blueprint(register_user, url_prefix="/register")
@ -59,6 +58,7 @@ def index():
"tags": distribusi.tags.split(","),
}
distribusisindex[distribusi.distribusiname] = singledistribusi
years = uploadform.year.choices
categories = uploadform.category.choices
adminuser = is_adminuser()

Loading…
Cancel
Save