---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
RUF067 `__init__` module should only contain docstrings and re-exports
  --> __init__.py:12:1
   |
10 | __all__ = __all__ = __all__
11 |
12 | MY_CONSTANT = 5
   | ^^^^^^^^^^^^^^^
13 | """This is an important constant."""
   |

RUF067 `__init__` module should only contain docstrings and re-exports
  --> __init__.py:15:1
   |
13 | """This is an important constant."""
14 |
15 | os.environ["FOO"] = 1
   | ^^^^^^^^^^^^^^^^^^^^^
   |

RUF067 `__init__` module should only contain docstrings and re-exports
  --> __init__.py:18:1
   |
18 | / def foo():
19 | |     return Path("foo.py")
   | |_________________________^
20 |
21 |   def __getattr__(name):  # ok
   |

RUF067 `__init__` module should only contain docstrings and re-exports
  --> __init__.py:26:1
   |
24 |   __path__ = __import__('pkgutil').extend_path(__path__, __name__)  # ok
25 |
26 | / if os.environ["FOO"] != "1":  # RUF067
27 | |     MY_CONSTANT = 4  # ok, don't flag nested statements
   | |___________________^
28 |
29 |   if TYPE_CHECKING:  # ok
   |

RUF067 `__init__` module should only contain docstrings and re-exports
  --> __init__.py:54:1
   |
52 | __submodules__ += ["extra"]  # ok
53 |
54 | foo = __submodules__ = []  # RUF067: not every target is a dunder
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
55 | __all__[0] = __version__ = "1"  # RUF067: subscript target is not a simple name
   |

RUF067 `__init__` module should only contain docstrings and re-exports
  --> __init__.py:55:1
   |
54 | foo = __submodules__ = []  # RUF067: not every target is a dunder
55 | __all__[0] = __version__ = "1"  # RUF067: subscript target is not a simple name
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 |
57 | # also allow `__author__`
   |
