ruff/crates/ruff_source_file/src
konsti babf8d718e
Fix D204 when there's a semicolon after a docstring (#7174)
## Summary

Another statement on the same line as the docstring would previous make
the D204 (newline after docstring) fix fail:

```python
class StatementOnSameLineAsDocstring:
    "After this docstring there's another statement on the same line separated by a semicolon." ;priorities=1
    def sort_services(self):
        pass
```

The fix handles this case manually:

```python
class StatementOnSameLineAsDocstring:
    "After this docstring there's another statement on the same line separated by a semicolon."

    priorities=1
    def sort_services(self):
        pass
```

Fixes #7088

## Test Plan

Added a new `D` test case
2023-09-11 15:09:47 +02:00
..
lib.rs Allow Locator#slice to take Ranged (#6922) 2023-08-28 11:08:39 -04:00
line_index.rs Remove parser dependency from ruff-python-ast (#6096) 2023-07-26 17:47:22 +02:00
locator.rs Fixed panic in missing_copyright_notice (#7029) 2023-09-01 13:58:48 +00:00
newlines.rs Fix D204 when there's a semicolon after a docstring (#7174) 2023-09-11 15:09:47 +02:00