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

[Upgrade Ruff] Fix all errors raised from ruff #8879

Merged
merged 24 commits into from
Jul 22, 2023

Conversation

CaedenPH
Copy link
Contributor

@CaedenPH CaedenPH commented Jul 22, 2023

Describe your change:

Fixes all errors shown in the failing tests here

https://github.com/TheAlgorithms/Python/actions/runs/5629561962/job/15254651560?pr=8875

Fixes #8876
Fixes #8877
Fixes #8878
Fixes #8880

  • 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 include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@CaedenPH
Copy link
Contributor Author

@cclauss Instead of reverting, this fixes all the new ruff rules

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Jul 22, 2023
@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed label Jul 22, 2023
@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label Jul 22, 2023
Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Please also upgrade the ruff version in .pre-commit-config.yaml or else do pre-commit autoupgrade.

@CaedenPH
Copy link
Contributor Author

@cclauss I have fixed the changes you requested

@CaedenPH CaedenPH changed the title Fix all errors raised from ruff [Upgrade Ruff] Fix all errors raised from ruff Jul 22, 2023
@CaedenPH CaedenPH requested a review from cclauss July 22, 2023 09:40
Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Nice!!

@cclauss cclauss merged commit 93fb169 into TheAlgorithms:master Jul 22, 2023
@CaedenPH CaedenPH deleted the fix-failing-ruff-tests branch July 22, 2023 10:05
sedatguzelsemme pushed a commit to sedatguzelsemme/Python that referenced this pull request Sep 15, 2024
* chore: Fix tests

* chore: Fix failing ruff

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* chore: Fix ruff errors

* chore: Fix ruff errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update cellular_automata/game_of_life.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* chore: Update ruff version in pre-commit

* chore: Fix ruff errors

* Update edmonds_karp_multiple_source_and_sink.py

* Update factorial.py

* Update primelib.py

* Update min_cost_string_conversion.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-commit auto-updates break ruff
2 participants