Skip to content

Commit eeaa2f7

Browse files
committed
Rename to skip_linter
1 parent 00a18e1 commit eeaa2f7

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

sqlmesh/cli/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def diff(ctx: click.Context, environment: t.Optional[str] = None) -> None:
340340
help="Skip tests prior to generating the plan if they are defined.",
341341
)
342342
@click.option(
343-
"--skip-lints",
343+
"--skip-linter",
344344
is_flag=True,
345345
help="Skip linting prior to generating the plan if the linter is enabled.",
346346
)

sqlmesh/core/context.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ def plan(
11351135
no_diff: t.Optional[bool] = None,
11361136
run: bool = False,
11371137
diff_rendered: bool = False,
1138-
skip_lints: bool = False,
1138+
skip_linter: bool = False,
11391139
) -> Plan:
11401140
"""Interactively creates a plan.
11411141
@@ -1180,7 +1180,7 @@ def plan(
11801180
no_diff: Hide text differences for changed models.
11811181
run: Whether to run latest intervals as part of the plan application.
11821182
diff_rendered: Whether the diff should compare raw vs rendered models
1183-
skip_lints: Linter runs by default so this will skip it if enabled
1183+
skip_linter: Linter runs by default so this will skip it if enabled
11841184
11851185
Returns:
11861186
The populated Plan object.
@@ -1207,7 +1207,7 @@ def plan(
12071207
enable_preview=enable_preview,
12081208
run=run,
12091209
diff_rendered=diff_rendered,
1210-
skip_lints=skip_lints,
1210+
skip_linter=skip_linter,
12111211
)
12121212

12131213
if no_auto_categorization:
@@ -1249,7 +1249,7 @@ def plan_builder(
12491249
enable_preview: t.Optional[bool] = None,
12501250
run: bool = False,
12511251
diff_rendered: bool = False,
1252-
skip_lints: bool = False,
1252+
skip_linter: bool = False,
12531253
) -> PlanBuilder:
12541254
"""Creates a plan builder.
12551255
@@ -1305,7 +1305,7 @@ def plan_builder(
13051305
if run and is_dev:
13061306
raise ConfigError("The '--run' flag is only supported for the production environment.")
13071307

1308-
if not skip_lints:
1308+
if not skip_linter:
13091309
self.lint_models(*self.models.values())
13101310

13111311
self._run_plan_tests(skip_tests=skip_tests)

sqlmesh/magics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def test(self, context: Context, line: str, test_def_raw: t.Optional[str] = None
344344
help="Skip the unit tests defined for the model.",
345345
)
346346
@argument(
347-
"--skip-lints",
347+
"--skip-linter",
348348
action="store_true",
349349
help="Skip the linter for the model.",
350350
)

tests/cli/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def test_plan_skip_tests(runner, tmp_path):
198198
assert_backfill_success(result)
199199

200200

201-
def test_plan_skip_lints(runner, tmp_path):
201+
def test_plan_skip_linter(runner, tmp_path):
202202
create_example_project(tmp_path)
203203

204204
with open(tmp_path / "config.yaml", "a", encoding="utf-8") as f:
@@ -212,7 +212,7 @@ def test_plan_skip_lints(runner, tmp_path):
212212
# Successful test run message should not appear with `--skip-tests`
213213
# Input: `y` to apply and backfill
214214
result = runner.invoke(
215-
cli, ["--log-file-dir", tmp_path, "--paths", tmp_path, "plan", "--skip-lints"], input="y\n"
215+
cli, ["--log-file-dir", tmp_path, "--paths", tmp_path, "plan", "--skip-linter"], input="y\n"
216216
)
217217

218218
assert result.exit_code == 0

0 commit comments

Comments
 (0)