Skip to content

Commit dd79745

Browse files
Merge branch 'master' into allow-all-config-formats
2 parents 3182840 + 4faccd0 commit dd79745

File tree

539 files changed

+6661
-3661
lines changed

Some content is hidden

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

539 files changed

+6661
-3661
lines changed

.flake8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
ignore =
3+
E203, W503, # Incompatible with black see https://github.com/ambv/black/issues/315
4+
E501, # Lot of offending line right now
5+
6+
max-line-length=88
7+
max-complexity=39

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.svn/
2-
.hg/
3-
.hgtags/
1+
# Do not add entries specific to your dev environment or development
2+
# preferences in this file. You can use the global .gitignore for that:
3+
# git config --global core.excludesFile '~/.gitignore'
44
/log
55
*.py[cod]
66
/build
@@ -20,8 +20,6 @@ debian/pylint.substvars
2020
debian/pylint
2121
.coverage
2222
.coverage.*
23-
.idea
24-
.vscode
2523
.cache/
2624
.eggs/
2725
.pytest_cache/

.pre-commit-config.yaml

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,54 @@
11
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: 19.10b0
2+
- repo: https://github.com/myint/autoflake
3+
rev: v1.4
44
hooks:
5-
- id: black
6-
args: [--safe, --quiet]
7-
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
5+
- id: autoflake
6+
exclude: &fixtures tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
7+
args:
8+
- --in-place
9+
- --remove-all-unused-imports
10+
- --expand-star-imports
11+
- --remove-duplicate-keys
12+
- --remove-unused-variables
813
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v2.1.0
14+
rev: v3.4.0
1015
hooks:
1116
- id: trailing-whitespace
17+
exclude: "tests/functional/t/trailing_whitespaces.py"
1218
- id: end-of-file-fixer
13-
- repo: https://github.com/pre-commit/mirrors-isort
14-
rev: v4.3.21
19+
exclude: "tests/functional/m/missing_final_newline.py|tests/functional/t/trailing_newlines.py"
20+
- repo: https://github.com/PyCQA/isort
21+
rev: 5.7.0
1522
hooks:
1623
- id: isort
24+
- repo: https://gitlab.com/pycqa/flake8
25+
rev: 3.8.4
26+
hooks:
27+
- id: flake8
28+
exclude: *fixtures
29+
- repo: https://github.com/ambv/black
30+
rev: 20.8b1
31+
hooks:
32+
- id: black
33+
args: [--safe, --quiet]
34+
exclude: *fixtures
35+
- repo: local
36+
hooks:
37+
- id: pylint
38+
name: pylint
39+
entry: pylint
40+
language: system
41+
types: [python]
42+
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|doc/
43+
- repo: https://github.com/pre-commit/mirrors-mypy
44+
rev: v0.800
45+
hooks:
46+
- id: mypy
47+
name: mypy
48+
entry: mypy
49+
language: python
50+
"types": [python]
51+
args: ["--ignore-missing-imports", "--scripts-are-modules"]
52+
require_serial: true
53+
additional_dependencies: []
54+
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|doc/|bin/

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
- python: 3.6
1818
env: TOXENV=spelling
1919
- stage: tests-cpython
20-
python: 3.5
21-
env: TOXENV=py35
22-
- python: 3.6
20+
python: 3.6
2321
env: TOXENV=py36
2422
- python: 3.7
2523
env: TOXENV=py37
2624
- python: 3.8
2725
env: TOXENV=py38
26+
- python: 3.9
27+
env: TOXENV=py39
2828
- stage: tests-pypy
2929
python: pypy3
3030
env: TOXENV=pypy

CONTRIBUTORS.txt

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,7 @@ contributors:
286286

287287
* Michael Scott Cuthbert: contributor
288288

289-
* Pierre Sassoulas : contributor
290-
- 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"
289+
* Pierre Sassoulas : maintainer, contributor
294290

295291
* Nathan Marrow
296292

