Skip to content

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

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

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.

@dhruvmanila dhruvmanila added the awaiting changes A maintainer has requested changes to this PR label Oct 8, 2020
@sgalpha01
Copy link
Contributor Author

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 October 8, 2020 12:36
@dhruvmanila
Copy link
Member

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

Sure!

@dhruvmanila dhruvmanila merged commit a3bbcd5 into TheAlgorithms:master Oct 9, 2020
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
…14 (TheAlgorithms#3047)

* added type hints and refactored the code a bit

* made output statement more explicit

* used f-strings and updated type hints

* modified solution function to return an integer solution

* updated docstring

* Update sol1.py

* Update sol2.py

Co-authored-by: Dhruv <[email protected]>
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
…14 (TheAlgorithms#3047)

* added type hints and refactored the code a bit

* made output statement more explicit

* used f-strings and updated type hints

* modified solution function to return an integer solution

* updated docstring

* Update sol1.py

* Update sol2.py

Co-authored-by: Dhruv <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes A maintainer has requested changes to this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants