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

Add typing in pylint.reporters #5004

Merged

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Sep 14, 2021

Type of Changes

Type
βœ“ πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Description

This add typing in pylint.reporters in order to add typing little by little in the code base. Necessary for easier evolution of json output for 3.0.

@Pierre-Sassoulas Pierre-Sassoulas added the Maintenance Discussion or action around maintaining pylint or the dev workflow label Sep 14, 2021
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft September 14, 2021 13:27
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review September 14, 2021 14:09
@coveralls
Copy link

coveralls commented Sep 14, 2021

Pull Request Test Coverage Report for Build 1240886320

  • 68 of 68 (100.0%) changed or added relevant lines in 10 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.001%) to 93.094%

Files with Coverage Reduction New Missed Lines %
pylint/reporters/ureports/nodes.py 1 94.29%
Totals Coverage Status
Change from base Build 1240530438: 0.001%
Covered Lines: 13292
Relevant Lines: 14278

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.11.0 milestone Sep 14, 2021
pylint/reporters/__init__.py Outdated Show resolved Hide resolved
pylint/reporters/reports_handler_mix_in.py Outdated Show resolved Hide resolved
pylint/reporters/reports_handler_mix_in.py Outdated Show resolved Hide resolved
pylint/reporters/reports_handler_mix_in.py Outdated Show resolved Hide resolved
pylint/reporters/reports_handler_mix_in.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
pylint/reporters/base_reporter.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/text_writer.py Outdated Show resolved Hide resolved
pylint/interfaces.py Outdated Show resolved Hide resolved
pylint/lint/report_functions.py Outdated Show resolved Hide resolved
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielNoord probably knows more about that area of the code than I do. Nevertheless some small comments.

pylint/lint/report_functions.py Outdated Show resolved Hide resolved
pylint/lint/report_functions.py Outdated Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas added the Blocked 🚧 Blocked by a particular issue label Sep 15, 2021
pylint/lint/report_functions.py Outdated Show resolved Hide resolved
pylint/lint/report_functions.py Outdated Show resolved Hide resolved
pylint/reporters/reports_handler_mix_in.py Outdated Show resolved Hide resolved


class VNode:
def __init__(self, nid=None):
def __init__(self, nid: Optional[Any] = None) -> None:
self.id = nid
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably able to remove now πŸ˜„

@DanielNoord DanielNoord mentioned this pull request Sep 15, 2021
2 tasks
Pierre-Sassoulas pushed a commit that referenced this pull request Sep 16, 2021
* Move methods to `BaseLayout` and change typing, see #5004 (comment)
@Pierre-Sassoulas Pierre-Sassoulas removed the Blocked 🚧 Blocked by a particular issue label Sep 16, 2021
Fix typing error in pylint/checkers/imports.py. Add typing
of report related code outside of pylint.reporters.
Pierre-Sassoulas and others added 2 commits September 16, 2021 09:14
Co-authored-by: DaniΓ«l van Noord <13665637+DanielNoord@users.noreply.github.com>
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
pylint/reporters/ureports/nodes.py Outdated Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas merged commit dc0c7e9 into pylint-dev:main Sep 16, 2021
@Pierre-Sassoulas Pierre-Sassoulas deleted the add-typing-in-reporters branch September 16, 2021 09:03
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

4 participants