| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
keyword-only arguments (#8674)
Closes #8667
|
| |
|
|
|
|
|
|
|
| |
For methods inheriting from ``Enum``.
Closes #7857
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
* Ignore subclasses of Any
* Add ignores for imported code and remove casts
* Add disables for uninferable return values
* Turn on ``mypy`` strict mode
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add ``--minimal-messages-config`` option for functional tests
* Add test file option to exclude from --minimal-messages-config run.
* Fix ``too-many-branches`` false negative
* Fix ``access-member-before-definition`` false negative
* Fix ``consider-using-min-builtin`` and ``consider-using-max-builtin`` false negatives
* Fix ``consider-using-with`` false negative
* Exclude ``deprecated-module`` tests from ``--minimal-messages-config`` run.
Have to find out how the list of deprecated modules is built first.
* Update doc/whatsnew/2.14.rst
* Ignore deprecated module false negatives
* Fix ``deprecated-typing-alias`` false negative
* Skip tests for ``fixme`` message, don't know yet how enable/disable affects TokenChecker/RawChecker
* Exclude functional test for various logging checks, as the output string depends on what messages are enabled.
* Fix false negative for ``nan-comparison``
* Fix false negative for ``non-ascii-module-import``
* Fix false negative for ``non-ascii-file-name``
* Skip tests for logging messages
* Fix false negative for ``undefined-variable`` in ``metaclass`` argument
* Exclude test for ``catching-non-exception``. ``exc._all_bases_known`` is ``False`` when enabling just this message.
* Exclude ``ungrouped_imports_suppression``. ``useless-suppression`` is triggered too often in this case.
* Fix false negative for ``use-a-generator``
* Exclude functional tests for ``useless-suppression`` from ``--minimal-messages-config``
* Exclude another deprecation check from ``--minimal-messages-config`` run
* Update tests/testutils/data/m/minimal_messages_config.py
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
| |
Fix the existing file so they have a notice.
No header for setup.py or examples or doc
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Remove verbose docstring in code, keep them in example and doc
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
|
| |
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
| |
|
|
|
|
| |
Closes #5250
|
|
|
|
|
|
|
|
|
| |
Allow excluding classes based on their ancestors from the ``too-few-public-methods`` checker.
Closes #3370
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
* Refactor ``self.stats`` on linter and checker
This adds a new class ``LinterStats`` which is used to store all
kinds of stats during a run of ``pylint``. Tests have been changed
slightly to be able to use the new class.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.26.0 → v2.28.0](https://github.com/asottile/pyupgrade/compare/v2.26.0...v2.28.0)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add regression test for #4972 hang
* Fix loop in too-many-ancestors when an inheritance cycle is inferred
Ref #4972. If a class could be inferred as an ancestor of itself then
the implementation of _get_parents could get caught in an infinite loop,
forever adding itself to to_explore. This could be possible by
monkeypatching an ancestor after class definition like in the following
simplified example:
class Fake(module.Cls):
pass
module.Cls = Fake
Reproducing this is fairly tricky, but this integration test shows the
behaviour as of 1e675abcc2aa931421d7ce300908e734a93fd790:
#!/bin/sh
HERE=$(readlink -f .)
VENV=$HERE/venv-repro
PIP=$VENV/bin/pip
python -m venv "$VENV"
PYLINT=$VENV/bin/pylint
# assume running in pylint dir
$PIP install -e .
$PIP install flask
mkdir -p repro/flask/
touch repro/__init__.py
cat > repro/flask/__init__.py <<'EOF'
import flask
import repro.flask # self-import necessary
class Fake(flask.Flask):
pass
flask.Flask = Fake
EOF
echo +++ this is fine
$PYLINT --rcfile=/dev/null -- repro/flask/
echo +++ finished
echo +++ this loops forever
cd repro/; $PYLINT --rcfile=/dev/null -- flask/
echo +++ should not reach here
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add typing to all calls to ``self.stats``
All checkers inherit from a baseclass which has a ``stats`` attribute.
This attribute has a fairly unmanageable type, but the current typing includes all variations of the attribute.
Other changes not directly related to ``self.stats`` are due to ``mypy``warnings.
This incorporate the feedback received in #4954
* Add ``CheckerStatistic`` class to ``pylint/typing``
* Guard `typing.Counter` import
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
* Upgrade ignored-parents help description
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add ignored-parents option to design checker
This allows users to specify classes to ignore while counting parent
classes.
Partially closes #3057
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
| |
* Fix link in license header
* Update link to astroid bump_changelog
|
| |
|
|
|
|
|
| |
* Change msg name to include dataclass
* Update pylint ignores
* Update tests
|
|
|
|
| |
* Add new checker consider-using-namedtuple
* Add disable for existing code base
|
|
|
| |
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove unused imports for astroid
|