Skip to content

Commit

Permalink
fix poetry lock + lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalabbad committed Dec 11, 2024
1 parent 376ad31 commit 3a29425
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions backend/infrahub/graphql/mutations/branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ async def mutate(
fields = await extract_fields(info.field_nodes[0].selection_set)
return cls(object=await obj.to_graphql(fields=fields.get("object", {})), ok=True, task=task)


class BranchNameInput(InputObjectType):
name = String(required=False)

Expand Down
1 change: 0 additions & 1 deletion backend/tests/integration/git/test_git_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ async def test_get_missing_file(self, db: InfrahubDatabase, client: InfrahubClie
id=obj.id,
name=git_repo_car_dealership.name,
location=git_repo_car_dealership.path,
task_report=FakeTaskReportLogger(),
client=client,
)

Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion tasks/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,26 @@ def build_dev_compose_files_cmd(database: str) -> str:
print("!! Found a dev override file for docker-compose !!")
DEV_COMPOSE_FILES.append(DEV_OVERRIDE_FILE)

return f"-f {' -f '.join(map(str, DEV_COMPOSE_FILES))}"
return f"-f {' -f '.join(map(str, DEV_COMPOSE_FILES))}"


def init_yaml_obj(line_length: int | None = None) -> YAML:
"""Instantiate a ruamel.yaml YAML object.
Args:
line_length (int, optional): Override the .yamllint.yml line length. Defaults to None.
Returns:
YAML: Instantiated ruamel.yaml.YAML object.
"""
from ruamel.yaml import YAML

yamllint_rules: dict = get_yamllint_rules()

yaml = YAML(typ="rt")
yaml.preserve_quotes = True
yaml.indent(mapping=2, sequence=4, offset=2)
yaml.explicit_start = True
yaml.width = line_length or yamllint_rules.get("line-length", {}).get("max", 120)

return yaml

0 comments on commit 3a29425

Please sign in to comment.