Commit Graph

22 Commits

Author SHA1 Message Date
Daniël van Noord
85a480427c Use `python-typing-update on pylint/utils and message` dirs 2022-04-14 10:27:29 +02:00
Pierre Sassoulas
ec4a3f7f1e Add a pre-commit hook to check the copyright notice
Fix the existing file so they have a notice.
No header for setup.py or examples or doc
2022-03-24 13:06:15 +01:00
Pierre Sassoulas
9e0baf370a Simplify hard to maintain copyright notice
git is the source of truth for the copyright, copyrite (the tool)
was taking exponentially longer with each release, and it's
polluting the code with sometime as much as 50 lines of names.
2022-03-24 13:06:15 +01:00
Daniël van Noord
e75e37a290
Remove `lru_cache from get_active_msgids` (#5672)
Ref #5670
2022-01-13 15:47:52 +01:00
Daniël van Noord
fffde57ac0 Format docstrings with `pydocstringformatter` 2022-01-02 23:52:24 +01:00
Pierre Sassoulas
532be9afa7
Add caching to bottlenecks in the message store (#5605)
Some functions can't be cached without impacting the correctness
with the current design.

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
2021-12-29 11:13:27 +01:00
Marc Mueller
a9c1017929
Require Python 3.6.2 (#5068)
* Bump python_requires to >= 3.6.2

* Import typing names directly
* Use typing.NamedTuple for MessageTest
* Add default value to MessageStyle

* Revert "Add an exception at install for python < 3.6.2 (#5171)"

This reverts commit 37e330cadd.

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-11-25 16:35:46 +01:00
Daniël van Noord
86c073e49f Add basic typing to `pylint/message` 2021-10-02 16:38:04 +02:00
Pierre Sassoulas
bbaa7bc920 Fix false negative for use-symbolic-message
Closes #5000
2021-09-14 09:56:58 +02:00
Daniël van Noord
baaa81a299
Refactor various typing related issues (#4940)
* Add type annotations to ``visit`` & ``leave`` calls
This adds typing to most calls that visit nodes. All other changes are
due to mypy errors resulting from introduction of typing.

* Fix outstanding mypy issues
This removes some of the `type: ignore` comments in favour of
solving the mypy issues these comments were surpressing.

* Fix remaining references to node_classes
Except for two references to node_classes in the changelog this should be the last of them

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2021-09-03 13:47:23 +02:00
Marc Mueller
21290866a2
Fix copyright links (#4647)
* Fix link in license header
* Update link to astroid bump_changelog
2021-07-01 12:47:58 +02:00
Pierre Sassoulas
ec78b15c76 Refactor register_message_definition to prevent circular import 2021-06-02 13:13:01 +02:00
Pierre Sassoulas
35a030ea60 Add typing in pylint.messages
Only the one that are not creating circular imports.
See #4530
2021-06-02 13:13:01 +02:00
Pierre Sassoulas
af52033971
Rename copying to license and upgrade the setup.cfg (#4338) 2021-04-11 15:29:34 +02:00
Pierre Sassoulas
9dfd32516e Refactor MessageId Store with a better error message 2021-04-09 20:15:43 +02:00
Pierre Sassoulas
ee910755b9 Migrate from % syntax or bad format() syntax to fstring
We can do that in python 3.6
2021-02-21 15:36:16 +01:00
Pierre Sassoulas
8020641d2b Move from format() to f-string where it makes sense
As we do not maintain python 3.5 it permit to simplify some code
2021-02-16 07:53:15 +01:00
Anthony Sottile
a45505143f pyupgrade: automated removal of python2 constructs
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/)
```
2020-03-24 10:27:21 +01:00
Pierre Sassoulas
ac30e1e766 [pylint.message] Remove a check that never fail
It seems to make performance 2/3 % better during test and during pylint
own analysis.
2019-09-10 11:14:38 +02:00
Pierre Sassoulas
572ed87ee9 [pylint.message] Optimize MessageDefinitionStore storage 2019-09-10 11:14:38 +02:00
Pierre Sassoulas
3981bec0d1 [tests.message] Add a test for multiple messages with the same old name 2019-09-10 11:14:38 +02:00
Pierre Sassoulas
4bd00376f8 [pylint.message] Create a MessageIdStore class 2019-08-19 13:54:52 +02:00