Skip to content

Commit 4384225

Browse files
Move deprecated=True to Typer() constructor instead of @app.command()
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
1 parent 40f4034 commit 4384225

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/usethis/_ui/interface/ci.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
from usethis._ui.options import backend_opt, frozen_opt, offline_opt, quiet_opt
66

77
app = typer.Typer(
8-
help="Add config for Continuous Integration (CI) pipelines.", add_completion=False
8+
help="Add config for Continuous Integration (CI) pipelines.",
9+
add_completion=False,
10+
deprecated=True,
911
)
1012

1113

12-
@app.command(deprecated=True, help="Use Bitbucket Pipelines for CI.")
14+
@app.command(help="Use Bitbucket Pipelines for CI.")
1315
def bitbucket(
1416
remove: bool = typer.Option(
1517
False, "--remove", help="Remove Bitbucket Pipelines CI instead of adding it."

tests/usethis/_ui/interface/test_ci.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_readme_example(self, tmp_path: Path):
3737
assert (
3838
result.output
3939
== """\
40-
DeprecationWarning: The command 'bitbucket' is deprecated.
4140
⚠ 'usethis ci' is deprecated and will be removed in v0.20.0.
4241
✔ Writing 'bitbucket-pipelines.yml'.
4342
✔ Adding cache 'uv' definition to 'bitbucket-pipelines.yml'.
@@ -59,7 +58,6 @@ def test_none_backend(self, tmp_path: Path):
5958
assert result.exit_code == 0, result.output
6059
assert (tmp_path / "bitbucket-pipelines.yml").exists()
6160
assert result.output == (
62-
"DeprecationWarning: The command 'bitbucket' is deprecated.\n"
6361
"⚠ 'usethis ci' is deprecated and will be removed in v0.20.0.\n"
6462
"✔ Writing 'bitbucket-pipelines.yml'.\n"
6563
"✔ Adding placeholder step to default pipeline in 'bitbucket-pipelines.yml'.\n"

0 commit comments

Comments
 (0)