mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-29 03:02:27 +00:00
## Summary /closes #18895 ## Test Plan --------- Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
34 lines
No EOL
519 B
Python
34 lines
No EOL
519 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
|
|
|
|
# https://github.com/astral-sh/ruff/issues/18895
|
|
""u""
|
|
""u"hi"
|
|
""""""""""""""""""""u"hi"
|
|
""U"helloooo" |