Skip to content

Commit 98339ac

Browse files
authored
Merge branch 'master' into parallel
2 parents 04db81a + 1e05190 commit 98339ac

File tree

970 files changed

+2383
-2346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

970 files changed

+2383
-2346
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: black
66
args: [--safe, --quiet]
7-
exclude: tests/functional|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
7+
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
88
- repo: https://github.com/pre-commit/pre-commit-hooks
99
rev: v2.1.0
1010
hooks:

.travis.yml

Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,58 @@
11
language: python
2-
32
stages:
4-
- prechecks
5-
- tests-cpython
6-
- tests-pypy
7-
8-
# 3.5-dev because of http://bugs.python.org/issue25131
3+
- prechecks
4+
- tests-cpython
5+
- tests-pypy
96
jobs:
107
include:
11-
- stage: prechecks
12-
python: 3.6
13-
env: TOXENV=pylint
14-
- python: 3.6
15-
env: TOXENV=docs
16-
- python: 3.6
17-
env: TOXENV=formatting
18-
- python: 3.6
19-
env: TOXENV=mypy
20-
- stage: tests-cpython
21-
python: 3.5-dev
22-
env: TOXENV=py35
23-
- python: 3.6
24-
env: TOXENV=py36
25-
- python: 3.7
26-
env: TOXENV=py37
27-
dist: xenial
28-
- python: 3.8-dev
29-
env: TOXENV=py38
30-
dist: xenial
31-
sudo: true
32-
- python: 3.6
33-
env: TOXENV=spelling
34-
- stage: tests-pypy
35-
python: pypy3.5
36-
env: TOXENV=pypy
8+
- stage: prechecks
9+
python: 3.6
10+
env: TOXENV=pylint
11+
- python: 3.6
12+
env: TOXENV=docs
13+
- python: 3.6
14+
env: TOXENV=formatting
15+
- python: 3.6
16+
env: TOXENV=mypy
17+
- stage: tests-cpython
18+
python: 3.5-dev
19+
env: TOXENV=py35
20+
- python: 3.6
21+
env: TOXENV=py36
22+
- python: 3.7
23+
env: TOXENV=py37
24+
dist: xenial
25+
- python: 3.8-dev
26+
env: TOXENV=py38
27+
dist: xenial
28+
sudo: true
29+
- python: 3.6
30+
env: TOXENV=spelling
31+
- stage: tests-pypy
32+
python: pypy3.5
33+
env: TOXENV=pypy
3734
before_install:
38-
- python --version
39-
- uname -a
40-
- lsb_release -a
41-
- sudo apt-get -qq update
42-
- sudo apt-get install -y enchant
35+
- python --version
36+
- uname -a
37+
- lsb_release -a
38+
- sudo apt-get -qq update
39+
- sudo apt-get install -y enchant
4340
install:
44-
- pip install -U setuptools
45-
- pip install tox coverage coveralls
46-
- virtualenv --version
47-
- easy_install --version
48-
- pip --version
49-
- tox --version
50-
- coverage --version
41+
- pip install -U setuptools
42+
- pip install tox coverage coveralls
43+
- virtualenv --version
44+
- easy_install --version
45+
- pip --version
46+
- tox --version
47+
- coverage --version
5148
script:
52-
# Test install with current version of setuptools
53-
- pip install .
54-
- tox -e coverage-erase,$TOXENV
49+
- pip install .
50+
- tox -e coverage-erase,$TOXENV
5551
after_success:
56-
- tox -e coveralls
52+
- tox -e coveralls
5753
after_failure:
58-
- more .tox/log/* | cat
59-
- more .tox/*/log/* | cat
54+
- more .tox/log/* | cat
55+
- more .tox/*/log/* | cat
6056
notifications:
6157
email:
6258
on_success: always
@@ -65,7 +61,7 @@ deploy:
6561
provider: pypi
6662
user: Claudiu.Popa
6763
password:
68-
secure: "EEuu9Rn6yhZjHaRPPHorFOWHu13xmMan+lqXh1jmusbEv9weRSz1LH38ziO7+HIST9l8Sup5tfKr9e0nzYw128FaTRf9/5lMJRa3ZLzh+152EfUqOUfcKKDj7rMN9qeWnS6NjKlUubQypUPkgGfFH4c0jHNVU9qUCLFXLkrFsUUcDrU86nPu69hLOfmyMmv1SF/BaOI1SagKbs5Ak1v0ZGHqImzwqs1Aj6Bz7WzXm70jGuVqokCq6HQNHD3aGjgyQT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PefVf0OmLDPNTgJy0gevsMZgfoCCuiQ=
6965
on:
7066
tags: true
7167
condition: "$TOXENV = py36"

CONTRIBUTORS.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ contributors:
288288

289289
* Pierre Sassoulas : contributor
290290
- Made C0412 (ungrouped import) compatible with isort
291+
- Made multiple message with the same old name possible
292+
- Made Pylint a little faster by refactoring the message store
293+
- Broke down "missing-docstrings" between "module", "class" and "function"
291294

292295
* Nathan Marrow
293296

@@ -312,7 +315,6 @@ contributors:
312315

313316
* Andrzej Klajnert: contributor
314317

315-
316318
* Andrés Pérez Hortal: contributor
317319

318320
* Niko Wenselowski: contributor
@@ -322,3 +324,14 @@ contributors:
322324
* Eric Froemling: contributor
323325

324326
* Janne Rönkkö: contributor
327+
328+
* Robert Schweizer: contributor
329+
330+
* Hugo van Kemenade: contributor
331+
332+
* Mikhail Fesenko: contributor
333+
334+
* Trevor Bekolay: contributor
335+
- Added --list-msgs-enabled command
336+
337+
* Rémi Cardona: contributor

ChangeLog

Lines changed: 115 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
Pylint's ChangeLog
33
------------------
44

5-
What's New in Pylint 2.4.0?
5+
What's New in Pylint 2.5.0?
6+
===========================
7+
8+
Release date: TBA
9+
10+
11+
What's New in Pylint 2.4.3?
612
===========================
713

814
* Allow parallel linting when run under Prospector
@@ -17,9 +23,96 @@ What's New in Pylint 2.4.0?
1723

1824
Remove code duplication from file checking.
1925

26+
* Fix an issue with ``unnecessary-comprehension`` in comprehensions with additional repacking of elements.
27+
28+
Close #3148
29+
30+
31+
* ``import-outside-toplevel`` is emitted for ``ImportFrom`` nodes as well.
32+
33+
Close #3175
34+
35+
What's New in Pylint 2.4.2?
36+
===========================
37+
38+
Release date: 2019-09-30
39+
40+
41+
* ``ignored-modules`` can skip submodules. Close #3135
42+
43+
* ``self-assigning-variable`` skips class level assignments.
44+
45+
Close #2930
46+
47+
* ``consider-using-sys-exit`` is exempted when `exit()` is imported from `sys`
48+
49+
Close #3145
50+
51+
* Exempt annotated assignments without variable from ``class-variable-slots-conflict``
52+
53+
Close #3141
54+
55+
* Fix ``utils.is_error`` to account for functions returning early.
56+
57+
This fixes a false negative with ``unused-variable`` which was no longer triggered
58+
when a function raised an exception as the last instruction, but the body of the function
59+
still had unused variables.
60+
61+
Close #3028
62+
63+
64+
What's New in Pylint 2.4.1?
65+
===========================
66+
67+
Release date: 2019-09-25
68+
69+
70+
* Exempt type checking definitions defined in both clauses of a type checking guard
71+
72+
Close #3127
73+
74+
75+
* Exempt type checking definitions inside the type check guard
76+
77+
In a7f236528bb3758886b97285a56f3f9ce5b13a99 we added basic support
78+
for emitting `used-before-assignment` if a variable was only defined
79+
inside a type checking guard (using `TYPE_CHECKING` variable from `typing`)
80+
Unfortunately that missed the case of using those type checking imports
81+
inside the guard itself, which triggered spurious used-before-assignment errors.
82+
83+
Close #3119
84+
85+
* Require astroid >= 2.3 to avoid any compatibility issues.
86+
87+
88+
What's New in Pylint 2.4.0?
89+
===========================
90+
91+
Release date: 2019-09-24
92+
93+
* New check: ``import-outside-toplevel``
94+
95+
This check warns when modules are imported from places other than a
96+
module toplevel, e.g. inside a function or a class.
97+
98+
* Handle inference ambiguity for ``invalid-format-index``
99+
100+
Close #2752
101+
102+
* Removed Python 2 specific checks such as ``relative-import``,
103+
``invalid-encoded-data``, ``missing-super-argument``.
104+
105+
* Support forward references for ``function-redefined`` check.
106+
107+
Close #2540
108+
109+
* Handle redefinitions in case of type checking imports.
110+
111+
Close #2834
112+
20113
* Added a new check, ``consider-using-sys-exit``
21114

22-
This check is emitted when we detect that a quit() or exit() is invoked
115+
This check is emitted when we detect that a quit() or exit() is invoked
23116
instead of sys.exit(), which is the preferred way of exiting in program.
24117

25118
Close #2925
@@ -30,6 +123,13 @@ What's New in Pylint 2.4.0?
30123

31124
Close #3064
32125

126+
* Added new checks, ``no-else-break`` and ``no-else-continue``
127+
128+
These checks highlight unnecessary ``else`` and ``elif`` blocks after
129+
``break`` and ``continue`` statements.
130+
131+
Close #2327
132+
33133
* Don't emit ``protected-access`` when a single underscore prefixed attribute
34134
is used inside a special method
35135

@@ -257,11 +357,16 @@ What's New in Pylint 2.4.0?
257357
* Allow a `.` as a prefix for Sphinx name resolution.
258358

259359
* Checkers must now keep a 1 to 1 relationship between "msgid" (ie: C1234) and "symbol" (ie : human-readable-symbol)
260-
* In checkers, an old_names can now be used for multiple new messages
360+
* In checkers, an old_names can now be used for multiple new messages and pylint is now a little faster
261361

262362
Caused by #1164. It means if you do a partial old_names for a message definition an exception will tell you that you
263363
must rename the associated identification.
264364

365+
* Allow the choice of f-strings as a valid way of formatting logging strings.
366+
367+
Closes #2395
368+
369+
* Added ``--list-msgs-enabled`` command to list all enabled and disabled messages given the current RC file and command line arguments.
265370

266371
What's New in Pylint 2.3.0?
267372
===========================
@@ -1079,6 +1184,13 @@ Release date: 2018-07-15
10791184

10801185
Close 1992
10811186

1187+
* Broke down "missing-docstrings" between "module", "class" and "function"
1188+
1189+
For this to work we had to make multiple messages with the same old name
1190+
possible.
1191+
1192+
Closes #1164
1193+
10821194
What's New in Pylint 1.9?
10831195
=========================
10841196

doc/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ severity of the warnings and errors.
2626
.. _pychecker: http://pychecker.sf.net
2727
.. _pyflakes: https://github.com/pyflakes/pyflakes
2828
.. _flake8: https://gitlab.com/pycqa/flake8/
29-
.. _mypy: https://github.com/JukkaL/mypy
29+
.. _mypy: https://github.com/python/mypy
3030
.. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/
3131
.. _`Guido's style guide`: https://www.python.org/doc/essays/styleguide/
3232
.. _`refactoring book`: https://www.refactoring.com/

doc/user_guide/run.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ Other useful global options include:
119119
--output-format=<format> Select output format (text, json, custom).
120120
--msg-template=<template> Modify text output message template.
121121
--list-msgs Generate pylint's messages.
122+
--list-msgs-enabled Display a list of what messages are enabled and
123+
disabled with the given configuration.
122124
--full-documentation Generate pylint's full documentation, in reST
123125
format.
124126

0 commit comments

Comments
 (0)