diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2024-12-15 18:48:28 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2024-12-15 18:48:28 +0000 |
commit | eb74940ca81a6e900dec2b7c8df00245c6bb9a71 (patch) | |
tree | 37baaeba65b6a4874041eac8ec3a1cefc778eeda | |
parent | 5475a0b853e4527b4813cbaabbea88bcc7584843 (diff) | |
download | troggle-eb74940ca81a6e900dec2b7c8df00245c6bb9a71.tar.gz troggle-eb74940ca81a6e900dec2b7c8df00245c6bb9a71.tar.bz2 troggle-eb74940ca81a6e900dec2b7c8df00245c6bb9a71.zip |
ruff config
-rw-r--r-- | dev.toml | 15 | ||||
-rw-r--r-- | pyproject.toml | 15 | ||||
-rw-r--r-- | server.toml | 11 | ||||
-rw-r--r-- | urls.py | 67 |
4 files changed, 71 insertions, 37 deletions
@@ -1,13 +1,12 @@ -[tool.black] -line-length = 120 - -[tool.isort] -profile = 'black' -line-length=120 +# Do not edit pyproject.toml, it is overwritten. +# Instead, edit dev.toml and/or server.toml [tool.ruff] +# https://docs.astral.sh/ruff/configuration/ +# we do not use black or isort, we use ruff instead line-length=120 -ignore = ["E402"] +lint.ignore = ["E402", "F541"] + [project] name = "troggle" @@ -26,8 +25,6 @@ dev = [ "unidecode>=1.3.8", "black>=24.10.0", "coverage>=7.6.9", - "deptry>=0.21.1", - "isort>=5.13.2", ] # conlficting groups not implemented in uv yet diff --git a/pyproject.toml b/pyproject.toml index 1f69db2..1b07fa1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,12 @@ -[tool.black] -line-length = 120 - -[tool.isort] -profile = 'black' -line-length=120 +# Do not edit pyproject.toml, it is overwritten. +# Instead, edit dev.toml and/or server.toml [tool.ruff] +# https://docs.astral.sh/ruff/configuration/ +# we do not use black or isort, we use ruff instead line-length=120 -ignore = ["E402"] +lint.ignore = ["E402", "F541"] + [project] name = "troggle" @@ -26,8 +25,6 @@ dev = [ "unidecode>=1.3.8", "black>=24.10.0", "coverage>=7.6.9", - "deptry>=0.21.1", - "isort>=5.13.2", ] # conlficting groups not implemented in uv yet diff --git a/server.toml b/server.toml index aa5aed8..661079c 100644 --- a/server.toml +++ b/server.toml @@ -1,3 +1,11 @@ +# Do not edit pyproject.toml, it is overwritten. +# Instead, edit dev.toml and/or server.toml + +[tool.ruff] +# https://docs.astral.sh/ruff/configuration/ +# we do not use black or isort, we use ruff instead +line-length=120 +lint.ignore = ["E402", "F541"] [project] name = "troggle-server" @@ -11,4 +19,7 @@ dependencies = [ "piexif==1.1.3", "pillow==9.4.0", "unidecode==1.3.6", + "black>=24.10.0", + "coverage>=7.6.9", +] ] @@ -1,31 +1,60 @@ from django.conf import settings +from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path, re_path -from django.conf.urls.static import static - from troggle.core.views import statistics, survex from troggle.core.views.auth import expologin, expologout -from troggle.core.views.caves import (cave3d, caveindex, entranceindex, caveslist, - cavepage, caveslugfwd, caveQMs, edit_cave, cave_debug, - edit_entrance, get_entrances, qm, expo_kml, expo_kmz) +from troggle.core.views.caves import ( + cave3d, + cave_debug, + caveindex, + cavepage, + caveQMs, + caveslist, + caveslugfwd, + edit_cave, + edit_entrance, + entranceindex, + expo_kml, + expo_kmz, + get_entrances, + qm, +) from troggle.core.views.drawings import dwgallfiles, dwgfilesingle from troggle.core.views.editor_helpers import image_selector, new_image_form -from troggle.core.views.expo import (pubspage, indexpage, editexpopage, expofiles_redirect, - expofilessingle, expopage, map, mapfile, - mediapage, spider) -from troggle.core.views.logbooks import (QMs_jsonListView, Expeditions_jsonListView, - Expeditions_tsvListView, expedition, logreport, logentrydelete, - get_logbook_entries, get_people, - logbookentry, notablepersons, person, - personexpedition) -from troggle.core.views.other import (controlpanel, exportlogbook, frontpage, - todos) +from troggle.core.views.expo import ( + editexpopage, + expofiles_redirect, + expofilessingle, + expopage, + indexpage, + map, + mapfile, + mediapage, + pubspage, + spider, +) +from troggle.core.views.logbooks import ( + Expeditions_jsonListView, + Expeditions_tsvListView, + QMs_jsonListView, + expedition, + get_logbook_entries, + get_people, + logbookentry, + logentrydelete, + logreport, + notablepersons, + person, + personexpedition, +) +from troggle.core.views.other import controlpanel, exportlogbook, frontpage, todos from troggle.core.views.prospect import prospecting -from troggle.core.views.scans import (allscans, cavewallets, scansingle, - walletslistperson, walletslistyear) -from troggle.core.views.uploads import dwgupload, photoupload, gpxupload, expofilerename, logbookedit +from troggle.core.views.scans import allscans, cavewallets, scansingle, walletslistperson, walletslistyear +from troggle.core.views.uploads import dwgupload, expofilerename, gpxupload, logbookedit, photoupload from troggle.core.views.wallets_edit import walletedit + """This sets the actualurlpatterns[] and urlpatterns[] lists which django uses to resolve urls - in both directions as these are declarative. @@ -56,7 +85,7 @@ todo = ''' # the first place and what they were intended to provide is obscure. -# WHen running on the server, apache intercepts all teh /expofiles/ files so troggle never sees them, +# WHen running on the server, apache intercepts all the /expofiles/ files so troggle never sees them, # so the "content type" is set by whatever apache thinks it should be. Which means .gpx files # get treated as XML and the web browser fails to do anything usefull |