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 mypy / pylint / pytest and make everything work on latest Pythons #704

Merged
merged 5 commits into from
Jun 7, 2024

Conversation

robinwhittleton
Copy link
Member

With the current version, pylint on Python 3.12 throws a bunch of errors. Updating it to version 3+ fixes the majority of these issues. I’ve also fixed the other outstanding ones, removed a couple of now-empty ignores from pylintrc, and updated one ignore to work with the latest mypy.

I’ve added deprecated-method to pylintrc to silence issues with importlib_resources. As that module is no longer necessary now that the Python we require is >3.6 (see description at https://pypi.org/project/importlib-resources/1.0.2/) I’ll follow this PR up with a PR that updates the codebase to importlib.resources instead. We can remove deprecated-method as part of that.

- a couple of branch removals
- a couple of potentially unintialised variables
Neither of them affect the output any more.
We’re already exempting the from arg-type so let’s just add var-annotated and revisit another time.
These can be fixed in a separate chunk of work to remove importlib_resources.
@acabal acabal merged commit 14ecff0 into master Jun 7, 2024
2 checks passed
@acabal
Copy link
Member

acabal commented Jun 7, 2024

Thanks!

@robinwhittleton robinwhittleton deleted the 3-12-code-linting branch June 8, 2024 11:51
@robinwhittleton
Copy link
Member Author

Scratch the followup PR for the time being: the suggested replacements for the deprecated methods all rely on Python 3.9+. We can do that later.

@robinwhittleton
Copy link
Member Author

Seeing as I was 80% of the way through the work anyway, I’ve completed it in the remove_importlib_resources branch. I’ll file an issue now pointing at the branch so that when we do baseline on 3.9+ we’ll be able to rebase and PR.

@acabal
Copy link
Member

acabal commented Jun 9, 2024

OK, thanks!

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.

2 participants