Skip to content

Commit 4d6092d

Browse files
committed
give warning if colon in key name
1 parent 3f2a008 commit 4d6092d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

waveform_editor/tendencies/base.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ def _handle_unknown_kwargs(self, unknown_kwargs):
142142
word.replace("user_", "") for word in self.param if "user_" in word
143143
]
144144
for unknown_kwarg in unknown_kwargs:
145+
if ":" in unknown_kwarg:
146+
error_msg = (
147+
f"Found ':' in {unknown_kwarg!r}. "
148+
"Did you forget a space after the ':'?\n"
149+
)
150+
self.annotations.add(self.line_number, error_msg, is_warning=True)
151+
continue
152+
145153
suggestion = self.annotations.suggest(unknown_kwarg, params_list)
146154
error_msg = (
147155
f"Unknown keyword passed: {unknown_kwarg!r}. {suggestion}"

0 commit comments

Comments
 (0)