Is your feature request related to a problem? Please describe.
Python 3.15 adds support for the lazy soft keyword:
This has now available for testing in Python 3.15.0a7:
Describe the solution you'd like
Add support for the lazy soft keyword.
Describe alternatives you've considered
Wait for the next Ruff release? astral-sh/ruff#21305
Additional context
lazy import random
if __name__ == "__main__":
print(random.randint(1, 6))
❯ black --version
black, 26.3.0 (compiled: yes)
Python (CPython) 3.14.3
❯ black 1.py
error: cannot format 1.py: Cannot parse: 1:5: lazy import random
Oh no! 💥 💔 💥
1 file failed to reformat.
Is your feature request related to a problem? Please describe.
Python 3.15 adds support for the
lazysoft keyword:This has now available for testing in Python 3.15.0a7:
Describe the solution you'd like
Add support for the
lazysoft keyword.Describe alternatives you've considered
Wait for the next Ruff release? astral-sh/ruff#21305
Additional context