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

Add typehints to blockchain #3149

Merged

Conversation

@jenia90
Copy link
Contributor

@jenia90 jenia90 commented Oct 10, 2020

#2510 and #2128 Added type hints to the blockchain algorithms functions.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
@jenia90 jenia90 changed the title #2128 Add typehints to blockchain Add typehints to blockchain Oct 15, 2020
@jenia90
Copy link
Contributor Author

@jenia90 jenia90 commented Oct 18, 2020

@poyea hey, I'm not sure I should address you here, but can you or someone else review and tag this PR for hacktoberfest? Thanks a lot in advance! :)

@53jk1
53jk1 approved these changes Oct 22, 2020
@jenia90
Copy link
Contributor Author

@jenia90 jenia90 commented Oct 22, 2020

@53jk1 thanks for the review! Can this be tagged for hacktoberfest?

@53jk1
Copy link

@53jk1 53jk1 commented Oct 22, 2020

I am not authorized to add tags. 😄
Peace ❤️

@stale
Copy link

@stale stale bot commented Nov 21, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 21, 2020
@stale
Copy link

@stale stale bot commented Nov 29, 2020

Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!

@stale stale bot closed this Nov 29, 2020
@poyea poyea reopened this Nov 29, 2020
@algorithms-keeper
Copy link

@algorithms-keeper algorithms-keeper bot commented Nov 29, 2020

Pull Request Report

@jenia90 Hello! I'm a bot made to check all the pull request Python files. First of all, I want to say thank you for your time and interest in this project and for opening a pull request. There seems to be missing requirements in some of the Python files submitted in this pull request. Please read through the report and make the necessary changes. You can take a look at the relevant links provided after the report.

What are node paths? 🔽

The report contains headings and a checklist where the items are paths to the class/function/parameter where the requirement is missing. Node paths are double colon :: separated names and can be in any of the following format:

  • Class path: [file_name]::[class_name]
  • Function path: [file_name]::[function_name]
  • Function parameter path: [file_name]::[function_name]::[parameter_name]
  • Method path: [file_name]::[class_name]::[function_name]
  • Method parameter path: [file_name]::[class_name]::[function_name]::[parameter_name]

Following class/functions/parameters require descriptive names:

  • blockchain/chinese_remainder_theorem.py::extended_euclid::a
  • blockchain/chinese_remainder_theorem.py::extended_euclid::b
  • blockchain/chinese_remainder_theorem.py::invert_modulo::a
  • blockchain/chinese_remainder_theorem.py::invert_modulo::n
  • blockchain/diophantine_equation.py::diophantine::a
  • blockchain/diophantine_equation.py::diophantine::b
  • blockchain/diophantine_equation.py::diophantine::c
  • blockchain/diophantine_equation.py::diophantine_all_soln::a
  • blockchain/diophantine_equation.py::diophantine_all_soln::b
  • blockchain/diophantine_equation.py::diophantine_all_soln::c
  • blockchain/diophantine_equation.py::diophantine_all_soln::n
  • blockchain/diophantine_equation.py::greatest_common_divisor::a
  • blockchain/diophantine_equation.py::greatest_common_divisor::b
  • blockchain/diophantine_equation.py::extended_gcd::a
  • blockchain/diophantine_equation.py::extended_gcd::b
  • blockchain/modular_division.py::modular_division::a
  • blockchain/modular_division.py::modular_division::b
  • blockchain/modular_division.py::modular_division::n
  • blockchain/modular_division.py::invert_modulo::a
  • blockchain/modular_division.py::invert_modulo::n
  • blockchain/modular_division.py::modular_division2::a
  • blockchain/modular_division.py::modular_division2::b
  • blockchain/modular_division.py::modular_division2::n
  • blockchain/modular_division.py::extended_gcd::a
  • blockchain/modular_division.py::extended_gcd::b
  • blockchain/modular_division.py::extended_euclid::a
  • blockchain/modular_division.py::extended_euclid::b
  • blockchain/modular_division.py::greatest_common_divisor::a
  • blockchain/modular_division.py::greatest_common_divisor::b
Relevant links 🔽

@poyea
poyea approved these changes Nov 29, 2020
@poyea
Copy link
Member

@poyea poyea commented Nov 29, 2020

Thank you for your pull request!🤩 And sorry for the delay.

@poyea poyea merged commit 0febbd3 into TheAlgorithms:master Nov 29, 2020
3 checks passed
3 checks passed
@github-actions
build
Details
@github-actions
pre-commit
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@jenia90 jenia90 deleted the jenia90:jenia90/2510_add_typehints_to_blockchain branch Nov 29, 2020
@jenia90
Copy link
Contributor Author

@jenia90 jenia90 commented Nov 29, 2020

Hey @poyea, Idk if it's gonna help my last PRfor hacktoberfest, but can you please add the hacktoberfest-accepted label? Thank you 😊

poyea added a commit to poyea/Python that referenced this pull request Nov 29, 2020
dhruvmanila pushed a commit that referenced this pull request Nov 29, 2020
* Fix mypy in #3149 
* Fix pre-commit
s-okubanjo added a commit to s-okubanjo/Python that referenced this pull request Nov 29, 2020
* updating DIRECTORY.md

* updating DIRECTORY.md

* Added type hints to blockchain algorithms

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
s-okubanjo added a commit to s-okubanjo/Python that referenced this pull request Nov 29, 2020
stokhos added a commit to stokhos/Python that referenced this pull request Jan 3, 2021
* updating DIRECTORY.md

* updating DIRECTORY.md

* Added type hints to blockchain algorithms

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
stokhos added a commit to stokhos/Python that referenced this pull request Jan 3, 2021
peRFectBeliever added a commit to peRFectBeliever/Python that referenced this pull request Apr 1, 2021
* updating DIRECTORY.md

* updating DIRECTORY.md

* Added type hints to blockchain algorithms

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
peRFectBeliever added a commit to peRFectBeliever/Python that referenced this pull request Apr 1, 2021
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
* updating DIRECTORY.md

* updating DIRECTORY.md

* Added type hints to blockchain algorithms

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants