Skip to content

Commit

Permalink
refactor: fix Refurb errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed Jan 9, 2024
1 parent 180520c commit c70b72a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/remarshal/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def yaml_width(value: str) -> int:
"indent": args.yaml_indent,
"width": args.yaml_width,
}
for key in ["yaml_indent", "yaml_style", "yaml_width"]:
for key in ("yaml_indent", "yaml_style", "yaml_width"):
del vars(args)[key]

return args
Expand All @@ -371,7 +371,7 @@ def identity(x: Any) -> Any:

def traverse(
col: Any,
dict_callback: Callable[[List[Tuple[Any, Any]]], Any] = lambda x: dict(x),
dict_callback: Callable[[List[Tuple[Any, Any]]], Any] = dict,
list_callback: Callable[[List[Tuple[Any, Any]]], Any] = identity,
key_callback: Callable[[Any], Any] = identity,
instance_callbacks: Sequence[Tuple[type, Any]] = (),
Expand Down Expand Up @@ -498,8 +498,7 @@ def _validate_value_count(doc: Document, *, maximum: int) -> None:
count = 0

def count_callback(x: Any) -> Any:
nonlocal count
nonlocal maximum
nonlocal count, maximum

count += 1
if count > maximum:
Expand Down

0 comments on commit c70b72a

Please sign in to comment.