Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into config_per_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
matusvalo committed Apr 21, 2022
2 parents a5d57e4 + 249db83 commit da2da8b
Show file tree
Hide file tree
Showing 241 changed files with 2,248 additions and 1,499 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ exclude_lines =
# Type checking code not executed during pytest runs
if TYPE_CHECKING:
@overload

# Abstract methods are not exectued during pytest runs
raise NotImplementedError()
16 changes: 8 additions & 8 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
fetch-depth: 0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Generate partial Python venv restore key
Expand Down Expand Up @@ -86,10 +86,10 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -129,10 +129,10 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -160,10 +160,10 @@ jobs:
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/[email protected].0
uses: actions/[email protected].1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/primer-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand Down Expand Up @@ -74,10 +74,10 @@ jobs:
python-version: [3.8, 3.9, "3.10"]
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -109,10 +109,10 @@ jobs:
python-version: [3.8, 3.9, "3.10"]
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -144,10 +144,10 @@ jobs:
python-version: [3.8, 3.9, "3.10"]
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code from Github
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand Down Expand Up @@ -61,6 +61,10 @@ jobs:
run: |
. venv/bin/activate
pytest -vv --durations=20 --benchmark-disable --cov --cov-report= tests/
- name: Run functional tests with minimal messages config
run: |
. venv/bin/activate
pytest -vv --minimal-messages-config tests/test_functional.py
- name: Upload coverage artifact
uses: actions/[email protected]
with:
Expand All @@ -79,10 +83,10 @@ jobs:
COVERAGERC_FILE: .coveragerc
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -123,10 +127,10 @@ jobs:
python-version: [3.8]
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
Expand Down Expand Up @@ -181,12 +185,12 @@ jobs:
# Workaround to set correct temp directory on Windows
# https://github.com/actions/virtual-environments/issues/712
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand Down Expand Up @@ -229,12 +233,12 @@ jobs:
python-key: ${{ steps.generate-python-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ repos:
types: [text]
files: ^(ChangeLog|doc/whatsnew/\d+\.\d+\.rst)
- repo: https://github.com/myint/rstcheck
rev: "3f92957478422df87bd730abde66f089cc1ee19b"
rev: "v5.0.0"
hooks:
- id: rstcheck
args: ["--ignore-roles=func,class,mod", "--report=warning"]
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ contributors:
- Aru Sahni <[email protected]>: Git ignoring, regex-based ignores
- Andreas Freimuth <[email protected]>: fix indentation checking with tabs
- Alexandru Coman <[email protected]>
- Tim Martin <[email protected]>
- Takahide Nojima <[email protected]>
- Taewon D. Kim <[email protected]>
- Sneaky Pete <[email protected]>
Expand Down Expand Up @@ -182,7 +183,6 @@ contributors:
- wtracy <[email protected]>
- jpkotta <[email protected]>
- chohner <[email protected]>
- Tim Martin <[email protected]>
- Tiago Honorato <[email protected]>
- Steven M. Vascellaro <[email protected]>
- Sergey B Kirpichev <[email protected]>
Expand Down
84 changes: 83 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ Release date: TBA
..
Put new features here and also in 'doc/whatsnew/2.14.rst'

* Improved wording of the message of ``deprecated-module``

Closes #6169

* ``Pylint`` now requires Python 3.7.2 or newer to run.

Closes #4301

* ``BaseChecker`` classes now require the ``linter`` argument to be passed.

* Fix a failure to respect inline disables for ``fixme`` occurring on the last line
of a module when pylint is launched with ``--enable=fixme``.

* Update ``invalid-slots-object`` message to show bad object rather than its inferred value.

Closes #6101
Expand All @@ -23,6 +30,19 @@ Release date: TBA

Closes #5224

* Removed the ``assign-to-new-keyword`` message as there are no new keywords in the supported Python
versions any longer.

Closes #4683

* Fixed failure to enable ``deprecated-module`` after a ``disable=all``
by making ``ImportsChecker`` solely responsible for emitting ``deprecated-module`` instead
of sharing responsibility with ``StdlibChecker``. (This could have led to double messages.)

* The ``no-init`` (W0232) warning has been removed. It's ok to not have an ``__init__`` in a class.

Closes #2409

* The ``config`` attribute of ``BaseChecker`` has been deprecated. You can use ``checker.linter.config``
to access the global configuration object instead of a checker-specific object.

Expand All @@ -41,6 +61,12 @@ Release date: TBA

Ref #5392

* All ``Interface`` classes in ``pylint.interfaces`` have been deprecated. You can subclass
the respective normal classes to get the same behaviour. The ``__implements__`` functionality
was based on a rejected PEP from 2001:
https://peps.python.org/pep-0245/

Closes #2287

* The ``set_option`` method of ``BaseChecker`` has been deprecated. You can use ``checker.linter.set_option``
to set an option on the global configuration object instead of a checker-specific object.
Expand All @@ -52,6 +78,12 @@ Release date: TBA

Ref #5392

* ``MapReduceMixin`` has been deprecated. ``BaseChecker`` now implements ``get_map_data`` and
``reduce_map_data``. If a checker actually needs to reduce data it should define ``get_map_data``
as returning something different than ``None`` and let its ``reduce_map_data`` handle a list
of the types returned by ``get_map_data``.
An example can be seen by looking at ``pylint/checkers/similar.py``.

* ``UnsupportedAction`` has been deprecated.

Ref #5392
Expand Down Expand Up @@ -93,6 +125,11 @@ Release date: TBA

Ref #5392

* ``interfaces.implements`` has been deprecated and will be removed in 3.0. Please use standard inheritance
patterns instead of ``__implements__``.

Ref #2287

* ``invalid-enum-extension``: Used when a class tries to extend an inherited Enum class.

Closes #5501
Expand Down Expand Up @@ -126,6 +163,14 @@ Release date: TBA

Closes #5936

* The ``cache-max-size-none`` checker has been renamed to ``method-cache-max-size-none``.

Closes #5670

* The ``method-cache-max-size-none`` checker will now also check ``functools.cache``.

Closes #5670

* ``potential-index-error``: Emitted when the index of a list or tuple exceeds its length.
This checker is currently quite conservative to avoid false positives. We welcome
suggestions for improvements.
Expand All @@ -142,6 +187,9 @@ Release date: TBA

Closes #4324

* Added the ``super-without-brackets`` checker, raised when a super call is missing its brackets.

Closes #4008

* Added the ``generate-toml-config`` option.

Expand Down Expand Up @@ -182,16 +230,50 @@ Release date: TBA
(Ie. not necessarily at the end)


What's New in Pylint 2.13.6?
What's New in Pylint 2.13.8?
============================
Release date: TBA

* Fix a crash when linting a file that passes an integer ``mode=`` to
``open``

Closes #6414


What's New in Pylint 2.13.7?
============================
Release date: 2022-04-20

* Fix a crash caused by using the new config from 2.14.0 in 2.13.x code.

Closes #6408


What's New in Pylint 2.13.6?
============================
Release date: 2022-04-20

* Fix a crash in the ``unsupported-membership-test`` checker when assigning
multiple constants to class attributes including ``__iter__`` via unpacking.

Closes #6366

* Asterisks are no longer required in Sphinx and Google style parameter documentation
for ``missing-param-doc`` and are parsed correctly.

Closes #5815
Closes #5406

* Fixed a false positive for ``unused-variable`` when a builtin specified in
``--additional-builtins`` is given a type annotation.

Closes #6388

* Fixed an ``AstroidError`` in 2.13.0 raised by the ``duplicate-code`` checker with
``ignore-imports`` or ``ignore-signatures`` enabled.

Closes #6301


What's New in Pylint 2.13.5?
============================
Expand Down
Loading

0 comments on commit da2da8b

Please sign in to comment.