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

[Project Euler] Added type hints and refactored the code a bit for Problem 14 #3047

Open
wants to merge 7 commits into
base: master
from

Conversation

@sgalpha01
Copy link
Contributor

@sgalpha01 sgalpha01 commented Oct 8, 2020

Continuing #2786

  • Added type hints
  • Added default argument values for validate_solutions script
  • Refactored the code

Describe your change:

  • Fix a bug or typo in an existing algorithm?

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.
  • 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.
project_euler/problem_14/sol1.py Outdated Show resolved Hide resolved
project_euler/problem_14/sol2.py Outdated Show resolved Hide resolved
project_euler/problem_14/sol1.py Outdated Show resolved Hide resolved
project_euler/problem_14/sol2.py Outdated Show resolved Hide resolved
project_euler/problem_14/sol2.py Outdated Show resolved Hide resolved
@sgalpha01
Copy link
Contributor Author

@sgalpha01 sgalpha01 commented Oct 8, 2020

Hey, thanks for reviewing. I have pushed some changes. Can you please check if it still need any styling changes?

@sgalpha01 sgalpha01 requested a review from dhruvmanila Oct 8, 2020
@dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Oct 8, 2020

This gives us answer in an incorrect type.
https://travis-ci.com/github/TheAlgorithms/Python/jobs/396914178#L250-L256

And please don't @mention any maintainers, we already have a lot to do and don't get paid for this.

@sgalpha01
Copy link
Contributor Author

@sgalpha01 sgalpha01 commented Oct 8, 2020

Sure!

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

2 participants
You can’t perform that action at this time.