-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
vellum-ai/vellum-python-sdks
#1139Labels
bugSomething isn't workingSomething isn't workingformatterRelated to the formatterRelated to the formatter
Description
Summary
Description
Ruff formatter modifies the spacing in a string within a docstring when the string contains an escaped quote. Specifically, it adds an unwanted space between the escaped quote and the closing triple quotes of the docstring.
Steps to Reproduce
- Create a Python class with the following content:
class Sample: """Hello "World\"""" def __init__(self, name): self.name = name
- Run
ruff formaton the file - Observe that the formatter modifies the docstring to:
class Sample: """Hello "World\" """ def __init__(self, name): self.name = name
Expected Behavior
Docstring remain unchanged after formatting as its escaped already
"""Hello "World\""""
Version
ruff 0.9.10 (0dfa810 2025-03-07)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingformatterRelated to the formatterRelated to the formatter