Skip to content

Commit 9826af2

Browse files
Format/Lint.
1 parent 9012b62 commit 9826af2

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

infrahub_sdk/ctl/repository.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ def get_repository_config(repo_config_file: Path) -> InfrahubRepositoryConfig:
3434
try:
3535
data = InfrahubRepositoryConfig(**config_file_data)
3636
except ValidationError as exc:
37-
console.print(
38-
f"[red]Repository config file not valid, found {len(exc.errors())} error(s)"
39-
)
37+
console.print(f"[red]Repository config file not valid, found {len(exc.errors())} error(s)")
4038
for error in exc.errors():
4139
loc_str = [str(item) for item in error["loc"]]
4240
console.print(f" {'/'.join(loc_str)} | {error['msg']} ({error['type']})")
@@ -104,13 +102,9 @@ async def add(
104102
input_data["data"]["credential"] = {"id": credential.id}
105103

106104
query = Mutation(
107-
mutation="CoreReadOnlyRepositoryCreate"
108-
if read_only
109-
else "CoreRepositoryCreate",
105+
mutation="CoreReadOnlyRepositoryCreate" if read_only else "CoreRepositoryCreate",
110106
input_data=input_data,
111107
query={"ok": None},
112108
)
113109

114-
await client.execute_graphql(
115-
query=query.render(), branch_name=branch, tracker="mutation-repository-create"
116-
)
110+
await client.execute_graphql(query=query.render(), branch_name=branch, tracker="mutation-repository-create")

tests/unit/ctl/test_repository_app.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
runner = CliRunner()
1313

14-
requires_python_310 = pytest.mark.skipif(
15-
sys.version_info < (3, 10), reason="Requires Python 3.10 or higher"
16-
)
14+
requires_python_310 = pytest.mark.skipif(sys.version_info < (3, 10), reason="Requires Python 3.10 or higher")
1715

1816

1917
@pytest.fixture
@@ -262,9 +260,7 @@ def test_repo_readonly_true(self, mock_init_client, mock_client) -> None:
262260
)
263261

264262
@requires_python_310
265-
def test_repo_description_commit_branch(
266-
self, mock_init_client, mock_client
267-
) -> None:
263+
def test_repo_description_commit_branch(self, mock_init_client, mock_client) -> None:
268264
"""Case allow no username to be passed in and set it as None rather than blank string that fails."""
269265
mock_cred = mock.AsyncMock()
270266
mock_cred.id = "1234"

0 commit comments

Comments
 (0)