ruff/crates
Dhruv Manilawala 96f6288622
Move UP034 to use TokenKind instead of Tok (#11424)
## Summary

This PR follows up from #11420 to move `UP034` to use `TokenKind`
instead of `Tok`.

The main reason to have a separate PR is so that the reviewing is easy.
This required a lot more updates because the rule used an index (`i`) to
keep track of the current position in the token vector. Now, as it's
just an iterator, we just use `next` to move the iterator forward and
extract the relevant information.

This is part of https://github.com/astral-sh/ruff/issues/11401

## Test Plan

`cargo test`
2024-05-14 17:28:04 +00:00
..
red_knot Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_benchmark Use tokenize for linter benchmark (#11417) 2024-05-14 10:28:40 -04:00
ruff_cache Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_dev Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_diagnostics Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_formatter Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_index Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_linter Move UP034 to use TokenKind instead of Tok (#11424) 2024-05-14 17:28:04 +00:00
ruff_macros Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_notebook Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_ast Implement IntoIterator for FStringElements (#11410) 2024-05-13 16:24:49 +00:00
ruff_python_ast_integration_tests Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_codegen Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_formatter Add Python 3.13 to list of allowed Python versions (#11411) 2024-05-13 16:35:41 +00:00
ruff_python_index Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_literal Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_parser Add Tokens newtype wrapper, TokenKind iterator (#11361) 2024-05-14 16:45:04 +00:00
ruff_python_resolver chore(deps): update rust crate insta to v1.38.0 (#10701) 2024-04-01 15:44:30 +00:00
ruff_python_semantic Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_stdlib Add Python 3.13 to list of allowed Python versions (#11411) 2024-05-13 16:35:41 +00:00
ruff_python_trivia Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_python_trivia_integration_tests Add Tokens newtype wrapper, TokenKind iterator (#11361) 2024-05-14 16:45:04 +00:00
ruff_server Add Tokens newtype wrapper, TokenKind iterator (#11361) 2024-05-14 16:45:04 +00:00
ruff_source_file Move sub-crates to workspace dependencies (#11407) 2024-05-13 14:37:50 +00:00
ruff_text_size Range formatting: Fix invalid syntax after parenthesizing expression (#9751) 2024-02-02 17:56:25 +01:00
ruff_wasm Add Tokens newtype wrapper, TokenKind iterator (#11361) 2024-05-14 16:45:04 +00:00
ruff_workspace Add Python 3.13 to list of allowed Python versions (#11411) 2024-05-13 16:35:41 +00:00