mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-09 10:00:25 +00:00

Some checks failed
CI / Determine changes (push) Has been cancelled
CI / cargo fmt (push) Has been cancelled
CI / cargo build (release) (push) Has been cancelled
CI / python package (push) Has been cancelled
CI / pre-commit (push) Has been cancelled
CI / mkdocs (push) Has been cancelled
CI / cargo clippy (push) Has been cancelled
CI / cargo test (linux) (push) Has been cancelled
CI / cargo test (linux, release) (push) Has been cancelled
CI / cargo test (windows) (push) Has been cancelled
CI / cargo test (wasm) (push) Has been cancelled
CI / cargo build (msrv) (push) Has been cancelled
CI / cargo fuzz build (push) Has been cancelled
CI / fuzz parser (push) Has been cancelled
CI / test scripts (push) Has been cancelled
CI / ecosystem (push) Has been cancelled
CI / cargo shear (push) Has been cancelled
CI / formatter instabilities and black similarity (push) Has been cancelled
CI / test ruff-lsp (push) Has been cancelled
CI / benchmarks (push) Has been cancelled
## Summary This pull request renames 19 rules which currently do not conform to Ruff's [naming convention](https://github.com/astral-sh/ruff/blob/main/CONTRIBUTING.md#rule-naming-convention). ## Description Fixes astral-sh/ruff#15009.
87 lines
1 KiB
Python
87 lines
1 KiB
Python
"""Test: blank-line-after-function special-cases around comment handling."""
|
|
|
|
# OK
|
|
def outer():
|
|
"""This is a docstring."""
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# OK
|
|
def outer():
|
|
"""This is a docstring."""
|
|
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# OK
|
|
def outer():
|
|
"""This is a docstring."""
|
|
# This is a comment.
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# OK
|
|
def outer():
|
|
"""This is a docstring."""
|
|
|
|
# This is a comment.
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# OK
|
|
def outer():
|
|
"""This is a docstring."""
|
|
|
|
# This is a comment.
|
|
# Followed by another comment.
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# D202
|
|
def outer():
|
|
"""This is a docstring."""
|
|
|
|
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# D202
|
|
def outer():
|
|
"""This is a docstring."""
|
|
|
|
|
|
# This is a comment.
|
|
def inner():
|
|
return
|
|
|
|
return inner
|
|
|
|
|
|
# D202
|
|
def outer():
|
|
"""This is a docstring."""
|
|
|
|
# This is a comment.
|
|
|
|
def inner():
|
|
return
|
|
|
|
return inner
|