]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Fix linting with ruff provided in alembic.ini by scratch
authorRishat Fayzullin <nilluziaf@gmail.com>
Tue, 4 Mar 2025 20:32:44 +0000 (15:32 -0500)
committerFederico Caselli <cfederico87@gmail.com>
Tue, 4 Mar 2025 20:37:06 +0000 (21:37 +0100)
Fixes: #1614
Closes: #1615
Pull-request: https://github.com/sqlalchemy/alembic/pull/1615
Pull-request-sha: 92342fac19adf62a148ab937d1dc82417adb6e17

Change-Id: I02f801007a877e8498fab6dd3159b65bb2412c01

alembic/templates/async/alembic.ini.mako
alembic/templates/generic/alembic.ini.mako
alembic/templates/multidb/alembic.ini.mako
tests/test_post_write.py

index f97e2d6659d52a5a7e8ed48bc88be2f36e06e239..7ffd7926bce15473116ffce116ed2e819d7e5a85 100644 (file)
@@ -79,7 +79,7 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
 # hooks = ruff
 # ruff.type = exec
 # ruff.executable = %(here)s/.venv/bin/ruff
-# ruff.options = --fix REVISION_SCRIPT_FILENAME
+# ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
 # Logging configuration
 [loggers]
index 4fc5d01a9446750c4d3a989cb4597c581ad3f7ec..3e211d0d64dfa92f60da2fb568004d554f8b541e 100644 (file)
@@ -81,7 +81,7 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
 # hooks = ruff
 # ruff.type = exec
 # ruff.executable = %(here)s/.venv/bin/ruff
-# ruff.options = --fix REVISION_SCRIPT_FILENAME
+# ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
 # Logging configuration
 [loggers]
index 116bd4a88145267072a452aabec1e023a5545e2e..003164561bb8da95e02b3a196d60297ee8140d3d 100644 (file)
@@ -86,7 +86,7 @@ sqlalchemy.url = driver://user:pass@localhost/dbname2
 # hooks = ruff
 # ruff.type = exec
 # ruff.executable = %(here)s/.venv/bin/ruff
-# ruff.options = --fix REVISION_SCRIPT_FILENAME
+# ruff.options = check --fix REVISION_SCRIPT_FILENAME
 
 # Logging configuration
 [loggers]
index f728f0bb7bac1a35ae963a7d302bfa7dd2ecb792..9f019ca3ee8394e0944416d73db5ab2108f661eb 100644 (file)
@@ -307,11 +307,11 @@ black.cwd = /path/to/cwd
 hooks = ruff
 ruff.type = exec
 ruff.executable = ruff
-ruff.options = --fix
+ruff.options = check --fix
         """
 
         def expected_additional_arguments_fn(rev_path):
-            return [rev_path, "--fix"]
+            return [rev_path, "check", "--fix"]
 
         self._run_ruff_with_config(
             input_config, expected_additional_arguments_fn
@@ -323,11 +323,11 @@ ruff.options = --fix
 hooks = ruff
 ruff.type = exec
 ruff.executable = %(here)s/.venv/bin/ruff
-ruff.options = --fix
+ruff.options = check --fix
         """
 
         def expected_additional_arguments_fn(rev_path):
-            return [rev_path, "--fix"]
+            return [rev_path, "check", "--fix"]
 
         self._run_ruff_with_config(
             input_config,