ruff/crates/ruff_linter/resources/test/fixtures/pyupgrade/UP025.py
Charlie Marsh 20def33fb7
Remove special pre-visit for module docstrings (#9261)
This ensures that we visit the module docstring like any other string.

Closes https://github.com/astral-sh/ruff/issues/9260.
2023-12-23 10:03:12 -05:00

28 lines
416 B
Python

u"Hello"
x = u"Hello" # UP025
u'world' # UP025
print(u"Hello") # UP025
print(u'world') # UP025
import foo
foo(u"Hello", U"world", a=u"Hello", b=u"world") # UP025
# Retain quotes when fixing.
x = u'hello' # UP025
x = u"""hello""" # UP025
x = u'''hello''' # UP025
x = u'Hello "World"' # UP025
u = "Hello" # OK
u = u # OK
def hello():
return"Hello" # OK
f"foo"u"bar" # OK
f"foo" u"bar" # OK