Skip to content

Commit 9462bb1

Browse files
committed
Fix style to keep ruff and black happy.
1 parent 31245cc commit 9462bb1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/hu/dotted_dict.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _apply_key(self, o, k):
2727
except ValueError:
2828
raise KeyError("Non-integer list subscript")
2929
except IndexError:
30-
raise KeyError('Invalid list index at end of "{}"'.format(k[: self.pos]))
30+
raise KeyError(f'Invalid list index at end of "{k[: self.pos]}"')
3131
except KeyError:
3232
raise KeyError(
3333
'Unrecognised field name at end of "{}"'.format(k[: self.pos])
@@ -111,6 +111,6 @@ def _raise_error_if_syntax_error(self, key, match):
111111
if match is None:
112112
raise KeyError(
113113
"Cannot find name or list subscript at start of {!r}".format(
114-
key[self.current_position:]
114+
key[self.current_position :]
115115
)
116116
)

src/hu/object_dict.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ def __init__(self, arg=sentinel):
4444
if arg is self.sentinel: # Called without args
4545
arg = {}
4646

47-
# Allows the underlying dict class to handle the arg as it usually would
47+
# Allows the underlying dict class to handle the arg
48+
# as it usually would
4849
super(ObjectDict, self).__init__(arg)
4950

50-
for (k, v) in self.items():
51+
for k, v in self.items():
5152
self[k] = ObjectDict(v)
5253

5354
def __delattr__(self, name):

0 commit comments

Comments
 (0)