ruff/crates
David Peter b33cf5baba
[red-knot] Move UnionBuilder tests to Markdown (#15374)
## Summary

This moves almost all of our existing `UnionBuilder` tests to a
Markdown-based test suite.

I see how this could be a more controversial change, since these tests
where written specifically for `UnionBuilder`, and by creating the union
types using Python type expressions, we add an additional layer on top
(parsing and inference of these expressions) that moves these tests away
from clean unit tests more in the direction of integration tests. Also,
there are probably a few implementation details of `UnionBuilder` hidden
in the test assertions (e.g. order of union elements after
simplifications).

That said, I think we would like to see all those properties that are
being tested here from *any* implementation of union types. And the
Markdown tests come with the usual advantages:

- More consice
- Better readability
- No re-compiliation when working on tests
- Easier to add additional explanations and structure to the test suite

This changeset adds a few additional tests, but keeps the logic of the
existing tests except for a few minor modifications for consistency.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
2025-01-09 21:45:06 +01:00
..
red_knot Upgrade salsa (#15039) 2024-12-17 15:50:33 +00:00
red_knot_python_semantic [red-knot] Move UnionBuilder tests to Markdown (#15374) 2025-01-09 21:45:06 +01:00
red_knot_server Improve logging system using logLevel, avoid trace value (#15232) 2025-01-08 18:18:00 +05:30
red_knot_test [red-knot] Print non-string panic payloads and (sometimes) backtraces (#15363) 2025-01-08 18:12:16 -05:00
red_knot_vendored [red-knot] Minor refactor of red_knot_vendored/build.rs (#15372) 2025-01-09 12:23:42 +00:00
red_knot_wasm Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
red_knot_workspace Don't special-case class instances in binary expression inference (#15161) 2025-01-06 13:50:20 -05:00
ruff Release 0.9.0 (#15371) 2025-01-09 14:53:08 +01:00
ruff_benchmark [red-knot] all types are assignable to object (#15332) 2025-01-07 15:19:07 -08:00
ruff_cache
ruff_db [red-knot] Print non-string panic payloads and (sometimes) backtraces (#15363) 2025-01-08 18:12:16 -05:00
ruff_dev
ruff_diagnostics Show errors for attempted fixes only when passed --verbose (#15237) 2025-01-03 08:50:13 -06:00
ruff_formatter More typos found by codespell (#14880) 2024-12-09 22:47:34 +00:00
ruff_graph type: ignore[codes] and knot: ignore (#15078) 2024-12-23 10:52:43 +01:00
ruff_index
ruff_linter [pycodestyle] Handle each cell separately for too-many-newlines-at-end-of-file (W391) (#15308) 2025-01-09 10:50:39 -06:00
ruff_macros [red-knot] Add infrastructure to declare lints (#14873) 2024-12-10 16:14:44 +00:00
ruff_notebook
ruff_python_ast [RUF] Add rule to detect empty literal in deque call (RUF025) (#15104) 2025-01-03 11:57:13 +01:00
ruff_python_ast_integration_tests
ruff_python_codegen ruff_python_ast: Make Singleton Copy (#14943) 2024-12-12 20:49:54 +01:00
ruff_python_formatter Add f-string formatting to the docs (#15367) 2025-01-09 10:20:06 +01:00
ruff_python_index
ruff_python_literal Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_python_parser Modify parsing of raise with cause when exception is absent (#15049) 2024-12-19 13:36:32 +00:00
ruff_python_resolver
ruff_python_semantic [flake8-type-checking] Apply TC008 more eagerly in TYPE_CHECKING blocks and disapply it in stubs (#15180) 2025-01-08 12:09:06 +00:00
ruff_python_stdlib Revert "Add all PEP-585 names to UP006 rule" (#15250) 2025-01-04 12:23:53 +01:00
ruff_python_trivia type: ignore[codes] and knot: ignore (#15078) 2024-12-23 10:52:43 +01:00
ruff_python_trivia_integration_tests
ruff_server [ruff] Stop parsing diagnostics from other sources for code action requests (#15373) 2025-01-09 14:38:13 +01:00
ruff_source_file [pyupgrade] Do not report when a UTF-8 comment is followed by a non-UTF-8 one (UP009) (#14728) 2024-12-11 10:30:41 +00:00
ruff_text_size
ruff_wasm Release 0.9.0 (#15371) 2025-01-09 14:53:08 +01:00
ruff_workspace [flake8-bugbear] Implement class-as-data-structure (B903) (#9601) 2025-01-06 21:18:28 -06:00