Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Mark explicit imports

Roland Geiderc234cebcc685
diff --git a/pyproject.toml b/pyproject.toml
index 407760b7c..27381184c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -157,11 +157,14 @@ select = [
[tool.ruff.lint.per-file-ignores]
# Import sorting was historically skipped for these (isort's "skip" list)
-"**/migrations/*.py" = ["I"]
+"**/migrations/*.py" = ["I", "F401"]
"settings/*.py" = ["I"]
"extras/**/*.py" = ["I"]
"**/apps.py" = ["I"]
+# These re-export the models of their app, the imports are the public API
+"**/__init__.py" = ["F401"]
+
#
# TODO: ruff doesn't understand force_grid_wrap=2 yet, if that is ever implemented,
# we should add the appropriate configurations
diff --git a/wger/core/apps.py b/wger/core/apps.py
index e4fedcc37..04f6f91a6 100644
--- a/wger/core/apps.py
+++ b/wger/core/apps.py
@@ -21,5 +21,5 @@ class CoreConfig(AppConfig):
verbose_name = 'Core'
def ready(self):
- import wger.core.signals
- import wger.core.checks
+ import wger.core.checks # noqa: F401
+ import wger.core.signals # noqa: F401
diff --git a/wger/exercises/apps.py b/wger/exercises/apps.py
index a4ec74f71..fb34281b8 100644
--- a/wger/exercises/apps.py
+++ b/wger/exercises/apps.py
@@ -23,7 +23,7 @@ class ExerciseConfig(AppConfig):
verbose_name = 'Exercise'
def ready(self):
- import wger.exercises.signals
+ import wger.exercises.signals # noqa: F401
from actstream import registry
registry.register(self.get_model('Alias'))
diff --git a/wger/manager/apps.py b/wger/manager/apps.py
index f41d241ac..716307549 100644
--- a/wger/manager/apps.py
+++ b/wger/manager/apps.py
@@ -23,4 +23,4 @@ class ManagerConfig(AppConfig):
verbose_name = 'Manager'
def ready(self):
- import wger.manager.signals
+ import wger.manager.signals # noqa: F401
diff --git a/wger/nutrition/apps.py b/wger/nutrition/apps.py
index c82e8d2a5..7fab410dd 100644
--- a/wger/nutrition/apps.py
+++ b/wger/nutrition/apps.py
@@ -23,4 +23,4 @@ class NutritionConfig(AppConfig):
verbose_name = 'Nutrition'
def ready(self):
- import wger.nutrition.signals
+ import wger.nutrition.signals # noqa: F401
diff --git a/wger/trophies/apps.py b/wger/trophies/apps.py
index 227c13b86..ab3ef9d91 100644
--- a/wger/trophies/apps.py
+++ b/wger/trophies/apps.py
@@ -23,4 +23,4 @@ class TrophiesConfig(AppConfig):
verbose_name = 'Trophies'
def ready(self):
- import wger.trophies.signals
+ import wger.trophies.signals # noqa: F401