Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ruff's Perflint rule. #2969

Merged
merged 12 commits into from May 20, 2024
Merged

Conversation

CoolCat467
Copy link
Contributor

This pull request enables ruff's perflint rule and handles the associated fixes or ignores.

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.63%. Comparing base (7dbbac9) to head (41ee2a8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2969      +/-   ##
==========================================
- Coverage   99.63%   99.63%   -0.01%     
==========================================
  Files         117      117              
  Lines       17593    17578      -15     
  Branches     3173     3172       -1     
==========================================
- Hits        17528    17513      -15     
  Misses         46       46              
  Partials       19       19              
Files Coverage Δ
src/trio/_core/_tests/test_run.py 100.00% <100.00%> (ø)
src/trio/_subprocess.py 100.00% <100.00%> (ø)
src/trio/_tests/test_channel.py 100.00% <100.00%> (ø)
src/trio/_tests/test_exports.py 99.61% <100.00%> (ø)
src/trio/_tests/test_file_io.py 100.00% <100.00%> (ø)
src/trio/_tests/test_scheduler_determinism.py 100.00% <100.00%> (ø)
src/trio/_tests/test_socket.py 100.00% <100.00%> (ø)
src/trio/_tools/gen_exports.py 99.15% <100.00%> (-0.02%) ⬇️
src/trio/_unix_pipes.py 100.00% <100.00%> (ø)

src/trio/_core/_instrumentation.py Outdated Show resolved Hide resolved
@@ -723,7 +723,7 @@ async def read_output(
) -> None:
async with stream:
async for chunk in stream:
chunks.append(chunk)
chunks.append(chunk) # noqa: PERF402
Copy link
Contributor

@A5rocks A5rocks Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like PERF402 on an argument passed in is incorrect and probably is a bug...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created astral-sh/ruff#11316 for this

src/trio/_tests/test_socket.py Outdated Show resolved Hide resolved
Co-authored-by: EXPLOSION <git@helvetica.moe>
@CoolCat467
Copy link
Contributor Author

Updating branch to see if any changes with new ruff versions

@CoolCat467
Copy link
Contributor Author

pre-commit.ci autofix

Copy link
Contributor

@A5rocks A5rocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No thoughts, I accidentally redid my last comment. I guess the noqa bothers me that much lol

@CoolCat467
Copy link
Contributor Author

Given that astral-sh/ruff#11316 is still open, I am thinking of merging this soon unless anyone has any other comments.

@A5rocks A5rocks merged commit a23b727 into python-trio:master May 20, 2024
28 checks passed
@CoolCat467 CoolCat467 deleted the enable-perflint branch May 20, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants