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

🧪 Update pre-commit-wrapped linters for Python 3.12 #698

Merged
merged 5 commits into from
Apr 24, 2024

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Apr 24, 2024

Since the default runtime in pre-commit.ci got updated to Python 3.12, many checks started failing. This patch makes adjustments to the configuration to make it work again. They include bumping linter versions and pinning runtimes.

What kind of change does this PR introduce?

  • 🐞 bug fix
  • 🐣 feature
  • 📋 docs update
  • 📋 tests/coverage improvement
  • 📋 refactoring
  • 💥 other

📋 What is the related issue number (starting with #)

N/A

What is the current behavior? (You can also link to an open issue here)

pre-commit.ci is failing

What is the new behavior (if this is a feature change)?

it doesn't

📋 Other information:

Looks like the service switched the default Python version to 3.12 which needs some config updates.

📋 Contribution checklist:

(If you're a first-timer, check out
this guide on making great pull requests)

  • I wrote descriptive pull request text above
  • I think the code is well written
  • I wrote good commit messages
  • I have squashed related commits together after
    the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

This change is Reviewable

@webknjaz webknjaz self-assigned this Apr 24, 2024
@webknjaz webknjaz force-pushed the maintenance/pylint-3.1.0 branch 5 times, most recently from 21ebe61 to bb861f3 Compare April 24, 2024 15:03
@webknjaz
Copy link
Member Author

pre-commit.ci run

This version supports Python 3.12 officially. As a part of this patch,
`pylint-pytest` is also updated with the bugfixes needed to stop
capping it.

An alpha version of the plugin is used due to a bug when running
`pylint` in parallel mode [[1]].

[1]: pylint-dev/pylint-pytest#61
This is needed to support Python 3.12.
This seems to be necessary to support Python 3.12.
Otherwise, the formatter breaks f-strings.
Flake8 runtime is now pinned to Python 3.11 in pre-commit since it explodes
on Python 3.12 due to [[1]] currently.

[1]: wemake-services/wemake-python-styleguide#2933
@webknjaz webknjaz changed the title 🧪 Bump pylint to v3.1.0 🧪 Update pre-commit-wrapped linters for Python 3.12 Apr 24, 2024
@webknjaz webknjaz merged commit 1e05bcc into cherrypy:main Apr 24, 2024
16 of 42 checks passed
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.

1 participant