mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-11-22 09:39:30 +00:00
style: add more pylint checks and update code for them
This commit is contained in:
1 parent
4f839a7e6a
commit
36b7972b26
211 files changed
+951
-955
No files matched your search
@@ -36,7 +36,7 @@ Almost all actions are wrapped by ``ahriman.core.repository.Repository`` class
|
||||
from ahriman.models.pacman_synchronization import PacmanSynchronization
|
||||
|
||||
repository = Repository(repository_id, configuration, database,
|
||||
report=True, refresh_pacman_database=PacmanSynchronization.Disabled)
|
||||
report=True, refresh_pacman_database=PacmanSynchronization.DISABLED)
|
||||
|
||||
And the ``repository`` instance can be used to perform repository maintenance
|
||||
|
||||
|
||||
@@ -28,13 +28,13 @@ In order to view to be added to the route list correctly, few more properties ar
|
||||
|
||||
ROUTES = ["/api/v1/ping"]
|
||||
|
||||
In addition, it is also recommended to specify permission level for using this endpoint. Since this endpoint neither does anything nor returns sensitive information, it can be set to ``UserAccess.Unauthorized``:
|
||||
In addition, it is also recommended to specify permission level for using this endpoint. Since this endpoint neither does anything nor returns sensitive information, it can be set to ``UserAccess.UNAUTHORIZED``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
...
|
||||
|
||||
GET_PERMISSION = UserAccess.Unauthorized
|
||||
GET_PERMISSION = UserAccess.UNAUTHORIZED
|
||||
|
||||
That's all. Just save the file as ``/usr/lib/python3.12/site-packages/ahriman/web/views/ping.py`` (replace ``python3.12`` with actual python version) and restart web server.
|
||||
|
||||
|
||||
Reference in new issue
Block a user