Commit Graph

7 Commits

Author SHA1 Message Date
Pierre Sassoulas
7d03942444 Fix a typo in pylint/typing.py 2022-01-02 00:08:42 +01:00
Daniël van Noord
ee70d41881
Add `end_lineno and end_col_offset to MessageLocationTuple` (#5343) 2021-11-22 22:40:26 +01:00
Daniël van Noord
97048ded8e
Merge `MessagesHandlerMixIn into PyLinter` (#5136)
* Merge ``MessagesHandlerMixIn`` into ``PyLinter``
2021-10-17 10:37:02 +02:00
Daniël van Noord
16c09cb48a
Refactor `LinterStats` (#5074)
* Refactor ``self.stats`` on linter and checker
This adds a new class ``LinterStats`` which is used to store all
kinds of stats during a run of ``pylint``. Tests have been changed
slightly to be able to use the new class.

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-10-07 09:40:31 +02:00
Daniël van Noord
1e675abcc2
Type add_message and add MessageLocationTuple (#5050)
* Type `add_message` and add `MessageLocationTuple`

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-09-21 13:56:58 +02:00
Daniël van Noord
0d246e55a3
Add typing to `filepath` (#4980)
* Change tests for ``filepath`` changes
* Add pylint/typing.py and FileItem NamedTuple
* Use NamedTuple more efficiently
* Fix errors and tests after adding warning
* Add deprecation for future API change in Checker

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-09-16 16:58:37 +02:00
Daniël van Noord
22e56c07cf
Add typing to all calls to `self.stats` (#4973)
* Add typing to all calls to ``self.stats``

All checkers inherit from a baseclass which has a ``stats`` attribute.
This attribute has a fairly unmanageable type, but the current typing includes all variations of the attribute.
Other changes not directly related to ``self.stats`` are due to ``mypy``warnings.
This incorporate the feedback received in #4954

* Add ``CheckerStatistic`` class to ``pylint/typing``

* Guard `typing.Counter` import

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-09-15 20:42:22 +02:00