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

Updated mypy checks #4889

Merged
merged 6 commits into from Aug 21, 2021
Merged

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Aug 21, 2021

Type of Changes

Type
🔨 Refactoring

Description

#4887 (comment) mentioned that platformdirs is now fully typed.

To be able to remove the import ignore from setup.cfg, we would need to add platformdirs as an additional dependency in .pre-commit-config.yaml. Long term it might be better to just run mypy in the local environment instead.

If the PR is accepted, I'll update astroid as well.

@cdce8p cdce8p added the task label Aug 21, 2021
@cdce8p cdce8p added this to the 2.10.2 milestone Aug 21, 2021
@coveralls
Copy link

coveralls commented Aug 21, 2021

Pull Request Test Coverage Report for Build 1153544933

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.729%

Totals Coverage Status
Change from base Build 1153510278: 0.0%
Covered Lines: 13454
Relevant Lines: 14509

💛 - Coveralls

@cdce8p cdce8p marked this pull request as draft August 21, 2021 10:24
@cdce8p
Copy link
Member Author

cdce8p commented Aug 21, 2021

I've rebased the PR onto #4890

@cdce8p
Copy link
Member Author

cdce8p commented Aug 21, 2021

Seems like pre-commit.ci needs to be updated as well.

@Pierre-Sassoulas
Copy link
Member

I like the isolation that pre-commit does. This permit to not have to handle the mypy environnement ourselves 'locally or in github action) and will reduce problem as pre-commit configuration is the source of truth and there would be no human intervention. We can add something in additional_dependencies: ["types-pkg_resources==0.1.3", "types-toml==0.1.3"] or we could even use the mypy option to auto-install missing stubs.

@cdce8p
Copy link
Member Author

cdce8p commented Aug 21, 2021

I like the isolation that pre-commit does. This permit to not have to handle the mypy environnement ourselves 'locally or in github action) and will reduce problem as pre-commit configuration is the source of truth and there would be no human intervention.

We already have all additional typing dependencies in requirement_test.txt as they are necessary for local runs.

We can add something in additional_dependencies: ["types-pkg_resources==0.1.3", "types-toml==0.1.3"] or we could even use the mypy option to auto-install missing stubs.

That's the way we do it at the moment. One more won't make a difference, but I think in the future we might want to reuse the local environment as it's easier to deal with.

@cdce8p cdce8p marked this pull request as ready for review August 21, 2021 12:06
@cdce8p
Copy link
Member Author

cdce8p commented Aug 21, 2021

@Pierre-Sassoulas I updated the PR to only add platformdirs as additional dependency. Might be best to squash merge this one.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 5150d89 into pylint-dev:main Aug 21, 2021
@cdce8p cdce8p deleted the mypy-platformdirs branch August 21, 2021 12:48
@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow and removed task labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants