Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/PyCQA/pylint into overridde…
Browse files Browse the repository at this point in the history
…n-final-method-documentation
  • Loading branch information
mbyrnepr2 committed Apr 5, 2022
2 parents 45a7db4 + 48e6585 commit 8ede196
Show file tree
Hide file tree
Showing 139 changed files with 2,194 additions and 953 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Generate partial Python venv restore key
Expand All @@ -43,7 +43,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key: >-
Expand All @@ -65,7 +65,7 @@ jobs:
hashFiles('.pre-commit-config.yaml') }}"
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
Expand All @@ -88,12 +88,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand All @@ -106,7 +106,7 @@ jobs:
exit 1
- name: Restore pre-commit environment
id: cache-precommit
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
Expand All @@ -131,12 +131,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand All @@ -162,12 +162,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
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 @@ -37,7 +37,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -48,7 +48,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key: >-
Expand Down Expand Up @@ -77,12 +77,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down Expand Up @@ -112,12 +112,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down Expand Up @@ -147,12 +147,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -41,7 +41,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key: >-
Expand Down Expand Up @@ -71,12 +71,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down Expand Up @@ -112,12 +112,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down Expand Up @@ -156,12 +156,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -222,7 +222,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key: >-
Expand Down Expand Up @@ -256,12 +256,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key:
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Generate partial Python venv restore key
Expand All @@ -304,7 +304,7 @@ jobs:
}}"
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
key: >-
Expand Down Expand Up @@ -334,12 +334,12 @@ jobs:
uses: actions/checkout@v3.0.0
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v3.0.0
uses: actions/setup-python@v3.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v3.0.0
uses: actions/cache@v3.0.1
with:
path: venv
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 @@ -88,7 +88,7 @@ repos:
additional_dependencies: ["platformdirs==2.2.0", "types-pkg_resources==0.1.3"]
exclude: tests/functional/|tests/input|tests(/.*)+/conftest.py|doc/data/messages|tests(/\w*)*data/
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.1
rev: v2.6.2
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
Expand Down
38 changes: 38 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,32 @@ Release date: TBA
Put new features here and also in 'doc/whatsnew/2.14.rst'


* Added new checker ``typevar-name-mismatch``: TypeVar must be assigned to a variable with the same name as its name argument.

Closes #5224

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

Closes #5501

* Added new checker ``typevar-double-variance``: The "covariant" and "contravariant" keyword arguments
cannot both be set to "True" in a TypeVar.

Closes #5895

* Re-enable checker ``bad-docstring-quotes`` for Python <= 3.7.

Closes #6087

* Exclude dunder calls on super() from raising ``unnecessary-dunder-call``.

Closes #6074

* Removed the broken ``generate-man`` option.

Closes #5283
Closes #1887

* Add new check ``unnecessary-dunder-call`` for unnecessary dunder method calls.

Closes #5936
Expand All @@ -24,6 +46,11 @@ Release date: TBA

Closes #578

* The ``ignore-mixin-members`` option has been deprecated. You should now use the new
``ignored-checks-for-mixins`` option.

Closes #5205

* Added new checker ``unnecessary-list-index-lookup`` for indexing into a list while
iterating over ``enumerate()``.

Expand Down Expand Up @@ -55,6 +82,17 @@ What's New in Pylint 2.13.5?
============================
Release date: TBA

* Fix false positive regression in 2.13.0 for ``used-before-assignment`` for
homonyms between variable assignments in try/except blocks and variables in
subscripts in comprehensions.

Closes #6069
Closes #6136

* Fix false positive for ``unused-import`` when disabling both ``used-before-assignment`` and ``undefined-variable``.

Closes #6089

* Narrow the scope of the ``unnecessary-ellipsis`` checker to:
* functions & classes which contain both a docstring and an ellipsis.
* A body which contains an ellipsis ``nodes.Expr`` node & at least one other statement.
Expand Down
15 changes: 4 additions & 11 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,8 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# TO-DO: Disable thme options too see how Furo themes look in default config
# html_theme_options = {
# "collapsiblesidebar": True,
# "issues_url": "https://github.com/pycqa/pylint/issues/new",
# "root_name": "PyCQA",
# "root_url": "https://meta.pycqa.org/en/latest/",
# }
# Currently we use the default Furo configuration
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
Expand Down Expand Up @@ -147,10 +142,8 @@
smartquotes = False

# Custom sidebar templates, maps document names to template names.
# Use Default Furo Sidebar
# html_sidebars = {
# "**": ["localtoc.html", "globaltoc.html", "relations.html", "sourcelink.html"]
# }
# Currently we use the default Furo Sidebar
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
1 change: 1 addition & 0 deletions doc/data/messages/b/bad-string-format-type/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("%d" % "1") # [bad-string-format-type]
2 changes: 2 additions & 0 deletions doc/data/messages/b/bad-string-format-type/details.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This check is currently only active for "old-style" string formatting as seen in the examples.
See `Issue #6085 <https://github.com/PyCQA/pylint/issues/6163>`_ for more information.
1 change: 1 addition & 0 deletions doc/data/messages/b/bad-string-format-type/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("%d" % 1)
2 changes: 2 additions & 0 deletions doc/data/messages/b/bad-string-format-type/related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `Format String Syntax <https://docs.python.org/3/library/string.html#formatstrings>`_
- `PyFormat <https://pyformat.info/>`_
Loading

0 comments on commit 8ede196

Please sign in to comment.