Skip to content

Commit e1419cf

Browse files
committed
pre-commit
1 parent 2ed11e3 commit e1419cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/development/contributing_codebase.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ You should write
325325
326326
maybe_primes: list[Union[int, None]] = []
327327
328-
or
328+
or
329329

330330
.. code-block:: python
331331
@@ -338,7 +338,7 @@ You should write
338338
.. code-block:: python
339339
340340
from __future__ import annotations
341-
341+
342342
maybe_primes: list[int | None] = []
343343
344344
In some cases in the code base classes may define class variables that shadow builtins. This causes an issue as described in `Mypy 1775 <https://github.com/python/mypy/issues/1775#issuecomment-310969854>`_. The defensive solution here is to create an unambiguous alias of the builtin and use that without your annotation. For example, if you come across a definition like

0 commit comments

Comments
 (0)