mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00

This ensures that we visit the module docstring like any other string. Closes https://github.com/astral-sh/ruff/issues/9260.
50 lines
482 B
Python
50 lines
482 B
Python
"""Top-level docstring."""
|
|
|
|
__all__ = ["y"]
|
|
__version__: str = "0.1.0"
|
|
|
|
import a
|
|
|
|
try:
|
|
import b
|
|
except ImportError:
|
|
pass
|
|
else:
|
|
pass
|
|
|
|
import c
|
|
|
|
if x > 0:
|
|
import d
|
|
else:
|
|
import e
|
|
|
|
import sys
|
|
sys.path.insert(0, "some/path")
|
|
|
|
import f
|
|
|
|
import matplotlib
|
|
|
|
matplotlib.use("Agg")
|
|
|
|
import g
|
|
|
|
__some__magic = 1
|
|
|
|
import h
|
|
|
|
|
|
def foo() -> None:
|
|
import i
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import j
|
|
|
|
import k; import l
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import m; \
|
|
import n
|