Skip to content

Commit c45f0cb

Browse files
Tweak comment
1 parent 7141bee commit c45f0cb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/backend/src/couchers/i18n/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def __init__(self, locale: str, timezone: tzinfo) -> None:
4646
self.babel_locale = get_babel_locale(self.locale_list)
4747

4848
def __setattr__(self, name: str, value: Any) -> None:
49-
# Freeze after initialization. We can't use @dataclass(frozen=True) because some
50-
# of our attributes are derived from others, so we can't use the default initializer.
49+
# Freeze after initialization. We can't use @dataclass(frozen=True) because then
50+
# we need the default initializer and some of our fields shouldn't be parameters.
5151
if hasattr(self, "babel_locale"):
5252
raise FrozenInstanceError(f"Cannot modify attribute {name}.")
5353
return object.__setattr__(self, name, value)

0 commit comments

Comments
 (0)