Skip to content

Made small improvements and shortened prime_check.py#3454

Merged
poyea merged 3 commits intoTheAlgorithms:masterfrom
Rolv-Apneseth:improve-prime_check.py
Oct 23, 2020
Merged

Made small improvements and shortened prime_check.py#3454
poyea merged 3 commits intoTheAlgorithms:masterfrom
Rolv-Apneseth:improve-prime_check.py

Conversation

@Rolv-Apneseth
Copy link
Copy Markdown
Contributor

Describe your change:

Made small improvements and shortened prime_check.py
Shortened overall code and changed some of the comments/docstrings

For issue #3453

@Rolv-Apneseth
Copy link
Copy Markdown
Contributor Author

Ok Not sure why that check failed, when I run prime_check(1) on my code it returns False as it should. However I'm not really sure how these tests work. Can somebody help?

@Rolv-Apneseth
Copy link
Copy Markdown
Contributor Author

Pre-commit check is not failing on self.assertFalse(prime_check(2 * 3)) but when run locally, all tests succeed, and running prime_check(2 * 3) returns False as it should so I'm confused

@poyea
Copy link
Copy Markdown
Member

poyea commented Oct 22, 2020

Please run black . for your code. https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md

@poyea
Copy link
Copy Markdown
Member

poyea commented Oct 22, 2020

I think you can enable the github actions in your setting of the fork too.

@Rolv-Apneseth
Copy link
Copy Markdown
Contributor Author

Rolv-Apneseth commented Oct 22, 2020

@popyea of course, thank you for the help!

Copy link
Copy Markdown
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!🤩

@poyea poyea merged commit 04fae4d into TheAlgorithms:master Oct 23, 2020
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
* Made small improvements and shortened prime_check.py

* improved descriptions on tests in prime_check.py

* Ran black and isort
peRFectBeliever pushed a commit to peRFectBeliever/Python that referenced this pull request Apr 1, 2021
* Made small improvements and shortened prime_check.py

* improved descriptions on tests in prime_check.py

* Ran black and isort
Panquesito7 pushed a commit to Panquesito7/Python that referenced this pull request May 13, 2021
* Made small improvements and shortened prime_check.py

* improved descriptions on tests in prime_check.py

* Ran black and isort
shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
* Made small improvements and shortened prime_check.py

* improved descriptions on tests in prime_check.py

* Ran black and isort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants