Skip to content

Commit 70c1e51

Browse files
Narek MkhitaryanNarek Mkhitaryan
authored andcommitted
fix make_literal_validator
1 parent a300522 commit 70c1e51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/superannotate/lib/infrastructure/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def make_literal_validator(
2727
def literal_validator(v: typing.Any) -> typing.Any:
2828
try:
2929
return allowed_choices[v.lower()]
30-
except KeyError:
30+
except (KeyError, AttributeError):
3131
raise WrongConstantError(given=v, permitted=permitted_choices)
3232

3333
return literal_validator

0 commit comments

Comments
 (0)