Skip to content

Conversation

@sourcery-ai
Copy link

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master git merge --ff-only FETCH_HEAD git reset HEAD^ 

Help us improve this pull request!

@sourcery-aisourcery-aibot requested a review from dinhFebruary 7, 2022 10:32
nb_url=os.path.join(directory, nb)
else:
nb_url=nb
nb_url=os.path.join(directory, nb) ifdirectoryelsenb
Copy link
Author

Choose a reason for hiding this comment

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

Function gen_contents refactored with the following changes:

nbformat.write(content, os.path.join(NB_DEST_DIR, nb))

pagefile=os.path.join(PAGE_DEST_DIR, base+'.md')
pagefile=os.path.join(PAGE_DEST_DIR, f'{base}.md')
Copy link
Author

Choose a reason for hiding this comment

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

Function copy_notebooks refactored with the following changes:

@sourcery-ai
Copy link
Author

Sourcery Code Quality Report

❌ Merging this PR will decrease code quality in the affected files by 0.29%.

Quality metricsBeforeAfterChange
Complexity21.64 😞21.78 😞0.14 👎
Method Length55.82 ⭐55.64 ⭐-0.18 👍
Working memory10.40 😞10.46 😞0.06 👎
Quality48.86% 😞48.57% 😞-0.29% 👎
Other metricsBeforeAfterChange
Lines149146-3
Changed filesQuality BeforeQuality AfterQuality Change
tools/generate_contents.py80.73% ⭐82.27% ⭐1.54% 👍
website/copy_notebooks.py32.92% 😞32.92% 😞0.00%

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

FileFunctionComplexityLengthWorking MemoryQualityRecommendation
website/copy_notebooks.pycopy_notebooks37 ⛔340.99 ⛔15 😞17.40% ⛔Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

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 freeto 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.

1 participant