prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Increase the usage of augmented assignment statements
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
👀 Some source code analysis tools can help to find opportunities for improving software components.
💭 I propose to increase the usage of augmented assignment statements accordingly.
Would you like to integrate anything from a transformation result which can be generated by a command like the following?
(👉 Please check also for questionable change suggestions because of an evolving search pattern.)
[Markus_Elfring@fedora lokal]$ perl -p -i.orig -0777 -e 's/^(?<indentation>\s+)(?<target>\S+)\s*=\s*\k<target>[ \t]*(?<operator>[+\-%&|^@]|\*\*?|\/\/?|<<|>>)/$+{indentation}$+{target} $+{operator}=/gm' $(find ~/Projekte/python-prompt-toolkit/lokal -name '*.py')
How do you think about to improve seven source code places? 🤔
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the Python files returned by the issue's find command and inspect the seven suggested assignments for semantic equivalence. Use the linked Python augmented-assignment reference as the first guide, then run the existing test suite after applying only justified changes. Done means the accepted locations use augmented assignment without questionable transformations and the tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100