summaryrefslogtreecommitdiff
path: root/pylint/message/message_handler_mix_in.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge ``MessagesHandlerMixIn`` into ``PyLinter`` (#5136)Daniël van Noord2021-10-171-140/+0
| | | * Merge ``MessagesHandlerMixIn`` into ``PyLinter``
* Move message adding functions from ``MessagesHandlerMixIn``Daniël van Noord2021-10-101-199/+3
|
* Move docs helper functions out of ``MessagesHandlerMixIn``Daniël van Noord2021-10-071-64/+2
|
* Move staticmethods out of MessagesHandlerMixIn (#5123)Daniël van Noord2021-10-071-34/+2
|
* Prepare imports of ``MessagesHandlerMixIn`` for merge with ``PyLinter`` (#5125)Daniël van Noord2021-10-071-19/+16
|
* Refactor ``LinterStats`` (#5074)Daniël van Noord2021-10-071-16/+6
| | | | | | | | * 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>
* Fix false-positive ``useless-suppression`` for ``line-too-long`` (#5077)Daniël van Noord2021-09-281-1/+1
| | | | | | | Also changes ``add_ignored_message()`` to make ``nodes`` parameter optional. Closes #4212 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add ``no-implicit-optional`` flag to ``mypy`` (#5075)Daniël van Noord2021-09-261-1/+1
|
* Fix ``useless-suppression`` for ``wrong-import-order`` (#5063)Daniël van Noord2021-09-231-0/+25
| | | | | | This also adds a new method to ``MessagesHandlerMixIn`` which adds messages to the list of the ignored messages without doing anything else. This can be used to avoid ``useless-suppression`` false positives. This closes #2366
* Refactor of ``FileState.handle_ignored_message()`` (#5064)Daniël van Noord2021-09-231-3/+0
| | | Remove unnecessary parameters
* Type `add_message` and add `MessageLocationTuple` (#5050)Daniël van Noord2021-09-211-14/+32
| | | | | | * 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>
* Add typing to most reference of ``stream``Daniël van Noord2021-09-131-11/+5
|
* Remove the python3 porting mode from the codebasePierre Sassoulas2021-09-011-3/+0
| | | | | | It's possible to use the python3 porting checker from an older pylint version. But it's not evolving anymore and was costing resource to maintain.
* Add ``Consider-using-f-string`` checker (#4796)Daniël van Noord2021-08-301-8/+6
| | | | | | | | | | | | | | | | * Add ``consider-using-f-string`` checker This adds a checker for normal strings which are formatted with ``.format()`` or '%'. The message is a convention to nudge users towards using f-strings. This closes #3592 * Update pylint code to use f-strings After adding `consider-using-f-strings` the codebase showed numerous cases of formatting which could be f-strings. This commit changes most of these to become f-strings, or adds ignores. * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Add ``disable-next`` option (#4797)Daniël van Noord2021-08-051-2/+24
| | | | | | | | | | * Add ``disable-next`` option Adding `# pylint: disable-next=msgid` to your file will disable the message for the next line. This closes #1682 * Add documentation, rorganize the FAQ for disable/enable and add ref to the full doc Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
* Fix copyright links (#4647)Marc Mueller2021-07-011-1/+1
| | | | * Fix link in license header * Update link to astroid bump_changelog
* No crash on bad plugin provided in configuration filePierre Sassoulas2021-06-171-1/+15
| | | | | Raise an error 'bad-plugin-value' instead. See #4555
* Rename copying to license and upgrade the setup.cfg (#4338)Pierre Sassoulas2021-04-111-1/+1
|
* Refactor MessageId Store with a better error messagePierre Sassoulas2021-04-091-7/+6
|
* better docstring in message handler mixinPierre Sassoulas2021-03-311-3/+0
|
* Fix disabled warning not ignored (#4268)pylint-2.7.4Pierre Sassoulas2021-03-301-4/+8
| | | | | * Fix ignores all disabled warnings #4265 * Update changelog and prepare 2.7.4
* Fix false negative 'use-symbolic-message-instead' and optimize itPierre Sassoulas2021-03-171-22/+10
| | | | | | use-symbolic-message-instead was not working for message with multiple new names and the function to get the symbol was suboptimal. Also made the solution copy pastable.
* pyupgrade: automated removal of python2 constructsAnthony Sottile2020-03-241-4/+1
| | | | | | | | | | | | | using configuration: ```yaml - repo: https://github.com/asottile/pyupgrade rev: v2.1.0 hooks: - id: pyupgrade args: [--py3-plus, --keep-percent-format] exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/) ```
* Remove redundant compatibility code (#3097)Hugo van Kemenade2019-09-121-2/+0
| | | | We no longer support Python 2 so we can remove the compatibility code we had in place for that version.
* [pylint.message] Remove a check that never failPierre Sassoulas2019-09-101-3/+1
| | | | | It seems to make performance 2/3 % better during test and during pylint own analysis.
* [pylint.message] Optimize MessageDefinitionStore storagePierre Sassoulas2019-09-101-1/+2
|
* [pylint.message] Simplification with 1-1 link between symbol and msgidPierre Sassoulas2019-08-191-2/+1
| | | | Also add a lot of unit tests.
* [pylint.message] Move backward compatibility in MessageDefinitionPierre Sassoulas2019-08-161-5/+3
| | | | If we need this mechanism it's better to handle it everywhere.
* [pylint.message] MessageHandlerMixIn.add_message is too complexPierre Sassoulas2019-08-091-7/+10
| | | | Created a function to check message definition explicitely.
* [pylint.message] category_id does not need to be a functionPierre Sassoulas2019-08-061-9/+5
|
* [pylint.utils] pylint.utils.category_id used only oncePierre Sassoulas2019-08-061-6/+8
|
* [pylint.message] Remove a useless variablePierre Sassoulas2019-08-061-12/+15
|
* [pylint.message] Rename msg_descr to msgidPierre Sassoulas2019-08-061-8/+4
|
* Refactor - Rename an overlapsing function in MessageHandlerMixInPierre Sassoulas2019-06-201-2/+2
| | | | BaseChecker and MessageHandlerMixIn can be the same instance.
* Refactor - Giving multiple parameters instead of a dictPierre Sassoulas2019-06-201-2/+4
| | | | This make the understanding of the function easier.
* Refactor - Clearer function name ('rest' -> 'rst') in utilsPierre Sassoulas2019-06-201-6/+6
| | | | | I used the old name but there was probably a typo in it, as the format is called rst.
* Fix - Remove invalid syntax in python 3.4Pierre Sassoulas2019-06-201-1/+1
| | | | Mypy requirements and python 3.4 seem incompatible.
* Fix - W0612: Unused variable 'checker_name'Pierre Sassoulas2019-06-201-1/+2
|
* Refactor - Remove useless parameter in print_checker_docPierre Sassoulas2019-06-201-1/+1
|
* Refactor - Move doc for checkers in BaseCheckerPierre Sassoulas2019-06-201-46/+6
| | | | At long last.
* Refactor - Use get_rest_title where it could bePierre Sassoulas2019-06-201-6/+3
|
* Refactor - Move utility function to utilsPierre Sassoulas2019-06-201-28/+3
| | | | We want to use them in Checker too.
* Refactor - Remove _ in _rest_format_sectionPierre Sassoulas2019-06-201-3/+3
| | | | Because we want to make it a public function.
* Refactor - Remove syntax specific to python 3.6Pierre Sassoulas2019-06-201-5/+5
| | | | Following review see here : https://github.com/PyCQA/pylint/pull/2844#discussion_r281014957
* Refactor - Use a constant for the main checker namePierre Sassoulas2019-06-201-1/+2
| | | | Following review see : https://github.com/PyCQA/pylint/pull/2844#discussion_r281014968
* Refactor - Move build_message_definition to the BaseChecker classPierre Sassoulas2019-06-201-2/+1
|
* Refactor - Separate string creation and display in _print_full_documentationPierre Sassoulas2019-06-201-19/+17
| | | | This will permit to get the string without printing it at the same time.
* Fix - Add type annotation for mypyPierre Sassoulas2019-06-201-1/+1
|
* Refactor - Separate string creation and display in _print_checker_docPierre Sassoulas2019-06-201-55/+54
| | | | | This will permit to get the string without printing it at the same time. This will also permit to move this to BaseChecker.
* Refactor - Separate string creation and display in rest_format_sectionPierre Sassoulas2019-06-201-11/+12
| | | | | | | This will permit to get the string without printing it at the same time. Print add an implicit \n so if this look convuluted remember that. We had to change step by step in order to be able to not have too much complexity at once.