@@ -399,3 +395,53 @@ contributors:
399395
* Ethan Leba: contributor
400396

401397
* Matěj Grabovský: contributor
398+
399+
* Yeting Li (yetingli): contributor
400+
401+
* Frost Ming (frostming): contributor
402+
403+
* Luigi Bertaco Cristofolini (luigibertaco): contributor
404+
405+
* Eli Fine (eli88fine): Fixed false positive duplicate code warning for lines with symbols only
406+
407+
* Ganden Schaffner: contributor
408+
409+
* Josselin Feist: contributor
410+
411+
* David Cain: contributor
412+
413+
* Pedro Algarvio (s0undt3ch): contributor
414+
415+
* Luigi Bertaco Cristofolini (luigibertaco): contributor
416+
417+
* Or Bahari
418+
419+
* Joshua Cannon: contributor
420+
421+
* Giuseppe Valente: contributor
422+
423+
* Takashi Hirashima: contributor
424+
425+
* Joffrey Mander: contributor
426+
427+
* Julien Palard: contributor
428+
429+
* Raphael Gaschignard: contributor
430+
431+
* Sorin Sbarnea: contributor
432+
433+
* Gergely Kalmár: contributor
434+
435+
* Batuhan Taskaya: contributor
436+
437+
* Frank Harrison (doublethefish): contributor
438+
439+
* Gauthier Sebaux: contributor
440+
441+
* Logan Miller (komodo472): contributor
442+
443+
* Matthew Suozzo: contributor
444+
445+
* Marc Mueller (cdce8p): contributor
446+
447+
* David Gilman: contributor

ChangeLog

Lines changed: 153 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,172 @@
22
Pylint's ChangeLog
33
------------------
44

5-
What's New in Pylint 2.6.1?
5+
What's New in Pylint 2.7.0?
66
===========================
77

8-
Release date: TBA
8+
* Python 3.6+ is now required.
9+
10+
* Bug fix for empty-comment message line number.
11+
12+
Closes #4009
13+
14+
* Only emit `bad-reversed-sequence` on dictionaries if below py3.8
15+
16+
Closes #3940
17+
18+
* Handle class decorators applied to function.
19+
20+
Closes #3882
21+
22+
* Add check for empty comments
23+
24+
* Fix minor documentation issue in contribute.rst
25+
26+
* Enums are now required to be named in UPPER_CASE by ``invalid-name``.
27+
28+
Close #3834
29+
30+
* Add missing checks for deprecated functions.
31+
32+
* Postponed evaluation of annotations are now recognized by default if python version is above 3.10
33+
34+
Closes #3992
35+
36+
* Fix column metadata for anomalous backslash lints
37+
38+
* Drop support for Python 3.5
39+
40+
* Add support for pep585 with postponed evaluation
41+
42+
Closes #3320
43+
44+
* Check alternative union syntax - PEP 604
45+
46+
Closes #4065
47+
48+
* Fix multiple false positives with assignment expressions
49+
50+
Closes #3347, #3953, #3865, #3275
51+
52+
* Fix TypedDict inherit-non-class false-positive Python 3.9+
53+
54+
Closes #1927
55+
56+
* Fix issue with nested PEP 585 syntax
57+
58+
* Fix issue with nested PEP 604 syntax
59+
60+
* Fix a crash in `undefined-variable` caused by chained attributes in metaclass
61+
62+
Close #3742
63+
64+
* Fix false positive for `not-async-context-manager` when `contextlib.asynccontextmanager` is used
65+
66+
Close #3862
67+
68+
* Fix linter multiprocessing pool shutdown (triggered warnings when runned in parallels with other pytest plugins)
69+
70+
Closes #3779
71+
72+
* Fix a false-positive emission of `no-self-use` and `unused-argument` for methods
73+
of generic structural types (`Protocol[T]`)
74+
75+
Closes #3885
76+
77+
* Fix bug that lead to duplicate messages when using ``--jobs 2`` or more.
78+
79+
Close #3584
80+
81+
* Adds option ``check-protected-access-in-special-methods`` in the ClassChecker to activate/deactivate
82+
``protected-access`` message emission for single underscore prefixed attribute in special methods.
83+
84+
Close #3120
85+
86+
* Fix vulnerable regular expressions in ``pyreverse``
87+
88+
Close #3811
989

