openedx / openedx/openedx-platform

Fix all the occurrences of unnecessary-lambda-assignment warning

Open
#31,199 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

Description
  • pylint~=2.15.0 introduced new warning unnecessary-lambda-assignment for cases where lambda function is being assigned to a variable and is being used as a standard function.
  • PR https://github.com/openedx/edx-platform/pull/31084 disabled this warning to avoid making huge no of changes in the same PR.
TODO
  • Remove the disabled unnecessary-lambda-assignment warning from pylintrc_tweaks.
  • Update pylintrc to enable the warning.
  • Fix all occurrences of this warning.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the disabled warning entry in pylintrc_tweaks and the corresponding setting in pylintrc, then run pylint to identify the remaining occurrences across the repository. Done means the warning is enabled, all reported unnecessary lambda assignments are addressed, and lint passes without this warning being disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.