Merged
Conversation
Contributor
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+6, -6, 0 error(s)) airflow (+4, -4)
- [*] 15842 fixable with the `--fix` option (6478 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 15845 fixable with the `--fix` option (6478 hidden fixes can be enabled with the `--unsafe-fixes` option). - airflow/cli/commands/task_command.py:80:21: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal[False, "db", "memory"]` + airflow/cli/commands/task_command.py:80:21: PYI030 [*] Multiple literal members in a union. Use a single literal, e.g. `Literal[False, "db", "memory"]` - airflow/models/mappedoperator.py:85:20: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal["expand", "partial"]` + airflow/models/mappedoperator.py:85:20: PYI030 [*] Multiple literal members in a union. Use a single literal, e.g. `Literal["expand", "partial"]` - airflow/providers_manager.py:195:24: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal["source", "package"]` + airflow/providers_manager.py:195:24: PYI030 [*] Multiple literal members in a union. Use a single literal, e.g. `Literal["source", "package"]` bokeh (+2, -2)
- [*] 17725 fixable with the `--fix` option (4795 hidden fixes can be enabled with the `--unsafe-fixes` option). + [*] 17726 fixable with the `--fix` option (4795 hidden fixes can be enabled with the `--unsafe-fixes` option). - src/bokeh/core/serialization.py:149:25: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal["bool", "object"]` + src/bokeh/core/serialization.py:149:25: PYI030 [*] Multiple literal members in a union. Use a single literal, e.g. `Literal["bool", "object"]`
|
crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_literal_union.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_literal_union.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/flake8_pyi/rules/unnecessary_literal_union.rs
Outdated
Show resolved
Hide resolved
Contributor
|
Thank you @diceroll123 and @charliermarsh!! 🥳 |
T-256
reviewed
Oct 11, 2023
Comment on lines
+178
to
+179
| 31 |-field8: Literal[1] | (Literal[2] | str) # Error | ||
| 31 |+field8: Literal[1, 2] # Error |
Contributor
There was a problem hiding this comment.
Here expected Literal[1, 2] | str is the correct fix (?)
konstin
pushed a commit
that referenced
this pull request
Oct 11, 2023
Merged
zanieb
added a commit
that referenced
this pull request
Oct 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds autofix to
PYI030Closes #7854.
Unsure if the cloning method I chose is the best solution here, feel free to suggest alternatives!
Test Plan
cargo testas well as manually