ruff/crates/ruff_linter/resources/test/fixtures
Charlie Marsh a3e67abf4c
Add newlines before comments in E305 (#12606)
## Summary

There's still a problem here. Given:

```python
class Class():
    pass

    # comment

    # another comment
a = 1
```

We only add one newline before `a = 1` on the first pass, because
`max_precedling_blank_lines` is 1... We then add the second newline on
the second pass, so it ends up in the right state, but the logic is
clearly wonky.

Closes https://github.com/astral-sh/ruff/issues/11508.
2024-07-31 23:11:00 -04:00
..
airflow Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
control-flow-graph Add erroneous for-loop test case for CFG (#8957) 2023-12-01 23:11:42 +00:00
eradicate Avoid code comment detection in PEP 723 script tags (#10464) 2024-03-18 17:48:51 -04:00
fastapi [`fastapi`] Implement `FAST001` (`fastapi-redundant-response-model`) and `FAST002` (`fastapi-non-annotated-dependency`) (#11579) 2024-07-21 18:28:10 +00:00
filesystem Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_2020 Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_annotations Handle raises with implicit alternate branches (#9377) 2024-01-02 22:59:12 -05:00
flake8_async Avoid unused async when context manager includes `TaskGroup` (#12605) 2024-08-01 02:12:43 +00:00
flake8_bandit [`flake8-bandit`] Support explicit string concatenations in S310 HTTP detection (#12315) 2024-07-14 10:44:08 -04:00
flake8_blind_except Respect logged and re-raised expressions in nested statements (#11301) 2024-05-05 21:52:09 -04:00
flake8_boolean_trap [`flake8-boolean-trap`] Add setting for user defined allowed boolean trap (#10531) 2024-03-30 00:26:12 +00:00
flake8_bugbear Improve handling of metaclasses in various linter rules (#12579) 2024-07-30 14:48:36 +01:00
flake8_builtins [`flake8-builtins`] Implement import, lambda, and module shadowing (#12546) 2024-07-29 01:42:42 +00:00
flake8_commas Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
flake8_comprehensions Raise syntax error for unparenthesized generator expr in multi-argument call (#12445) 2024-07-22 14:44:20 +05:30
flake8_datetimez Allow f-strings with `%z` for `DTZ007` (#10651) 2024-03-29 09:57:13 +05:30
flake8_debugger Check for use of `debugpy` and `ptvsd` debug modules (#10177) (#10194) 2024-03-01 23:02:44 -05:00
flake8_django Respect `__str__` definitions from super classes (#9338) 2023-12-31 22:25:08 +00:00
flake8_errmsg Allow `EM` fixes even if `msg` variable is defined (#9059) 2023-12-08 15:16:15 -06:00
flake8_executable Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_fixme Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_future_annotations Avoid flagging `__future__` annotations as required for non-evaluated type annotations (#11414) 2024-05-21 18:57:13 +00:00
flake8_gettext Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_implicit_str_concat Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
flake8_import_conventions Accept non-aliased (but correct) import in unconventional-import-alias (#10729) 2024-04-01 23:47:20 -04:00
flake8_logging Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
flake8_logging_format Include inline instantiations when detecting loggers (#11154) 2024-04-25 21:00:12 -04:00
flake8_no_pep420 Avoid missing namespace violations in scripts with shebangs (#8710) 2023-11-16 17:21:33 -05:00
flake8_pie [`flake8-pie`] Preserve parentheses in `unnecessary-dict-kwargs` (#11372) 2024-05-11 18:04:54 -04:00
flake8_print Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_pyi [`flake8-pyi`] Implement `PYI063` (#11699) 2024-06-04 03:15:04 +00:00
flake8_pytest_style [`flake8-pytest-style`] Fix single-tuple conversion in `pytest-parametrize-values-wrong-type` (#10862) 2024-04-10 14:20:09 -04:00
flake8_quotes Add semantic model flag when inside f-string replacement field (#10766) 2024-04-04 09:08:48 +05:30
flake8_raise Avoid false-positives for parens-on-raise with futures.exception() (#10206) 2024-03-03 00:28:51 +00:00
flake8_return Consider more stdlib decorators to be property-like (#12583) 2024-07-30 17:18:23 +00:00
flake8_self [`flake8-self`] Ignore sunder accesses in `flake8-self` rule (#11546) 2024-05-26 13:57:24 -04:00
flake8_simplify Redirect `PLR1701` to `SIM101` (#12021) 2024-06-27 13:44:11 +02:00
flake8_slots Avoid recommending `__slots__` for classes that inherit from more than `namedtuple` (#12531) 2024-07-26 14:24:40 +00:00
flake8_tidy_imports Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_todos Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_type_checking Treat all `singledispatch` arguments as runtime-required (#11523) 2024-05-23 20:36:24 -04:00
flake8_unused_arguments Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
flake8_use_pathlib Show custom message for `Path.joinpath` with starred arguments (#7852) 2023-10-09 12:04:35 +00:00
flynt Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
isort Avoid marking required imports as unused (#12537) 2024-07-26 14:23:43 -04:00
mccabe Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
numpy Ignore `NPY201` inside `except` blocks for compatibility with older numpy versions (#12490) 2024-07-24 20:03:23 +00:00
pandas_vet Limit inplace diagnostics to methods that accept inplace (#9495) 2024-01-12 14:12:54 -05:00
pep8_naming Avoid debug assertion around NFKC renames (#11249) 2024-05-02 10:59:39 -07:00
perflint Ignore list-copy recommendations for async `for` loops (#11250) 2024-05-02 11:48:52 -07:00
pycodestyle Add newlines before comments in E305 (#12606) 2024-07-31 23:11:00 -04:00
pydoclint Improve consistency between linter rules in determining whether a function is property (#12581) 2024-07-30 17:42:04 +01:00
pydocstyle [pydocstyle] Escaped docstring in docstring (D301 ) (#12192) 2024-07-18 18:36:05 -04:00
pyflakes Fix NFKC normalization bug when removing unused imports (#12571) 2024-07-30 09:54:35 +00:00
pygrep_hooks Respect per-file ignores for blanket and redirected noqa rules (#11728) 2024-06-04 03:57:59 +00:00
pylint Respect start index in `unnecessary-list-index-lookup` (#12603) 2024-08-01 01:21:15 +00:00
pyupgrade Use colon rather than dot formatting for integer-only types (#12534) 2024-07-26 15:48:19 +00:00
refurb Avoid suggesting starmap when arguments are used outside call (#11830) 2024-06-10 17:10:06 -04:00
ruff Treat `not` operations as boolean tests (#12301) 2024-07-12 08:53:37 -04:00
tryceratops Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00