Skip to content

Conversation

@jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Jul 3, 2022

Type of Changes

Type
✨ New feature

Description

Closes #5488

Edit by @DanielNoord: This can now also close #2079 as the typing is now (almost) complete

@jacobtylerwalls jacobtylerwalls added Enhancement ✨ Improvement to a component typing labels Jul 3, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.15.0 milestone Jul 3, 2022
@jacobtylerwalls jacobtylerwalls added the Skip news 🔇 This change does not require a changelog entry label Jul 3, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2605232781

  • 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 95.358%

Totals Coverage Status
Change from base Build 2601041076: 0.0%
Covered Lines: 16702
Relevant Lines: 17515

💛 - Coveralls

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2022

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit 237711d

@DanielNoord
Copy link
Collaborator

I'm not sure if we should do this. As long as astroid can't pass mypy I'm not truly comfortable that all of our typing is correct. Might be better to wait until that has been finished?

@jacobtylerwalls
Copy link
Member Author

I'm not sure if we should do this. As long as astroid can't pass mypy I'm not truly comfortable that all of our typing is correct. Might be better to wait until that has been finished?

I hear that, but it's correct for the current version, right? If future versions of astroid change, then future versions of pylint change, but that's not an issue for people developing against the current version of pylint.

@DanielNoord
Copy link
Collaborator

I hear that, but it's correct for the current version, right? If future versions of astroid change, then future versions of pylint change, but that's not an issue for people developing against the current version of pylint.

Well, we think the typing is correct. But, to give an example, we also run into the issue described in pylint-dev/astroid#1680 in pylint as we use it at least once. By adding py.typed we signal that we think that our current typing is at least correct and can only be expanded to include additional signatures, but I wouldn't be 100% that it is actually correct.

@Pierre-Sassoulas
Copy link
Member

Sorry I approved without giving my reasonning. I thought that astroid had to be typed before pylint too, but there's some level of separation between pylint and astroid, and most pylint API do not expose astroid's API, so it's probably correct enough and useful enough. Also we'll get issue for the part that are used, maybe even contributions.

@jacobtylerwalls
Copy link
Member Author

By adding py.typed we signal that we think that our current typing is at least correct and can only be expanded to include additional signatures, but I wouldn't be 100% that it is actually correct.

Until you mentioned pylint-dev/astroid#1680 I would have said we are confident that it is correct given current state of astroid, which is all we can ever promise. (Even if we know astroid will keep changing.) But pylint-dev/astroid#1680 is a good point -- we know that's wrong. So I'm happy to postpone this.

@jacobtylerwalls jacobtylerwalls modified the milestones: 2.15.0, 2.16.0 Jul 3, 2022
@jacobtylerwalls jacobtylerwalls marked this pull request as draft July 3, 2022 14:56
@Pierre-Sassoulas Pierre-Sassoulas added the Blocked 🚧 Blocked by a particular issue label Jul 3, 2022
@DanielNoord DanielNoord removed the Skip news 🔇 This change does not require a changelog entry label Sep 9, 2022
@jacobtylerwalls jacobtylerwalls modified the milestones: 2.16.0, 2.17.0 Nov 20, 2022
@DetachHead DetachHead mentioned this pull request Jan 24, 2023
@KotlinIsland
Copy link
Contributor

Don't forget to add the py.typed to the pylint entry for tool.setuptools.package-data in pyproject.toml

@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 2.17.0, 3.0.0 Mar 7, 2023
@DanielNoord
Copy link
Collaborator

Superseded by #8402

@DanielNoord DanielNoord closed this Mar 8, 2023
@jacobtylerwalls jacobtylerwalls deleted the expose-types branch March 8, 2023 19:32
@Pierre-Sassoulas Pierre-Sassoulas removed this from the 3.0.0 milestone Mar 9, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.0.0a6 milestone Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked 🚧 Blocked by a particular issue Enhancement ✨ Improvement to a component typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose types Annotate pylint code with type annotations

5 participants