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

refactor: Move constants outside of variable scope #7262

Merged
merged 12 commits into from
Oct 16, 2022

Conversation

CaedenPH
Copy link
Contributor

Describe your change:

Moves constants outside of variable scope, removing the need for noqa: N806

  • 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}.

@algorithms-keeper algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Oct 15, 2022
conversions/decimal_to_any.py Outdated Show resolved Hide resolved
web_programming/fetch_quotes.py Outdated Show resolved Hide resolved
@algorithms-keeper algorithms-keeper bot added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Oct 16, 2022
@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed and removed awaiting changes A maintainer has requested changes to this PR labels Oct 16, 2022
@dhruvmanila dhruvmanila added awaiting changes A maintainer has requested changes to this PR and removed awaiting reviews This PR is ready to be reviewed labels Oct 16, 2022
@cclauss
Copy link
Member

cclauss commented Oct 16, 2022

Did you use some tool to find these instances?

Oh, nevermind... I see N806.

Co-authored-by: Christian Clauss <cclauss@me.com>
@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed and removed awaiting changes A maintainer has requested changes to this PR labels Oct 16, 2022
CaedenPH and others added 2 commits October 16, 2022 10:03
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
@cclauss
Copy link
Member

cclauss commented Oct 16, 2022

If I have closed any failing PRs that you want to keep open, please reopen them or ask me to do so.

Hacktoberfest is strenuous for our team of active volunteer maintainers. That small team now has 200+ open pull requests to review. We have high standards for our submissions which are described in CONTRIBUTING.md. Our continuous integration tests help to ensure that our standards are met before we review and merge deserving pull requests. This is further complicated by the fact that we already have lots of algorithms and would like to avoid duplicates.

For these reasons, I will close all open pull requests failing tests so that our unpaid team has a smaller mountain to climb. If you want us to land your pull request, please make sure it is not a duplicate and then read CONTRIBUTING.md carefully and try again.

@CaedenPH CaedenPH requested a review from dhruvmanila October 16, 2022 09:13
@algorithms-keeper algorithms-keeper bot removed the awaiting reviews This PR is ready to be reviewed label Oct 16, 2022
@dhruvmanila dhruvmanila merged commit c6582b3 into TheAlgorithms:master Oct 16, 2022
@CaedenPH CaedenPH deleted the move-constants branch October 16, 2022 09:45
@cclauss
Copy link
Member

cclauss commented Oct 16, 2022

Your thoughts on using https://docs.python.org/3/library/typing.html#typing.Final for constant values?

@CaedenPH
Copy link
Contributor Author

Your thoughts on using https://docs.python.org/3/library/typing.html#typing.Final for constant values?

I think enforcing this will be quite difficult for not much benefit. What is your opinion on #7337?

@cclauss cclauss added hacktoberfest hacktoberfest-accepted Accepted to be counted towards Hacktoberfest labels Oct 18, 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 hacktoberfest hacktoberfest-accepted Accepted to be counted towards Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants