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

Code cleanups from ruff and pyupgrade #16035

Merged
merged 3 commits into from May 4, 2023
Merged

Conversation

nsoranzo
Copy link
Member

@nsoranzo nsoranzo commented May 3, 2023

  • Fix new UP031 errors raised by ruff 0.0.262
  • Code cleanups from pyupgrade
  • Use with statement to open some files
  • Unpin black and isort dev requirements (currently nothing will change, see commit for details)

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Found by running:

```
ack --type=python -f | grep -v '^lib/galaxy/schema/bco/\|^lib/galaxy/schema/drs/\|^tools/' | xargs pyupgrade --py37-plus
```

Also:
- Use `with` statement to open files
Currently nothing will change because:
- Newer black requires packaging>=22.0
- Newer isort requires Python>=3.8
@bernt-matthias
Copy link
Contributor

I thought the pin might be a good thing to ensure that we have the same setup locally and in ci.

@mvdbeek
Copy link
Member

mvdbeek commented May 4, 2023

This is a pin in pyproject.toml that's used by poetry to generate the actual pinned dependencies.

@mvdbeek mvdbeek merged commit 6d0a240 into galaxyproject:dev May 4, 2023
40 checks passed
@github-actions
Copy link

github-actions bot commented May 4, 2023

This PR was merged without a "kind/" label, please correct.

@nsoranzo nsoranzo deleted the ruff_0.0.264 branch May 4, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants