mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
In terms of performance, most queries on this page win over PHP in query times, with the exception of sorting by Voted or Notify (https://gitlab.archlinux.org/archlinux/aurweb/-/issues/102). Otherwise, there are a few modifications: described below. * Pagination * The `paginate` Python module has been used in the FastAPI project here to implement paging on the packages search page. This changes how pagination is displayed, however it serves the same purpose. We'll take advantage of this module in other places as well. * Form action * The form action for actions now use `POST /packages` to perform. This is currently implemented and will be addressed in a follow-up commit. * Input names and values * Input names and values have been modified to satisfy the snake_case naming convention we'd like to use as much as possible. * Some input names and values were modified to comply with FastAPI Forms: (IDs[<id>]) -> (IDs, <id>). Signed-off-by: Kevin Morris <kevr@0cost.org>
34 lines
1.2 KiB
INI
34 lines
1.2 KiB
INI
[pycodestyle]
|
|
max-line-length = 127
|
|
ignore = E741, W503
|
|
|
|
[flake8]
|
|
max-line-length = 127
|
|
max-complexity = 10
|
|
|
|
# aurweb/routers/accounts.py
|
|
# Ignore some unavoidable flake8 warnings; we know this is against
|
|
# pycodestyle, but some of the existing codebase uses `I` variables,
|
|
# so specifically silence warnings about it in pre-defined files.
|
|
# In E741, the 'I', 'O', 'l' are ambiguous variable names.
|
|
# Our current implementation uses these variables through HTTP
|
|
# and the FastAPI form specification wants them named as such.
|
|
# In C901's case, our process_account_form function is way too
|
|
# complex for PEP (too many if statements). However, we need to
|
|
# process these anyways, and making it any more complex would
|
|
# just add confusion to the implementation.
|
|
#
|
|
# test/test_ssh_pub_key.py
|
|
# E501 is detected due to our >127 width test constant. Ignore it.
|
|
# Due to this, line width should _always_ be looked at in code reviews.
|
|
# Anything like this should be questioned.
|
|
#
|
|
per-file-ignores =
|
|
aurweb/routers/accounts.py:E741,C901
|
|
test/test_ssh_pub_key.py:E501
|
|
aurweb/routers/packages.py:E741
|
|
|
|
[isort]
|
|
line_length = 127
|
|
lines_between_types = 1
|
|
|