Increase the usage of augmented assignment statements
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 419
- PR merge metrics
- No merged PRs in 30d
Description
:eyes: Some source code analysis tools can help to find opportunities for improving software components.
:thought_balloon: I propose to [increase the usage of augmented assignment statements](https://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements "Augmented assignment statements") accordingly.
Would you like to integrate anything from a transformation result which can be generated by a command like the following?
(:point_right: Please check also for questionable change suggestions because of an evolving search pattern.)
```
lokal$ perl -p -i.orig -0777 -e 's/^(?\s+)(?\S+)\s*=\s*\k[ \t]*(?[+\-%&|^@]|\*\*?|\/\/?|<<|>>)/$+{indentation}$+{target} $+{operator}=/gm' $(find ~/Projekte/pygal/lokal -name '*.py')
```
Contributor guide
Research direction
Review the transformation output produced by the shown Perl command across pygal's *.py files, checking each suggested assignment individually against the evolving search pattern. Done means justified augmented assignments are integrated while questionable suggestions are excluded; the issue names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100