Skip to content

Commit

Permalink
style(type): fix linting from autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Oct 15, 2024
1 parent 9583793 commit f3b7108
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions charmcraft/parts/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ def run(self, target_step: Step) -> None:
f"Running step {act.step.name} for part {act.part_name!r}"
)
with instrum.Timer(
"Running step", step=act.step.name, part=act.part_name
): # type: ignore[arg-type]
"Running step",
step=act.step.name, # type: ignore[arg-type]
part=act.part_name, # type: ignore[arg-type]
):
with emit.open_stream("Execute action") as stream:
aex.execute([act], stdout=stream, stderr=stream)
executor_timer.mark("Context exit")
Expand Down
5 changes: 4 additions & 1 deletion charmcraft/services/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ def instance(
) -> Generator[craft_providers.Executor, None, None]:
"""Instance override for Charmcraft."""
with super().instance(
build_info, work_dir=work_dir, allow_unstable=allow_unstable, **kwargs
build_info,
work_dir=work_dir,
allow_unstable=allow_unstable,
**kwargs, # type: ignore[arg-type]
) as instance:
try:
yield instance
Expand Down
4 changes: 2 additions & 2 deletions charmcraft/utils/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def dump_yaml(data: Any) -> str: # noqa: ANN401: yaml.dump takes anything, so w
yaml.add_representer(str, _repr_str, Dumper=yaml.SafeDumper)
yaml.add_representer(
pydantic.AnyHttpUrl,
_repr_str,
Dumper=yaml.SafeDumper, # type: ignore[arg-type]
_repr_str, # type: ignore[arg-type]
Dumper=yaml.SafeDumper,
)
yaml.add_representer(
const.CharmArch,
Expand Down

0 comments on commit f3b7108

Please sign in to comment.