]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Update ruff examples to use the module hook
authorFrazer McLean <frazer@frazermclean.co.uk>
Thu, 26 Jun 2025 18:49:53 +0000 (20:49 +0200)
committerFrazer McLean <frazer@frazermclean.co.uk>
Mon, 30 Jun 2025 19:56:58 +0000 (21:56 +0200)
alembic/templates/async/alembic.ini.mako
alembic/templates/generic/alembic.ini.mako
alembic/templates/multidb/alembic.ini.mako
docs/build/tutorial.rst

index 782524e219ff29fcc12c514df77aa14d524563a9..67acc6d05426f6b03b8c650ff79c70ab2216b1b1 100644 (file)
@@ -98,10 +98,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
 # black.entrypoint = black
 # black.options = -l 79 REVISION_SCRIPT_FILENAME
 
-# lint with attempts to fix using "ruff" - use the exec runner, execute a binary
+# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
+# hooks = ruff
+# ruff.type = module
+# ruff.module = ruff
+# ruff.options = check --fix REVISION_SCRIPT_FILENAME
+
+# Alternatively, use the exec runner to execute a binary found on your PATH
 # hooks = ruff
 # ruff.type = exec
-# ruff.executable = %(here)s/.venv/bin/ruff
+# ruff.executable = ruff
 # ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
 # Logging configuration.  This is also consumed by the user-maintained
index cb4e2bf399b50d3141e7d6ea4b026a3274c203b7..bb93d0e3cf17447b5aa78da5e1d54ba4d966bae6 100644 (file)
@@ -98,10 +98,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
 # black.entrypoint = black
 # black.options = -l 79 REVISION_SCRIPT_FILENAME
 
-# lint with attempts to fix using "ruff" - use the exec runner, execute a binary
+# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
+# hooks = ruff
+# ruff.type = module
+# ruff.module = ruff
+# ruff.options = check --fix REVISION_SCRIPT_FILENAME
+
+# Alternatively, use the exec runner to execute a binary found on your PATH
 # hooks = ruff
 # ruff.type = exec
-# ruff.executable = %(here)s/.venv/bin/ruff
+# ruff.executable = ruff
 # ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
 # Logging configuration.  This is also consumed by the user-maintained
index 2680ef68a5c444103d0d90ccd2549365af8f630a..a6629839552197a124088e8e46a011446b5165ee 100644 (file)
@@ -106,10 +106,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname2
 # black.entrypoint = black
 # black.options = -l 79 REVISION_SCRIPT_FILENAME
 
-# lint with attempts to fix using "ruff" - use the exec runner, execute a binary
+# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
+# hooks = ruff
+# ruff.type = module
+# ruff.module = ruff
+# ruff.options = check --fix REVISION_SCRIPT_FILENAME
+
+# Alternatively, use the exec runner to execute a binary found on your PATH
 # hooks = ruff
 # ruff.type = exec
-# ruff.executable = %(here)s/.venv/bin/ruff
+# ruff.executable = ruff
 # ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
 # Logging configuration.  This is also consumed by the user-maintained
index 7354c82f501af866f6db052807ed5a57c3b6cedc..eccf8f304b0661b410d62d1103feb5ed9c6e16a6 100644 (file)
@@ -248,10 +248,16 @@ The all-in-one .ini file created by ``generic`` is illustrated below::
     # black.entrypoint = black
     # black.options = -l 79 REVISION_SCRIPT_FILENAME
 
-    # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
+    # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
+    # hooks = ruff
+    # ruff.type = module
+    # ruff.module = ruff
+    # ruff.options = check --fix REVISION_SCRIPT_FILENAME
+
+    # Alternatively, use the exec runner to execute a binary found on your PATH
     # hooks = ruff
     # ruff.type = exec
-    # ruff.executable = %(here)s/.venv/bin/ruff
+    # ruff.executable = ruff
     # ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
     # Logging configuration.  This is also consumed by the user-maintained