[ruff] itertools.starmap(..., zip(...)) (RUF058)#15483
[ruff] itertools.starmap(..., zip(...)) (RUF058)#15483MichaReiser merged 8 commits intoastral-sh:mainfrom
ruff] itertools.starmap(..., zip(...)) (RUF058)#15483Conversation
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| RUF058 | 2 | 2 | 0 | 0 | 0 |
Formatter (stable)
ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)
openai/openai-cookbook (error)
warning: Detected debug build without --no-cache.
error: Failed to read examples/Assistants_API_overview_python.ipynb: Expected a Jupyter Notebook, which must be internally stored as JSON, but this file isn't valid JSON: expected `,` or `]` at line 197 column 8
Formatter (preview)
ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)
openai/openai-cookbook (error)
ruff format --preview
warning: Detected debug build without --no-cache.
error: Failed to read examples/Assistants_API_overview_python.ipynb: Expected a Jupyter Notebook, which must be internally stored as JSON, but this file isn't valid JSON: expected `,` or `]` at line 197 column 8
There was a problem hiding this comment.
Thank you. I don't think we can implement this right now without changing FURB140. You can see in this playground that FURB140 recommends using starmap for map(..., zip). I think this is what I meant that we have to change FURB140 first but I incorrectly wrote map instead of saying that it shouldn't apply to zip.
|
I'll close this PR for now so that we can have the discussion in a single place. We can re-open it once we decide that the rule should be added and |
MichaReiser
left a comment
There was a problem hiding this comment.
I pushed a commit that simplifies the fix a bit. I'm mainly trying to avoid using the tokens where they aren't strictly necessary because they add a fair bit of complexity and it's very easy to get them wrong.
012b7ba to
8c81ddf
Compare
|
The changes are nice, especially the extra |
|
I think it requires a rebase (github rebases your changes on main before running the checks) |
5656447 to
7898991
Compare
Summary
Resolves #15481, resolves #14835.
Test Plan
cargo nextest runandcargo insta test.