| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
| |
* Fix deprecation 'check function will only accept sequence of string'
* Add a test for Pylinter.check() deprecation
|
|
|
|
|
|
|
|
|
|
| |
* Fix the deprecation of set_output in our code
* Add a test for the deprecation warning itself
* Refactor the set_output from the MultiReporter
We can remove set_output declaration because the function was already failing
with a NotImplementedError before, so removing it make it fail another way
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Clean up some useless-super-delegation logic
In _definition_equivalent_to_call, avoid constructing a tuple and
calling "all" on that. Instead, just check each condition in turn,
terminating as soon as one fails.
In _has_different_parameters_default_value, use a single sentinel value
for a missing default instead of constructing a new one each call. Also
construct the dict of comparators once instead of once each call.
Restructure the logic to be less nested.
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
|
|\
| |
| | |
Fix exception of pyreverse in handling property function within a class.
|
| |
| |
| |
| |
| |
| | |
Remove the "main" function because this is meaningless for testing.
Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| | |
- move "tests/prop_data/*" to "tests/data/."
- make tests/data/property_pattern.py correctly executable.
- remove class members not related to "property" from test/data/property_pattern.py.
- modify tests of pyreverse to pass all tests.
|
|/ |
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
* Use backticks for any-all suggestion
If the suggestion contains a string, then the suggestion's quotes can
get mixed up with the the string's quotes.
|
|
|
|
|
|
|
| |
* Enable for_any_all check, reword a few docstrings, shorten some loop variable
names, and add typing on modified functions.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix regression for ``_is_only_type_assignment``
This closes #5162
* Remove references to `name`
* Better tests for assignment
* Move walrus tests to different file
* Fix tests with incorrect typing
* Update typing of `defstmt`
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix use-implicit-booleaness-not-comparison crash
`use-implicit-booleaness-not-comparison` caused a crash due to
`target_node` not being an instance of `NodeNG.Name`
This fix will allow the checker to have a default handling when it
encounters `target_node` other than `Calls`,`Name`, or `Attribute`
* Added more comprehensive test for implicit_booealness_checker
* Make implicit_booealness_checker to have default `variable_name`
* Handle `Calls`,`Name`, or `Attribute`
* Fix typing in ImplicitBooleanessChecker.base_classes_of_node
* [implicit-booleaness] Add call nodes name in warnings
* Use `BaseContainer` to check for empty tuple/list and use `as_string` for `Attribute` and `Name` nodes for message
Using `BaseContainer` for checking for empty `tuple` and `list`.
In addition, `is_base_container` checks for `FrozenSet` and `Set` as
well.
* Update test cases with cr concerns
* Use `BaseContainer` when checking for empty list or tuple
* Update `is_literal_tuple/list` to use `is_base_container`
* Use `as_string` when giving out function or variable name for message.
* Fix broken baseContainer test
* Use safe_infer for inferencing `target_instance`
* Swap opreators message
* Address CR comments; no more try/catch for infer & Add more test cases
* Add more test cases and changed few cases to cover more cases.
* Remove `try/catch` from `safe_infer` since `safe_infer` will return
`None` when it encounters exceptions.
* Comparison from infer to be more explicit; using `None` instead of
relying on `bool`
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
|
| |
|
|
|
|
| |
This closes #4021
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [types-toml](https://github.com/python/typeshed) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)
---
updated-dependencies:
- dependency-name: types-toml
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the requirements on [tbump](https://github.com/dmerejkowsky/tbump) to permit the latest version.
- [Release notes](https://github.com/dmerejkowsky/tbump/releases)
- [Changelog](https://github.com/dmerejkowsky/tbump/blob/main/Changelog.rst)
- [Commits](https://github.com/dmerejkowsky/tbump/compare/v6.4.1...v6.5.0)
---
updated-dependencies:
- dependency-name: tbump
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
|
| |
We only need the node because we can get the name from the node.
|
|
|
|
|
|
|
| |
* Add an exception for python < 3.6.2
See https://github.com/PyCQA/pylint/issues/5065 for reasoning
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
* Fix ``missing-function-docstring`` not checking ``__init__``
* Ignore ``object``
|
|
|
| |
* Merge ``MessagesHandlerMixIn`` into ``PyLinter``
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pyreverse - Add project modules to sys.path
- Use the fix_import_path context manager in the existing pyreverse
tests
- Style refactor:
- Use a constant for the path
- Move the constants closer to the top of the module
- Add a test for the fix_import_path context manager
to ensure the project root directory is in sys.path
- Prevent re-defining from outer scope
- Add a type-hint & docstrings
Closes #2479
|
|
|
|
|
|
|
|
|
|
|
| |
* From Python 3.8 onwards classes inheriting from dict are reversible
This generalises an earlier change to the bad-reversed-sequence
checker in Python 3.8 onwards: dicts were already being treated as
reversible, but so should any class inheriting from dict.
Fixes #4981
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
* detect duplicate-key for enum members
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
(#5158)
Closes #5140
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
| |
This closes #4136
|
| |
|
|
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|