1090
* ``inconsistent-return-statements`` message is now emitted if one of ``try/except`` statement
1191
is not returning explicitly while the other do.
1292

1393
Closes #3468
14-
94+
1595
* Fix ``useless-super-delegation`` false positive when default keyword argument is a dictionnary.
1696

1797
Close #3773
1898

1999
* Fix a crash when a specified config file does not exist
20100

101+
* Add support to ``ignored-argument-names`` in DocstringParameterChecker and adds `useless-param-doc` and `useless-type-doc` messages.
102+
103+
Close #3800
104+
105+
* Enforce docparams consistently when docstring is not present
106+
107+
Close #2738
108+
109+
* Fix ``duplicate-code`` false positive when lines only contain whitespace and non-alphanumeric characters (e.g. parentheses, bracket, comman, etc.)
110+
111+
* Improve lint message for `singleton-comparison` with bools
112+
113+
* Fix spell-checker crash on indented docstring lines that look like # comments
114+
115+
Close #3786
116+
117+
* Fix AttributeError in checkers/refactoring.py
118+
119+
* Improve sphinx directives spelling filter
120+
121+
* Fix a bug with postponed evaluation when using aliases for annotations.
122+
123+
Close #3798
124+
125+
* Fix minor documentation issues
126+
127+
* Improve the performance of the line length check.
128+
129+
* Removed incorrect deprecation of ``inspect.getfullargspec``
130+
131+
* Fix ``signature-differs`` false positive for functions with variadics
132+
133+
Close #3737
134+
135+
* Fix a crash in `consider-using-enumerate` when encountering `range()` without arguments
136+
137+
Close #3735
138+
139+
* `len-as-conditions` is now triggered only for classes that are inheriting directly from list, dict, or set and not implementing the `__bool__` function, or from generators like range or list/dict/set comprehension. This should reduce the false positives for other classes, like pandas's DataFrame or numpy's Array.
140+
141+
Close #1879
142+
143+
* Fixes duplicate-errors not working with -j2+
144+
145+
Close #3314
146+
147+
* `generated-members` now matches the qualified name of members
148+
149+
Close #2498
150+
151+
* Add check for bool function to `len-as-condition`
152+
153+
* Add `simplifiable-condition` check for extraneous constants in conditionals using and/or.
154+
155+
* Add `condition-evals-to-constant` check for conditionals using and/or that evaluate to a constant.
156+
157+
Close #3407
158+
159+
* Changed setup.py to work with [distlib](https://pypi.org/project/distlib)
160+
161+
Close #3555
162+
163+
What's New in Pylint 2.6.1?
164+
===========================
165+
166+
* Astroid version has been set as < 2.5
167+
168+
Close #4093
169+
170+
21171
What's New in Pylint 2.6.0?
22172
===========================
23173

@@ -67,13 +217,6 @@ Release date: 2020-08-20
67217

68218
Close #3722
69219

70-
* Add check for bool function to `len-as-condition`
71-
72-
* Add `simplifiable-condition` check for extraneous constants in conditionals using and/or.
73-
74-
* Add `condition-evals-to-constant` check for conditionals using and/or that evaluate to a constant.
75-
76-
Close #3407
77220

78221
What's New in Pylint 2.5.4?
79222
===========================

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:3.9.0-alpine3.12
2+
3+
COPY ./ /tmp/build
4+
WORKDIR /tmp/build
5+
RUN python setup.py install && rm -rf /tmp/build
6+
7+
ENTRYPOINT ["pylint"]

0 commit comments

Comments
 (0)