Skip to content

Conversation

paulosgf
Copy link
Contributor

@paulosgf paulosgf commented Dec 29, 2021

Fixes (#5434)

  • Update ciphers.rabin_miller.py
    maths.miller_rabin.py

Describe your change:

Remove duplicate is_prime related 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}.
* Update ciphers.rabin_miller.py maths.miller_rabin.py
@paulosgf paulosgf requested a review from Kush1101 as a code owner December 29, 2021 22:49
@ghost ghost added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Dec 29, 2021
@paulosgf
Copy link
Contributor Author

paulosgf commented Jan 5, 2022

Hi @Kush1101!
Can you verify my PR, please!

@paulosgf paulosgf changed the title Fixes (#5434) Remove duplicate is_prime related functions Jan 5, 2022
@paulosgf
Copy link
Contributor Author

Hi @Kush1101!

Can you review my PR #5892, please?

@poyea poyea self-requested a review January 26, 2022 15:32
@ghost ghost added the tests are failing Do not merge until tests pass label Jan 26, 2022
… project_euler's isPrime to is_prime function names
@paulosgf paulosgf requested a review from dhruvmanila as a code owner February 3, 2022 19:41
Copy link
Contributor Author

@paulosgf paulosgf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@poyea, I solved the pro-commit hook problem and I'm submitting the changes that you requested, for review now.

@paulosgf
Copy link
Contributor Author

@poyea, I guess that we have the egg and chicken problem here... This pre-commit workflow is breaking on this definition primes: list[int] = [] and returns this error:

pyupgrade................................................................Passed flake8...................................................................Passed mypy.....................................................................Failed - hook id: mypy - exit code: 1 project_euler/problem_007/sol2.py:76: error: "list" is not subscriptable, use "typing.List" instead Found 1 error in 1 file (checked 1 source file) codespell................................................................Passed Validate filenames......................................................Skipped 

Then, when I change the code, the pyupgrade module revert it to the original and the flake8 module returns the same error:

pyupgrade................................................................Failed - hook id: pyupgrade - duration: 2.83s - exit code: 1 - files were modified by this hook Rewriting project_euler/problem_007/sol2.py flake8...................................................................Failed - hook id: flake8 - duration: 9.87s - exit code: 1 project_euler/problem_007/sol2.py:14:1: F401 'typing.List' imported but unused 

But I didn't even need to move this part. When I fixed the other files, this new problem has arisen.
What now?

@ghost ghost removed the tests are failing Do not merge until tests pass label Mar 24, 2022
@poyea
Copy link
Member

poyea commented Mar 24, 2022

@paulosgf Let's check if this works?

@paulosgf
Copy link
Contributor Author

paulosgf commented Apr 4, 2022

Yes, @poyea! Now it's Ok to merge.
Awaiting approval!

Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request!🤩

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label Apr 8, 2022
@poyea poyea merged commit 1400cb8 into TheAlgorithms:master Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

2 participants