FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Ruff rules for comprehensions and performance by cclauss · Pull Request #329 · cpplint/cpplint · GitHub

Ruff rules for comprehensions and performance - #329

Merged
aaronliu0130 merged 2 commits into
developfrom
ruff-rules-C4-and-PERF
Mar 11, 2025
Merged

Ruff rules for comprehensions and performance#329
aaronliu0130 merged 2 commits into
developfrom
ruff-rules-C4-and-PERF

Conversation

cclauss commented Mar 7, 2025
edited
Loading

Copy link
Copy Markdown
Member

% ruff check --select=C4,PERF --output-format=concise

cpplint.py:60:21: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:829:22: C404 Unnecessary list comprehension (rewrite as a dict comprehension)
cpplint.py:948:16: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:1041:10: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:1046:59: C405 Unnecessary list literal (rewrite as a set literal)
cpplint.py:1104:23: C417 Unnecessary `map()` usage (rewrite using a set comprehension)
cpplint.py:6072:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6088:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6096:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6106:5: PERF401 Use `list.extend` to create a transformed list
cpplint.py:6743:31: C414 Unnecessary `list()` call within `sorted()`
cpplint.py:6744:17: C414 Unnecessary `list()` call within `sorted()`
cpplint.py:6930:7: PERF401 Use a list comprehension to create a transformed list
cpplint_unittest.py:4262:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4268:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4274:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4275:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4281:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4282:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4332:32: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4333:37: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4358:24: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:4376:18: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:5630:28: C405 Unnecessary list literal (rewrite as a set literal)
cpplint_unittest.py:5631:33: C405 Unnecessary list literal (rewrite as a set literal)
Found 25 errors.
No fixes available (20 hidden fixes can be enabled with the `--unsafe-fixes` option).

cclauss force-pushed the ruff-rules-C4-and-PERF branch from bfa7806 to 13c4725 Compare March 7, 2025 14:21
Comment thread cpplint.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

double space at "_USAGE " - odd that ruff isnt picking that up

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This will be automatically fixed when we add ruff format to pre-commit.

cclauss requested review from aaronliu0130 and jayvdb March 8, 2025 06:16
cclauss force-pushed the ruff-rules-C4-and-PERF branch from 19ec1b4 to c2afaa7 Compare March 8, 2025 12:38
cclauss force-pushed the ruff-rules-C4-and-PERF branch from c2afaa7 to b181eaa Compare March 11, 2025 18:17

cclauss commented Mar 11, 2025

Copy link
Copy Markdown
Member Author

Reviews please.

aaronliu0130 merged commit 776a72b into develop Mar 11, 2025
cclauss deleted the ruff-rules-C4-and-PERF branch March 11, 2025 21:34
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL