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

style: Fixes some unnecessary-lambda (PLW0108) #3956

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

echoix
Copy link
Member

@echoix echoix commented Jun 30, 2024

Concerns Pylint rule "unnecessary-lambda / W0108"

Using ruff check --output-format=concise --select PLW0108 --preview --fix --unsafe-fixes.

Didn't apply to cases where it wasn't clear if it was safe.

Part of the effort to introduce Pylint 3.x for #3921

Uses the fixes provided for ruff rule unnecessary-lambda (PLW0108) to fix part of Pylint's "unnecessary-lambda / W0108".

Concerns Pylint rule "unnecessary-lambda / W0108"

Using `ruff check --output-format=concise --select PLW0108 --preview --fix --unsafe-fixes`.

Didn't apply to cases where it wasn't clear if it was safe
@echoix echoix added this to the 8.5.0 milestone Jun 30, 2024
@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Jun 30, 2024
@echoix
Copy link
Member Author

echoix commented Jul 1, 2024

To help reviewing, it is useful to know that some of the changes happen to align to a pattern already used inside the same file, like for the "connect()" functions, like here: https://github.com/OSGeo/grass/pull/3956/files#diff-d14bd7d2a6d585d27253c5e579b216708d09a8f4c063c565980e5e7194f5993aR208-R209

Copy link
Member

@ninsbl ninsbl left a comment

Choose a reason for hiding this comment

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

I am not too familiar with lambda expressions, but changes look consistent and according to style-guide.

@echoix echoix merged commit 0cc7cbf into OSGeo:main Jul 2, 2024
26 checks passed
@echoix echoix deleted the fix-unnecessary-lambda branch July 2, 2024 02:41
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
Concerns Pylint rule "unnecessary-lambda / W0108"

Using `ruff check --output-format=concise --select PLW0108 --preview --fix --unsafe-fixes`.

Didn't apply to cases where it wasn't clear if it was safe
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 23, 2024
Concerns Pylint rule "unnecessary-lambda / W0108"

Using `ruff check --output-format=concise --select PLW0108 --preview --fix --unsafe-fixes`.

Didn't apply to cases where it wasn't clear if it was safe
echoix added a commit to echoix/grass that referenced this pull request Aug 2, 2024
echoix added a commit that referenced this pull request Aug 3, 2024
#4127)

* Revert "style: Fixes some unnecessary-lambda (PLW0108) (#3956)"

This reverts commit 0cc7cbf.

* ruff: Ignore unnecessary-lambda (PLW0108) in gui
Mahesh1998 pushed a commit to Mahesh1998/grass that referenced this pull request Sep 19, 2024
…3956)" (OSGeo#4127)

* Revert "style: Fixes some unnecessary-lambda (PLW0108) (OSGeo#3956)"

This reverts commit 0cc7cbf.

* ruff: Ignore unnecessary-lambda (PLW0108) in gui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants