Skip to content

Commit

Permalink
Fix style to keep ruff and black happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenweb committed Dec 21, 2024
1 parent 31245cc commit 9462bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hu/dotted_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _apply_key(self, o, k):
except ValueError:
raise KeyError("Non-integer list subscript")
except IndexError:
raise KeyError('Invalid list index at end of "{}"'.format(k[: self.pos]))
raise KeyError(f'Invalid list index at end of "{k[: self.pos]}"')
except KeyError:
raise KeyError(
'Unrecognised field name at end of "{}"'.format(k[: self.pos])
Expand Down Expand Up @@ -111,6 +111,6 @@ def _raise_error_if_syntax_error(self, key, match):
if match is None:
raise KeyError(
"Cannot find name or list subscript at start of {!r}".format(
key[self.current_position:]
key[self.current_position :]
)
)
5 changes: 3 additions & 2 deletions src/hu/object_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ def __init__(self, arg=sentinel):
if arg is self.sentinel: # Called without args
arg = {}

# Allows the underlying dict class to handle the arg as it usually would
# Allows the underlying dict class to handle the arg
# as it usually would
super(ObjectDict, self).__init__(arg)

for (k, v) in self.items():
for k, v in self.items():
self[k] = ObjectDict(v)

def __delattr__(self, name):
Expand Down

0 comments on commit 9462bb1

Please sign in to comment.