Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: astral-sh/ruff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.9
Choose a base ref
...
head repository: astral-sh/ruff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.10
Choose a head ref
Loading
Showing with 7,812 additions and 5,528 deletions.
  1. +4 −0 .github/dependabot.yml
  2. +2 −2 .github/workflows/ci.yaml
  3. +0 −247 .github/workflows/flake8-to-ruff.yaml
  4. +7 −7 .github/workflows/release.yaml
  5. +52 −0 CHANGELOG.md
  6. +9 −4 CONTRIBUTING.md
  7. +96 −137 Cargo.lock
  8. +68 −13 Cargo.toml
  9. +2 −1 README.md
  10. +0 −39 crates/flake8_to_ruff/Cargo.toml
  11. +0 −99 crates/flake8_to_ruff/README.md
  12. +0 −65 crates/flake8_to_ruff/examples/cryptography/pyproject.toml
  13. +0 −91 crates/flake8_to_ruff/examples/cryptography/setup.cfg
  14. +0 −19 crates/flake8_to_ruff/examples/jupyterhub.ini
  15. +0 −43 crates/flake8_to_ruff/examples/manim.ini
  16. +0 −36 crates/flake8_to_ruff/examples/poetry.ini
  17. +0 −19 crates/flake8_to_ruff/examples/python-discord.ini
  18. +0 −6 crates/flake8_to_ruff/examples/requests.ini
  19. +0 −34 crates/flake8_to_ruff/pyproject.toml
  20. +0 −13 crates/flake8_to_ruff/src/black.rs
  21. +0 −687 crates/flake8_to_ruff/src/converter.rs
  22. +0 −10 crates/flake8_to_ruff/src/external_config.rs
  23. +0 −10 crates/flake8_to_ruff/src/isort.rs
  24. +0 −80 crates/flake8_to_ruff/src/main.rs
  25. +0 −391 crates/flake8_to_ruff/src/parser.rs
  26. +0 −10 crates/flake8_to_ruff/src/pep621.rs
  27. +0 −368 crates/flake8_to_ruff/src/plugin.rs
  28. +0 −26 crates/flake8_to_ruff/src/pyproject.rs
  29. +11 −11 crates/ruff_benchmark/Cargo.toml
  30. +1 −1 crates/ruff_benchmark/benches/formatter.rs
  31. +13 −3 crates/ruff_benchmark/benches/linter.rs
  32. +1 −1 crates/ruff_benchmark/benches/parser.rs
  33. +1 −1 crates/ruff_cache/Cargo.toml
  34. +18 −25 crates/ruff_cli/Cargo.toml
  35. +35 −7 crates/ruff_cli/src/commands/format.rs
  36. +26 −14 crates/ruff_cli/src/diagnostics.rs
  37. +28 −1 crates/ruff_cli/tests/format.rs
  38. +4 −1 crates/ruff_cli/tests/integration_test.rs
  39. +6 −8 crates/ruff_dev/Cargo.toml
  40. +5 −4 crates/ruff_dev/src/format_dev.rs
  41. +12 −1 crates/ruff_dev/src/generate_rules_table.rs
  42. +1 −5 crates/ruff_dev/src/print_ast.rs
  43. +1 −1 crates/ruff_dev/src/round_trip.rs
  44. +1 −1 crates/ruff_formatter/Cargo.toml
  45. +1 −1 crates/ruff_index/Cargo.toml
  46. +17 −17 crates/ruff_linter/Cargo.toml
  47. +52 −0 crates/ruff_linter/resources/test/fixtures/flake8_annotations/auto_return_type.py
  48. +6 −1 crates/ruff_linter/resources/test/fixtures/flake8_bandit/S506.py
  49. +16 −0 crates/ruff_linter/resources/test/fixtures/flake8_django/DJ008.py
  50. +82 −0 crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI058.py
  51. +58 −0 crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI058.pyi
  52. +1 −1 crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM117.py
  53. +7 −0 crates/ruff_linter/resources/test/fixtures/flake8_type_checking/runtime_evaluated_decorators_3.py
  54. 0 crates/ruff_linter/resources/test/fixtures/pycodestyle/{E402.py → E402_0.py}
  55. +9 −0 crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_1.py
  56. +16 −0 crates/ruff_linter/resources/test/fixtures/pycodestyle/W293.py
  57. 0 crates/ruff_linter/resources/test/fixtures/pyflakes/{F404.py → F404_0.py}
  58. +5 −0 crates/ruff_linter/resources/test/fixtures/pyflakes/F404_1.py
  59. +8 −0 crates/ruff_linter/resources/test/fixtures/pyflakes/F821_24.py
  60. +5 −0 crates/ruff_linter/resources/test/fixtures/pyflakes/F821_25.py
  61. +58 −0 crates/ruff_linter/resources/test/fixtures/pylint/empty_comment.py
  62. +17 −19 crates/ruff_linter/resources/test/fixtures/pyupgrade/UP025.py
  63. +9 −0 crates/ruff_linter/resources/test/fixtures/pyupgrade/UP032_0.py
  64. +1 −1 crates/ruff_linter/resources/test/fixtures/pyupgrade/UP040.py
  65. +30 −0 crates/ruff_linter/resources/test/fixtures/refurb/FURB152.py
  66. +22 −0 crates/ruff_linter/resources/test/fixtures/refurb/FURB161.py
  67. +10 −0 crates/ruff_linter/resources/test/fixtures/ruff/RUF006.py
  68. +5 −0 crates/ruff_linter/resources/test/fixtures/ruff/RUF013_2.py
  69. +8 −0 crates/ruff_linter/resources/test/fixtures/ruff/RUF020.py
  70. +2 −0 crates/ruff_linter/resources/test/fixtures/ruff/ruff_per_file_ignores.py
  71. +12 −0 crates/ruff_linter/src/checkers/ast/analyze/expression.rs
  72. +3 −0 crates/ruff_linter/src/checkers/ast/analyze/statement.rs
  73. +19 −11 crates/ruff_linter/src/checkers/ast/annotation.rs
  74. +19 −12 crates/ruff_linter/src/checkers/ast/mod.rs
  75. +2 −14 crates/ruff_linter/src/checkers/logical_lines.rs
  76. +4 −2 crates/ruff_linter/src/checkers/noqa.rs
  77. +1 −0 crates/ruff_linter/src/checkers/physical_lines.rs
  78. +4 −0 crates/ruff_linter/src/checkers/tokens.rs
  79. +4 −0 crates/ruff_linter/src/codes.rs
  80. +4 −4 crates/ruff_linter/src/fix/edits.rs
  81. +1 −1 crates/ruff_linter/src/importer/insertion.rs
  82. +112 −21 crates/ruff_linter/src/linter.rs
  83. +106 −52 crates/ruff_linter/src/logging.rs
  84. +1 −0 crates/ruff_linter/src/registry.rs
  85. +1 −1 crates/ruff_linter/src/rules/eradicate/detection.rs
  86. +4 −3 crates/ruff_linter/src/rules/flake8_annotations/helpers.rs
  87. +68 −55 crates/ruff_linter/src/rules/flake8_annotations/rules/definition.rs
  88. +95 −0 ...flake8_annotations/snapshots/ruff_linter__rules__flake8_annotations__tests__auto_return_type.snap
  89. +113 −0 ...8_annotations/snapshots/ruff_linter__rules__flake8_annotations__tests__auto_return_type_py38.snap
  90. +1 −1 crates/ruff_linter/src/rules/flake8_bandit/rules/ssh_no_host_key_verification.rs
  91. +5 −1 crates/ruff_linter/src/rules/flake8_bandit/rules/unsafe_yaml_load.rs
  92. +9 −2 crates/ruff_linter/src/rules/flake8_boolean_trap/rules/boolean_type_hint_positional_argument.rs
  93. +1 −1 crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_any_all.rs
  94. +7 −7 ...ake8_comprehensions/snapshots/ruff_linter__rules__flake8_comprehensions__tests__C419_C419.py.snap
  95. +2 −2 crates/ruff_linter/src/rules/flake8_django/rules/helpers.rs
  96. +10 −6 crates/ruff_linter/src/rules/flake8_django/rules/model_without_dunder_str.rs
  97. +11 −19 crates/ruff_linter/src/rules/flake8_django/rules/nullable_model_string_field.rs
  98. +18 −18 ...r/src/rules/flake8_django/snapshots/ruff_linter__rules__flake8_django__tests__DJ001_DJ001.py.snap
  99. +8 −0 ...r/src/rules/flake8_django/snapshots/ruff_linter__rules__flake8_django__tests__DJ008_DJ008.py.snap
  100. +1 −2 crates/ruff_linter/src/rules/flake8_executable/rules/shebang_missing_executable_file.rs
  101. +1 −2 crates/ruff_linter/src/rules/flake8_executable/rules/shebang_not_executable.rs
  102. +0 −54 crates/ruff_linter/src/rules/flake8_pyi/helpers.rs
  103. +2 −1 crates/ruff_linter/src/rules/flake8_pyi/mod.rs
  104. +191 −0 crates/ruff_linter/src/rules/flake8_pyi/rules/bad_generator_return_type.rs
  105. +8 −12 crates/ruff_linter/src/rules/flake8_pyi/rules/duplicate_union_member.rs
  106. +10 −2 crates/ruff_linter/src/rules/flake8_pyi/rules/exit_annotations.rs
  107. +1 −1 crates/ruff_linter/src/rules/flake8_pyi/rules/future_annotations_in_stub.rs
  108. +2 −0 crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs
  109. +6 −4 crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_literal_union.rs
  110. +4 −5 crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_numeric_union.rs
  111. +5 −6 crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_literal_union.rs
  112. +4 −3 crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_type_union.rs
  113. +9 −0 ...inter/src/rules/flake8_pyi/snapshots/ruff_linter__rules__flake8_pyi__tests__PYI050_PYI050.py.snap
  114. +10 −0 ...nter/src/rules/flake8_pyi/snapshots/ruff_linter__rules__flake8_pyi__tests__PYI050_PYI050.pyi.snap
  115. +57 −0 ...inter/src/rules/flake8_pyi/snapshots/ruff_linter__rules__flake8_pyi__tests__PYI058_PYI058.py.snap
  116. +58 −0 ...nter/src/rules/flake8_pyi/snapshots/ruff_linter__rules__flake8_pyi__tests__PYI058_PYI058.pyi.snap
  117. +2 −2 ...rules/flake8_simplify/snapshots/ruff_linter__rules__flake8_simplify__tests__SIM117_SIM117.py.snap
  118. +18 −5 crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs
  119. +1 −0 crates/ruff_linter/src/rules/flake8_type_checking/mod.rs
  120. +41 −12 ..._type_checking__tests__typing-only-standard-library-import_runtime_evaluated_decorators_3.py.snap
  121. +1 −1 crates/ruff_linter/src/rules/isort/rules/add_required_imports.rs
  122. +17 −17 crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs
  123. +7 −1 crates/ruff_linter/src/rules/perflint/rules/incorrect_dict_iterator.rs
  124. +4 −2 crates/ruff_linter/src/rules/pycodestyle/mod.rs
  125. +6 −6 ...odestyle__tests__E402_E402.py.snap → ruff_linter__rules__pycodestyle__tests__E402_E402_0.py.snap}
  126. +22 −0 ...inter/src/rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__E402_E402_1.py.snap
  127. +63 −0 ..._linter/src/rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__W293_W293.py.snap
  128. +3 −3 ...review__E402_E402.py.snap → ruff_linter__rules__pycodestyle__tests__preview__E402_E402_0.py.snap}
  129. +6 −3 crates/ruff_linter/src/rules/pyflakes/mod.rs
  130. +1 −1 ...s__pyflakes__tests__F404_F404.py.snap → ruff_linter__rules__pyflakes__tests__F404_F404_0.py.snap}
  131. +12 −0 ...ruff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F404_F404_1.py.snap
  132. +4 −0 ...uff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F821_F821_24.py.snap
  133. +4 −0 ...uff_linter/src/rules/pyflakes/snapshots/ruff_linter__rules__pyflakes__tests__F821_F821_25.py.snap
  134. +1 −0 crates/ruff_linter/src/rules/pylint/mod.rs
  135. +4 −7 crates/ruff_linter/src/rules/pylint/rules/and_or_ternary.rs
  136. +107 −0 crates/ruff_linter/src/rules/pylint/rules/empty_comment.rs
  137. +2 −0 crates/ruff_linter/src/rules/pylint/rules/mod.rs
  138. +1 −1 crates/ruff_linter/src/rules/pylint/rules/too_many_branches.rs
  139. +1 −1 crates/ruff_linter/src/rules/pylint/rules/too_many_positional.rs
  140. +1 −1 crates/ruff_linter/src/rules/pylint/rules/too_many_return_statements.rs
  141. +18 −18 crates/ruff_linter/src/rules/pylint/rules/too_many_statements.rs
  142. +3 −3 ...src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLR0917_too_many_positional.py.snap
  143. +133 −0 ...inter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLR2044_empty_comment.py.snap
  144. +2 −2 ...uff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__max_positional_args.snap
  145. +40 −6 crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs
  146. +3 −1 crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs
  147. +192 −174 crates/ruff_linter/src/rules/pyupgrade/snapshots/ruff_linter__rules__pyupgrade__tests__UP025.py.snap
  148. +61 −0 ...s/ruff_linter/src/rules/pyupgrade/snapshots/ruff_linter__rules__pyupgrade__tests__UP032_0.py.snap
  149. +4 −4 crates/ruff_linter/src/rules/pyupgrade/snapshots/ruff_linter__rules__pyupgrade__tests__UP040.py.snap
  150. +1 −0 crates/ruff_linter/src/rules/refurb/mod.rs
  151. +185 −0 crates/ruff_linter/src/rules/refurb/rules/bit_count.rs
  152. +17 −3 crates/ruff_linter/src/rules/refurb/rules/math_constant.rs
  153. +2 −0 crates/ruff_linter/src/rules/refurb/rules/mod.rs
  154. +18 −5 crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs
  155. +264 −8 ...ruff_linter/src/rules/refurb/snapshots/ruff_linter__rules__refurb__tests__FURB152_FURB152.py.snap
  156. +191 −0 ...ruff_linter/src/rules/refurb/snapshots/ruff_linter__rules__refurb__tests__FURB161_FURB161.py.snap
  157. +21 −0 crates/ruff_linter/src/rules/ruff/mod.rs
  158. +11 −3 crates/ruff_linter/src/rules/ruff/rules/asyncio_dangling_task.rs
  159. +1 −1 crates/ruff_linter/src/rules/ruff/rules/helpers.rs
  160. +2 −2 crates/ruff_linter/src/rules/ruff/rules/invalid_index_type.rs
  161. +3 −1 crates/ruff_linter/src/rules/ruff/rules/mod.rs
  162. +212 −0 crates/ruff_linter/src/rules/ruff/rules/never_union.rs
  163. +1 −1 crates/ruff_linter/src/rules/ruff/rules/unreachable.rs
  164. +4 −0 crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF013_RUF013_2.py.snap
  165. +40 −40 crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF016_RUF016.py.snap
  166. +137 −0 crates/ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__RUF020_RUF020.py.snap
  167. +4 −0 .../ruff_linter/src/rules/ruff/snapshots/ruff_linter__rules__ruff__tests__ruff_per_file_ignores.snap
  168. +19 −19 crates/ruff_linter/src/rules/ruff/typing.rs
  169. +3 −3 crates/ruff_linter/src/test.rs
  170. +1 −1 crates/ruff_notebook/Cargo.toml
  171. +1 −3 crates/ruff_python_ast/Cargo.toml
  172. +7 −205 crates/ruff_python_ast/src/helpers.rs
  173. +1 −1 crates/ruff_python_ast/src/whitespace.rs
  174. +1 −1 crates/ruff_python_ast/tests/identifier.rs
  175. +8 −8 crates/ruff_python_ast/tests/parenthesize.rs
  176. +1 −1 crates/ruff_python_ast/tests/preorder.rs
  177. +2 −2 crates/ruff_python_ast/tests/stmt_if.rs
  178. +1 −1 crates/ruff_python_ast/tests/visitor.rs
  179. +3 −3 crates/ruff_python_codegen/src/generator.rs
  180. +2 −2 crates/ruff_python_codegen/src/lib.rs
  181. +1 −1 crates/ruff_python_formatter/Cargo.toml
  182. +1 −1 crates/ruff_python_formatter/resources/test/fixtures/black/cases/line_ranges_basic.py
  183. +1 −1 crates/ruff_python_formatter/resources/test/fixtures/black/cases/line_ranges_basic.py.expect
  184. +1 −1 crates/ruff_python_formatter/resources/test/fixtures/black/cases/pep604_union_types_line_breaks.py
  185. +1 −1 ...uff_python_formatter/resources/test/fixtures/black/cases/pep604_union_types_line_breaks.py.expect
  186. +1 −1 crates/ruff_python_formatter/resources/test/fixtures/import_black_tests.py
  187. +2 −2 crates/ruff_python_formatter/resources/test/fixtures/ruff/docstring_code_examples.py
  188. +2 −0 crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/bytes.py
  189. +5 −0 crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/string.py
  190. +20 −1 crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py
  191. +157 −0 crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/long_type_annotations.py
  192. +9 −0 crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/with.options.json
  193. +6 −0 crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/with_39.options.json
  194. +88 −0 crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/with_39.py
  195. +2 −2 crates/ruff_python_formatter/src/cli.rs
  196. +1 −1 crates/ruff_python_formatter/src/comments/mod.rs
  197. +1 −1 crates/ruff_python_formatter/src/expression/binary_like.rs
  198. +1 −1 crates/ruff_python_formatter/src/expression/expr_name.rs
  199. +87 −6 crates/ruff_python_formatter/src/expression/mod.rs
  200. +1 −1 crates/ruff_python_formatter/src/expression/parentheses.rs
  201. +10 −22 crates/ruff_python_formatter/src/lib.rs
  202. +2 −0 crates/ruff_python_formatter/src/other/bytes_literal.rs
  203. +2 −0 crates/ruff_python_formatter/src/other/f_string.rs
  204. +2 −0 crates/ruff_python_formatter/src/other/string_literal.rs
  205. +39 −16 crates/ruff_python_formatter/src/other/with_item.rs
  206. +29 −0 crates/ruff_python_formatter/src/preview.rs
  207. +8 −3 crates/ruff_python_formatter/src/statement/clause.rs
  208. +43 −5 crates/ruff_python_formatter/src/statement/stmt_ann_assign.rs
  209. +20 −4 crates/ruff_python_formatter/src/statement/stmt_assign.rs
  210. +115 −42 crates/ruff_python_formatter/src/statement/stmt_with.rs
  211. +31 −9 crates/ruff_python_formatter/src/statement/suite.rs
  212. +6 −14 crates/ruff_python_formatter/src/string/docstring.rs
  213. +202 −16 crates/ruff_python_formatter/src/string/mod.rs
  214. +37 −12 crates/ruff_python_formatter/tests/fixtures.rs
  215. +4 −4 crates/ruff_python_formatter/tests/snapshots/black_compatibility@cases__line_ranges_basic.py.snap
  216. +21 −40 ...ython_formatter/tests/snapshots/black_compatibility@cases__pep604_union_types_line_breaks.py.snap
  217. +0 −342 ...f_python_formatter/tests/snapshots/black_compatibility@cases__preview_context_managers_39.py.snap
  218. +0 −79 ...matter/tests/snapshots/black_compatibility@cases__preview_context_managers_autodetect_310.py.snap
  219. +0 −82 ...matter/tests/snapshots/black_compatibility@cases__preview_context_managers_autodetect_311.py.snap
  220. +0 −81 ...rmatter/tests/snapshots/black_compatibility@cases__preview_context_managers_autodetect_39.py.snap
  221. +0 −276 ...python_formatter/tests/snapshots/black_compatibility@cases__preview_dummy_implementations.py.snap
  222. +0 −97 ...on_formatter/tests/snapshots/black_compatibility@cases__preview_format_unicode_escape_seq.py.snap
  223. +22 −22 crates/ruff_python_formatter/tests/snapshots/format@docstring_code_examples.py.snap
  224. +66 −0 ...s/ruff_python_formatter/tests/snapshots/format@docstring_code_examples_dynamic_line_width.py.snap
  225. +6 −0 crates/ruff_python_formatter/tests/snapshots/format@expression__bytes.py.snap
  226. +63 −0 crates/ruff_python_formatter/tests/snapshots/format@expression__string.py.snap
  227. +97 −1 crates/ruff_python_formatter/tests/snapshots/format@newlines.py.snap
  228. +72 −0 crates/ruff_python_formatter/tests/snapshots/format@preview.py.snap
  229. +39 −0 crates/ruff_python_formatter/tests/snapshots/format@quote_style.py.snap
  230. +10 −0 crates/ruff_python_formatter/tests/snapshots/format@statement__ann_assign.py.snap
  231. +451 −0 crates/ruff_python_formatter/tests/snapshots/format@statement__long_type_annotations.py.snap
  232. +8 −6 crates/ruff_python_formatter/tests/snapshots/format@statement__top_level.py.snap
  233. +425 −1 crates/ruff_python_formatter/tests/snapshots/format@statement__with.py.snap
  234. +222 −0 crates/ruff_python_formatter/tests/snapshots/format@statement__with_39.py.snap
  235. +1 −4 crates/ruff_python_index/Cargo.toml
  236. +11 −2 crates/ruff_python_index/src/indexer.rs
  237. +5 −5 crates/ruff_python_literal/Cargo.toml
  238. +2 −2 crates/ruff_python_parser/Cargo.toml
  239. +18 −18 crates/ruff_python_parser/src/context.rs
  240. +2 −2 crates/ruff_python_parser/src/function.rs
  241. +376 −409 crates/ruff_python_parser/src/invalid.rs
  242. +29 −2 crates/ruff_python_parser/src/lexer.rs
  243. +10 −11 crates/ruff_python_parser/src/lib.rs
  244. +76 −109 crates/ruff_python_parser/src/parser.rs
  245. +44 −44 crates/ruff_python_parser/src/string.rs
  246. +2 −6 crates/ruff_python_parser/src/typing.rs
  247. +2 −2 crates/ruff_python_resolver/Cargo.toml
  248. +44 −2 crates/ruff_python_semantic/src/analyze/class.rs
  249. +1 −0 crates/ruff_python_semantic/src/analyze/mod.rs
  250. +234 −0 crates/ruff_python_semantic/src/analyze/terminal.rs
  251. +1 −1 crates/ruff_python_semantic/src/analyze/type_inference.rs
  252. +65 −2 crates/ruff_python_semantic/src/analyze/typing.rs
  253. +30 −16 crates/ruff_python_semantic/src/model.rs
  254. +0 −60 crates/ruff_python_stdlib/src/typing.rs
  255. +1 −0 crates/ruff_python_trivia/Cargo.toml
  256. +290 −1 crates/ruff_python_trivia/src/comment_ranges.rs
  257. +2 −1 crates/ruff_python_trivia/src/textwrap.rs
  258. +5 −5 crates/ruff_python_trivia/src/whitespace.rs
  259. +3 −3 crates/ruff_shrinking/Cargo.toml
  260. +1 −1 crates/ruff_shrinking/src/main.rs
  261. +7 −6 crates/ruff_source_file/src/lib.rs
  262. +2 −2 crates/ruff_text_size/Cargo.toml
  263. +6 −8 crates/ruff_wasm/Cargo.toml
  264. +8 −8 crates/ruff_wasm/src/lib.rs
  265. +3 −3 crates/ruff_workspace/Cargo.toml
  266. +6 −3 crates/ruff_workspace/src/options.rs
  267. +9 −5 crates/ruff_workspace/src/pyproject.rs
  268. +1 −2 crates/ruff_workspace/src/resolver.rs
  269. +3 −3 docs/integrations.md
  270. +3 −4 fuzz/Cargo.toml
  271. +3 −4 fuzz/fuzz_targets/ruff_parse_idempotency.rs
  272. +1 −1 fuzz/fuzz_targets/ruff_parse_simple.rs
  273. +1 −1 playground/src/Editor/SettingsEditor.tsx
  274. +1 −2 pyproject.toml
  275. +1 −1 python/ruff-ecosystem/pyproject.toml
  276. +26 −19 python/ruff-ecosystem/ruff_ecosystem/check.py
  277. +26 −3 python/ruff-ecosystem/ruff_ecosystem/defaults.py
  278. +51 −35 python/ruff-ecosystem/ruff_ecosystem/format.py
  279. +9 −2 python/ruff-ecosystem/ruff_ecosystem/main.py
  280. +118 −8 python/ruff-ecosystem/ruff_ecosystem/projects.py
  281. +12 −11 python/ruff/__main__.py
  282. +7 −1 ruff.schema.json
  283. +1 −1 scripts/benchmarks/pyproject.toml
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,10 @@ updates:
schedule:
interval: "weekly"
labels: ["internal"]
groups:
actions:
patterns:
- "*"

