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

pyupgrade #30

Open
1 of 3 tasks
VeckoTheGecko opened this issue Dec 7, 2023 · 1 comment
Open
1 of 3 tasks

pyupgrade #30

VeckoTheGecko opened this issue Dec 7, 2023 · 1 comment

Comments

@VeckoTheGecko
Copy link

VeckoTheGecko commented Dec 7, 2023

Suggestions

  • Wait on Echometrics improvements early 2023 #22 (to avoid merge conflicts)
  • Add pre-commit.ci to repo Pre-commit is already in the push.yml GHA workflow
    • Pros: Pre commit hooks run in CI for pull requests (independent of dev install). No associated cost for public repos.
  • Modify .pre-commit-config.yaml to add pyupgrade
    • Pros: Automatically remove outdated Python syntax, and convert code to take advantage of new features (e.g., f-strings, remove encoding comments)
    • Cons: Requires explicitly dropping support for Python versions as per arg in pyupgrade workflow

Addition to .pre-commit-config.yaml

- repo: https://github.com/asottile/pyupgrade
  rev: v3.15.0
  hooks:
    - id: pyupgrade
      args: [--py36-plus]
@VeckoTheGecko
Copy link
Author

Similarly, pyoceans/pocean-core#83

@VeckoTheGecko VeckoTheGecko changed the title pre-commit.ci and pyupgrade pyupgrade Dec 8, 2023
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

No branches or pull requests

1 participant