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

Fixed wrong title error (Sourcery refactored) #97

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jul 19, 2020

Pull Request #95 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/get-pytube/pytube3 pull/95/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

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

nficano and others added 12 commits February 21, 2020 15:01
* repo-a/master: (289 commits)
  update callback documentation
  gitter chat link
  update pycharm dictionary
  update Pipfile.lock
  version bump
  expiration in UTC
  stream test
  stream expiration property
  better defaults, avoid unnecessary head call
  version bump
  added test_stream_to_buffer
  docstrings and linting
  multi range file streaming
  update makefile
  Update install.rst
  update README
  added tests
  added test
  fixes for logging setup
  print cli message if file already downloaded
  ...
Add skeleton Contributing.md due to unstructured backlog in issues currently
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jul 19, 2020

Sourcery Code Quality Report (beta)

❌  Merging this PR will decrease code quality in the affected files by 0.01 out of 10.

Quality metrics Before After Change
Complexity 0.75 0.75 0.00
Method Length 39.07 39.25 0.18 🔴
Quality 9.00 8.99 -0.01 🔴
Other metrics Before After Change
Lines 4247 4495 248
Changed files Quality Before Quality After Quality Change
setup.py 7.08 7.08 0.00
docs/conf.py 7.02 7.02 0.00
pytube/main.py 8.79 8.79 0.00
pytube/captions.py 8.88 8.90 0.02 🔵
pytube/cipher.py 8.95 8.94 -0.01 🔴
pytube/cli.py 8.18 8.17 -0.01 🔴
pytube/exceptions.py 9.61 9.60 -0.01 🔴
pytube/extract.py 8.81 8.79 -0.02 🔴
pytube/helpers.py 8.99 8.98 -0.01 🔴
pytube/monostate.py 9.67 9.67 0.00
pytube/query.py 9.29 9.29 0.00
pytube/request.py 8.82 8.81 -0.01 🔴
pytube/streams.py 8.94 8.94 0.00
pytube/contrib/playlist.py 8.91 8.90 -0.01 🔴
tests/conftest.py 9.30 9.30 0.00
tests/generate_fixture.py 7.73 7.73 0.00
tests/test_captions.py 8.88 8.87 -0.01 🔴
tests/test_cli.py 8.79 8.78 -0.01 🔴
tests/test_exceptions.py 9.48 9.47 -0.01 🔴
tests/test_extract.py 9.61 9.61 0.00
tests/test_helpers.py 9.44 9.43 -0.01 🔴
tests/test_query.py 9.35 9.35 0.00
tests/test_streams.py 9.09 9.09 0.00
tests/contrib/test_playlist.py 9.09 9.09 0.00

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

File Function Complexity Length Overall Recommendation
pytube/query.py StreamQuery.filter 22 236.81 3.79 Split out functionality
pytube/main.py YouTube.descramble 17 225.84 4.31 Split out functionality
pytube/cli.py ffmpeg_process 11 160.82 5.59 Split out functionality
pytube/extract.py apply_descrambler 5 210.59 5.59 Split out functionality
tests/test_query.py test_filters 0 151.31 6.80 Split out functionality

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!

Let us know what you think of it via email or our Gitter!

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.

3 participants