- package-ecosystem: "cargo"
directory: "/"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -95,9 +95,9 @@ jobs:
rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: "Clippy"
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- name: "Clippy (wasm)"
run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features -- -D warnings
run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features --locked -- -D warnings

cargo-test-linux:
runs-on: ubuntu-latest
247 changes: 0 additions & 247 deletions .github/workflows/flake8-to-ruff.yaml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release --out dist
args: --release --locked --out dist
- name: "Test wheel - x86_64"
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
@@ -112,7 +112,7 @@ jobs:
- name: "Build wheels - universal2"
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist
args: --release --locked --target universal2-apple-darwin --out dist
- name: "Test wheel - universal2"
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall
@@ -161,7 +161,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
args: --release --locked --out dist
- name: "Test wheel"
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
@@ -210,7 +210,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
args: --release --locked --out dist
- name: "Test wheel"
if: ${{ startsWith(matrix.target, 'x86_64') }}
run: |
@@ -269,7 +269,7 @@ jobs:
target: ${{ matrix.platform.target }}
manylinux: auto
docker-options: ${{ matrix.platform.maturin_docker_options }}
args: --release --out dist
args: --release --locked --out dist
- uses: uraimo/run-on-arch-action@v2
if: matrix.platform.arch != 'ppc64'
name: Test wheel
@@ -324,7 +324,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --out dist
args: --release --locked --out dist
- name: "Test wheel"
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
@@ -379,7 +379,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --out dist
args: --release --locked --out dist
docker-options: ${{ matrix.platform.maturin_docker_options }}
- uses: uraimo/run-on-arch-action@v2
name: Test wheel
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# Changelog

