Skip to content

Commit 41b84b9

Browse files
fix(cli): Apply Ruff formatting fixes to manifest CLI module and tests
- Fix formatting issues in _manifest.py and test_manifest_cli.py - Resolves Ruff Format Check CI failure - All unit tests now passing locally (16/16) Co-Authored-By: AJ Steers <[email protected]>
1 parent 1b8c89e commit 41b84b9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

airbyte_cdk/cli/airbyte_cdk/_manifest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def validate_manifest(manifest_path: Path, strict: bool) -> None:
8989
if original_is_valid and not migration_available:
9090
click.echo(f"✅ Manifest {manifest_path} is valid and up to date.")
9191
return
92-
92+
9393
if original_is_valid and migration_available:
9494
if not strict:
9595
click.echo(f"✅ Manifest {manifest_path} is valid and up to date.")
@@ -183,7 +183,9 @@ def migrate_manifest(manifest_path: Path, dry_run: bool) -> None:
183183
current_cdk_version = metadata.version("airbyte_cdk")
184184
migrated_manifest["version"] = current_cdk_version
185185

186-
manifest_path.write_text(yaml.dump(migrated_manifest, default_flow_style=False, sort_keys=False))
186+
manifest_path.write_text(
187+
yaml.dump(migrated_manifest, default_flow_style=False, sort_keys=False)
188+
)
187189

188190
click.echo(
189191
f"✅ Successfully migrated {manifest_path} to the latest version ({current_cdk_version})."

unit_tests/cli/test_manifest_cli.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_validate_valid_manifest_up_to_date(self, tmp_path: Path) -> None:
4646
yaml.dump(manifest_content, f)
4747

4848
runner = CliRunner()
49-
49+
5050
result = runner.invoke(
5151
manifest_cli_group, ["validate", "--manifest-path", str(manifest_file)]
5252
)
@@ -93,7 +93,7 @@ def test_validate_manifest_needs_migration(self, tmp_path: Path) -> None:
9393
yaml.dump(manifest_content, f)
9494

9595
runner = CliRunner()
96-
96+
9797
result = runner.invoke(
9898
manifest_cli_group, ["validate", "--manifest-path", str(manifest_file)]
9999
)
@@ -181,7 +181,6 @@ def test_validate_manifest_strict_flag_help(self, tmp_path: Path) -> None:
181181
assert "--strict" in result.output
182182
assert "Enable strict mode" in result.output
183183

184-
185184
def test_validate_manifest_not_dict(self, tmp_path: Path) -> None:
186185
"""Test validate command with YAML that's not a dictionary (exit code 3)."""
187186
manifest_file = tmp_path / "manifest.yaml"
@@ -243,7 +242,7 @@ def test_migrate_manifest_needs_migration(self, tmp_path: Path) -> None:
243242

244243
with open(manifest_file, "r") as f:
245244
migrated_content = yaml.safe_load(f)
246-
245+
247246
assert migrated_content["version"] != "0.1.0"
248247

249248
def test_migrate_manifest_already_up_to_date(self, tmp_path: Path) -> None:
@@ -330,7 +329,7 @@ def test_migrate_manifest_dry_run(self, tmp_path: Path) -> None:
330329

331330
with open(manifest_file, "r") as f:
332331
unchanged_content = yaml.safe_load(f)
333-
332+
334333
assert unchanged_content == original_content
335334

336335
def test_migrate_manifest_file_not_found(self, tmp_path: Path) -> None:

0 commit comments

Comments
 (0)