Skip to content

Commit

Permalink
ignore N801
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Jan 23, 2025
1 parent 76ed079 commit 5003597
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions constantdict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _del_attr(self: Any, *args: Any, **kwargs: Any) -> None:


# type-ignore-reason: covariant type incompatible with Dict
class constantdict(Dict[K, V]): # type: ignore[type-var] # noqa: N801
class constantdict(Dict[K, V]): # type: ignore[type-var]
"""An immutable dictionary that does not allow modifications after
creation. This class behaves mostly like a :class:`dict`,
but with the following differences.
Expand Down Expand Up @@ -241,7 +241,7 @@ def mutate(self) -> constantdictmutation[K, V]:


# type-ignore-reason: covariant type incompatible with Dict
class constantdictmutation(Dict[K, V]): # type: ignore[type-var] # noqa: N801
class constantdictmutation(Dict[K, V]): # type: ignore[type-var]
"""A mutable dictionary that can be converted back to a
:class:`constantdict` without copying. This class behaves exactly like a
:class:`dict`, except for one additional method mentioned below.
Expand All @@ -266,7 +266,7 @@ def finish(self) -> constantdict[K, V]:
return self # type: ignore[return-value]


class constantdictuncachedhash(constantdict[K, V]): # noqa: N801
class constantdictuncachedhash(constantdict[K, V]):
"""A :class:`constantdict` that does not cache its hash
value. This is useful when the dictionary contains items that are not
immutable and whose hash value might therefore change.
Expand All @@ -288,7 +288,7 @@ def mutate(self) -> constantdictuncachedhashmutation[K, V]:
return constantdictuncachedhashmutation(self)


class constantdictuncachedhashmutation(constantdictmutation[K, V]): # noqa: N801
class constantdictuncachedhashmutation(constantdictmutation[K, V]):
"""A mutable dictionary that can be converted back to a
:class:`constantdictuncachedhash` without copying. This class behaves
exactly like a :class:`dict`, except for one additional method mentioned
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ extend-select = [
"W", # pycodestyle
]

extend-ignore = [
"N801",
]

[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
Expand Down

0 comments on commit 5003597

Please sign in to comment.