mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
15 lines
266 B
Python
15 lines
266 B
Python
"""Test that `__all__` exports are respected even with multiple declarations."""
|
|
|
|
import random
|
|
|
|
|
|
def some_dependency_check():
|
|
return random.uniform(0.0, 1.0) > 0.49999
|
|
|
|
|
|
if some_dependency_check():
|
|
import math
|
|
|
|
__all__ = ["math"]
|
|
else:
|
|
__all__ = []
|