diff options
author | Jaehoon Hwang <jaehoonhwang@users.noreply.github.com> | 2021-10-23 05:52:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-23 14:52:23 +0200 |
commit | 8b60e428457fb1125f61bd97296665aef53eefb8 (patch) | |
tree | 52d4cfa002f6177870296e4bba13890ec06ae6a3 /doc | |
parent | 772b3dcc0b0770a843653783e5c93b4256e5ec6f (diff) | |
download | pylint-git-8b60e428457fb1125f61bd97296665aef53eefb8.tar.gz |
Fix use-implicit-booleaness-not-comparison crash (#5176)
* 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>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions