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

R!! list.append to list.extend #122

Closed
wants to merge 3 commits into from

Conversation

nickdelgrosso
Copy link
Contributor

Hi,

Very tiny refactor, following the pattern below:

from:

a = [0, 1]
a.append(2)
a.append(3)
a.append(4)

to:

a = [0, 1]
a.extend([
   2,
   3,
   4,
])

Description

Not a huge deal either way, just reduces some visual noise.

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 20, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.44%.

Quality metrics Before After Change
Complexity 1.00 ⭐ 1.00 ⭐ 0.00
Method Length 42.50 ⭐ 38.00 ⭐ -4.50 👍
Working memory 4.00 ⭐ 4.00 ⭐ 0.00
Quality 88.96% 90.40% 1.44% 👍
Other metrics Before After Change
Lines 15 17 2
Changed files Quality Before Quality After Quality Change
approvaltests/reporters/diff_reporter.py 88.96% ⭐ 90.40% ⭐ 1.44% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

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.

None yet

1 participant