## 0.1.10

### Preview features

- Improve `dummy_implementations` preview style formatting ([#9240](https://github.com/astral-sh/ruff/pull/9240))
- Normalise Hex and unicode escape sequences in strings ([#9280](https://github.com/astral-sh/ruff/pull/9280))
- Parenthesize long type annotations in annotated assignments ([#9210](https://github.com/astral-sh/ruff/pull/9210))
- Parenthesize multi-context managers in `with` statements ([#9222](https://github.com/astral-sh/ruff/pull/9222))
- \[`flake8-pyi`\] Implement `generator-return-from-iter-method` (`PYI058`) ([#9313](https://github.com/astral-sh/ruff/pull/9313))
- \[`pylint`\] Implement `empty-comment` (`PLR2044`) ([#9174](https://github.com/astral-sh/ruff/pull/9174))
- \[`refurb`\] Implement `bit-count` (`FURB161`) ([#9265](https://github.com/astral-sh/ruff/pull/9265))
- \[`ruff`\] Add `never-union` rule to detect redundant `typing.NoReturn` and `typing.Never` ([#9217](https://github.com/astral-sh/ruff/pull/9217))

### CLI

- Add paths to TOML parse errors ([#9358](https://github.com/astral-sh/ruff/pull/9358))
- Add row and column numbers to formatter parse errors ([#9321](https://github.com/astral-sh/ruff/pull/9321))
- Improve responsiveness when invoked via Python ([#9315](https://github.com/astral-sh/ruff/pull/9315))
- Short rule messages should not end with a period ([#9345](https://github.com/astral-sh/ruff/pull/9345))

### Configuration

- Respect runtime-required decorators on functions ([#9317](https://github.com/astral-sh/ruff/pull/9317))

### Bug fixes

- Avoid `asyncio-dangling-task` for nonlocal and global bindings ([#9263](https://github.com/astral-sh/ruff/pull/9263))
- Escape trailing placeholders in rule documentation ([#9301](https://github.com/astral-sh/ruff/pull/9301))
- Fix continuation detection following multi-line strings ([#9332](https://github.com/astral-sh/ruff/pull/9332))
- Fix scoping for generators in named expressions in classes ([#9248](https://github.com/astral-sh/ruff/pull/9248))
- Port from obsolete wsl crate to is-wsl ([#9356](https://github.com/astral-sh/ruff/pull/9356))
- Remove special pre-visit for module docstrings ([#9261](https://github.com/astral-sh/ruff/pull/9261))
- Respect `__str__` definitions from super classes ([#9338](https://github.com/astral-sh/ruff/pull/9338))
- Respect `unused-noqa` via `per-file-ignores` ([#9300](https://github.com/astral-sh/ruff/pull/9300))
- Respect attribute chains when resolving builtin call paths ([#9309](https://github.com/astral-sh/ruff/pull/9309))
- Treat all `typing_extensions` members as typing aliases ([#9335](https://github.com/astral-sh/ruff/pull/9335))
- Use `Display` for formatter parse errors ([#9316](https://github.com/astral-sh/ruff/pull/9316))
- Wrap subscripted dicts in parens for f-string conversion ([#9238](https://github.com/astral-sh/ruff/pull/9238))
- \[`flake8-annotations`\] Avoid adding return types to stub methods ([#9277](https://github.com/astral-sh/ruff/pull/9277))
- \[`flake8-annotations`\] Respect mixed `return` and `raise` cases in return-type analysis ([#9310](https://github.com/astral-sh/ruff/pull/9310))
- \[`flake8-bandit`\] Don't report violations when `SafeLoader` is imported from `yaml.loader` (`S506`) ([#9299](https://github.com/astral-sh/ruff/pull/9299))
- \[`pylint`\] Avoid panic when comment is preceded by Unicode ([#9331](https://github.com/astral-sh/ruff/pull/9331))
- \[`pylint`\] Change `PLR0917` error message to match other `PLR09XX` messages ([#9308](https://github.com/astral-sh/ruff/pull/9308))
- \[`refurb`\] Avoid false positives for `math-constant` (`FURB152`) ([#9290](https://github.com/astral-sh/ruff/pull/9290))

### Documentation

- Expand target name for better rule documentation ([#9302](https://github.com/astral-sh/ruff/pull/9302))
- Fix typos found by codespell ([#9346](https://github.com/astral-sh/ruff/pull/9346))
- \[`perflint`\] Document `PERF102` fix un-safety ([#9351](https://github.com/astral-sh/ruff/pull/9351))
- \[`pyupgrade`\] Document `UP007` fix un-safety ([#9306](https://github.com/astral-sh/ruff/pull/9306))

## 0.1.9

### Breaking changes
Loading