| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
|
| |
Closes #5261
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using `with threading.Lock():` directly has no effect.
Correct usage is:
```
lock = threading.Lock()
with lock:
...
```
This applies for:
* threading.Lock
* threading.RLock
* threading.Condition
* threading.Semaphore
* threading.BoundedSemaphore
Signed-off-by: Martin Basti <mbasti@redhat.com>
|
|
|
|
|
| |
* add test import for multiprocessing.synchronize
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix access to private function in inner class on protected-access bug
* Add functional test for protected-access from inner class
* Add Ikraduya to CONTRIBUTORS file
* Add if statement to avoid potential bug
* Fix ``protected-access`` for attributes and methods of nested classes
This closes #3066
Co-authored-by: ikraduya <ikraduya@gmail.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
| |
This closes #5222
See https://numpydoc.readthedocs.io/en/latest/format.html#parameters for reference
|
|
|
|
| |
* Unify all `<y or n>` metavars
|
|
|
|
|
|
|
| |
False (#5227)
* Fix incorrect ``consider-using-ternary`` when condition is inferrable as False
* Properly infer the condition in old ternary statements and suggest ``simplify-boolean-expression`` over ``consider-using-ternary`` if it is False
|
| |
|
|
|
|
| |
Closes #3688
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
* Add tests for assignment expressions in function defaults
Ref #3688
* Upgrade astroid to 2.8.4
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
| |
Co-authored-by: Alpha <alpha@pokesplash.net>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* Add extension checker that suggests any/all statements from for loops
* Suggest all/not all: If there are negated conditions, we can suggest
an all/not all statement to move the 'not' out of the comprehension and
call it only once.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
| |
Closes #5194
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
| |
defaults (#5184)
This closes #3771
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
| |
a variable. (#5157)
Compare variable default args and simplify the logic of the checkers.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
| |
Closes #4426
|
|
|
| |
Closes #3733
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
collection literals (#5120)
* Create a new checker; use-implicit-booleanness checker where it looks
for boolean evaluatiion with collection literals such as `()`, `[]`,
or `{}`
* Fixed invalid usage of comparison within pylint package
This closes #4774
* Ignore tuples when checking for `literal-comparison`
Closes #3031
* Merge len_checker with empty_literal checker
Moving empty literal checker with len_checker to avoid class without
iterators without boolean expressions (false positive on pandas)
Reference: https://github.com/PyCQA/pylint/pull/3821/files
* Update `len_checker` and its class `LenChecker` to `ComparisonChecker`
to reflect better usage after merging between `len_checker` and
`empty_literal_checker` and its tests.
* Fixed `consider_using_in` and `consider_iterating_dictionary` tests
that were failing due to new empty literal checkers.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
| |
(#5158)
Closes #5140
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [python-docs-theme](https://github.com/python/python-docs-theme) from 2021.8 to 2021.11.1.
- [Release notes](https://github.com/python/python-docs-theme/releases)
- [Changelog](https://github.com/python/python-docs-theme/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/python/python-docs-theme/compare/2021.8...2021.11.1)
---
updated-dependencies:
- dependency-name: python-docs-theme
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
missing-any-param-doc (#5097)
* Correctly identify parameters with no doc and add new message
This commit fixes the problem where non documented parameters where not being
identified properly. Also, it adds a new message called ``missing-any-param-doc`` for
when a function has no parameter and type doc at all.
Adds new test cases for the ``missing-param-doc`` and ``missing-type-doc`` messages
and tests for the new message ``missing-any-param-doc``.
* Replace old messages with the new one where needed
Fix pylint's code where the new message where needed in other files instead of
triggering both missing-param-doc and missing-type-doc.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
| |
* Add checkers for typing.final for Python version 3.8 or later
- overridden-final-method
- subclassed-final-class
Closes #3197
|
|
|
|
|
|
|
|
|
|
| |
Rename `len-as-condition` to be more general for new checker
`use-implicit-booleaness-not-comparison`
* Refactor `LenChecker` class -> `ImplicitBooleanessChecker`o
* Rename test files/`len_checker.py`/`__init__.py` to reflect new name.
* Add `len-as-condition` as `old_names` for `use-implicit-booleaness-not-len`
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Improve and flatten ``unused-wildcard-import`` message
Instead of reporting all unused imports, the checker now emits one
single message for all unused imports with a stylized string containing
all imports.
This closes #3859
* Add tests for string formation
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
class using ``cls`` (#4965)
* Fix false positive ``unused-private-member`` for accessing attributes in
a class using ``cls``
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.1.2...v4.2.0)
---
updated-dependencies:
- dependency-name: sphinx
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* Add documentation for ``pyreverse`` and ``symilar``
* Rephrase "additional tools" to "additional commands" to be consistent with Readme
* Replace some example diagrams with PlantUML ones and fix errors preventing the doc to build
* Incorporate review feedback
* Only hint to the ``-h`` option instead of including all options manually in the docs
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make ``global-variable-not-assigned`` check local scope
This checker now checks whether the names after the global keyword
are reassigned in the local scope.
This closes #1375
* Make ``global-variable-not-assigned`` check functions
This checker now also checks function defintions in the module and local scope
This closes #330
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
| |
By changing the function used to create the cache from ``os.mkdir``
to ``os.makedirs`` we now handle non-existing parent directories
correctly.
This closes #4900
|
|
|
|
|
|
|
|
| |
* Make ``min-similarity-lines == 0`` stop similarity check
This makes it so that setting ``min-similarity-lines`` to zero exit the
similarity code checker with a successful exit.
This closes #4901
Co-authored-by: Marc Mueller <30130371+cdce8p@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>
|
|
|
|
|
|
| |
Tuples can be created with inner tuples. This creates double parenthesis
which we flagged incorrectly.
This closes #4907
|
|
|
|
|
|
| |
The ``unspecified-encoding`` checker now also checks calls to ``pathlib.Path().read_text()``
and ``pathlib.Path().write_text()``
This closes #4945
|
|
|
|
|
|
| |
It's possible to use the python3 porting checker from
an older pylint version. But it's not evolving anymore
and was costing resource to maintain.
|