-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Improved readability of web_programming/get_imdbtop.py and added documentations with doctests #4855
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
Merged
cclauss
merged 10 commits into
TheAlgorithms:master
from
appledora:crawl-imdb-topn-movies
Oct 16, 2021
Merged
Improved readability of web_programming/get_imdbtop.py and added documentations with doctests #4855
cclauss
merged 10 commits into
TheAlgorithms:master
from
appledora:crawl-imdb-topn-movies
Oct 16, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ocumentations with doctests.
…ocumentations with doctests.
cclauss
reviewed
Oct 1, 2021
cclauss
reviewed
Oct 1, 2021
cclauss
reviewed
Oct 2, 2021
web_programming/get_imdbtop.py
Outdated
""" | ||
print(f"Crawling {num_movies} movies from the IMDB databse ...") | ||
|
||
print(f"Crawling {num_movies} movies from the IMDB database...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move print() outside the algorithmic function.
cclauss
reviewed
Oct 2, 2021
…ests as suggested
mypy found problems on lines 26, 46, and 47
|
I think I have fixed this, by running mypy locally |
@poyea Could you kindly review this one? |
cclauss
approved these changes
Oct 16, 2021
shermanhui
pushed a commit
to shermanhui/Python
that referenced
this pull request
Oct 22, 2021
…mentations with doctests (TheAlgorithms#4855) * improved readability of the existing method by reformatting, adding documentations with doctests. * improved readability of the existing method by reformatting, adding documentations with doctests. * fixed typo in test * added doctest to parse dictionary method * added doctest to parse dictionary method * Changed return type, removed print() from method and implemented doctests as suggested * Fixed doctest error, removed print() from method, created new script as suggested * Update get_imdbtop.py * Fix typo discovered by codespell * return () Co-authored-by: Christian Clauss <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated an existing script
web_programming/get_imdbtop.py
to crawl top n movies from the imdb databse based on ratings. It includesdocumentations
anddoctests
. Modularized the script and made it more customizable. Fixed formatting usingblack
andflake8
.Checklist:
Fixes: #{$ISSUE_NO}
.