mirror of https://github.com/scrapy/scrapy.git
pylint: disable use-implicit-booleaness-not-comparison
This commit is contained in:
parent
89fb1b38f7
commit
ecddb1c55c
|
|
@ -230,6 +230,7 @@ disable = [
|
|||
"undefined-variable",
|
||||
"unused-argument",
|
||||
"unused-variable",
|
||||
"use-implicit-booleaness-not-comparison",
|
||||
"useless-import-alias", # used as a hint to mypy
|
||||
"useless-return", # https://github.com/pylint-dev/pylint/issues/6530
|
||||
"wrong-import-position",
|
||||
|
|
|
|||
|
|
@ -102,9 +102,7 @@ class KeywordArgumentsSpider(MockServerSpider):
|
|||
self.checks.append(kwargs["callback"] == "some_callback")
|
||||
self.crawler.stats.inc_value("boolean_checks", 3)
|
||||
elif response.url.endswith("/general_without"):
|
||||
self.checks.append(
|
||||
kwargs == {} # pylint: disable=use-implicit-booleaness-not-comparison
|
||||
)
|
||||
self.checks.append(kwargs == {})
|
||||
self.crawler.stats.inc_value("boolean_checks")
|
||||
|
||||
def parse_no_kwargs(self, response):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# pylint: disable=unsubscriptable-object,unsupported-membership-test,use-implicit-booleaness-not-comparison
|
||||
# pylint: disable=unsubscriptable-object,unsupported-membership-test
|
||||
# (too many false positives)
|
||||
|
||||
import logging
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class TestSpider:
|
|||
def test_base_spider(self):
|
||||
spider = self.spider_class("example.com")
|
||||
assert spider.name == "example.com"
|
||||
assert spider.start_urls == [] # pylint: disable=use-implicit-booleaness-not-comparison
|
||||
assert spider.start_urls == []
|
||||
|
||||
def test_spider_args(self):
|
||||
"""``__init__`` method arguments are assigned to spider attributes"""
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ def test_get_func_args():
|
|||
assert get_func_args(partial_f2) == ["a", "c"]
|
||||
assert get_func_args(partial_f3) == ["c"]
|
||||
assert get_func_args(cal) == ["a", "b", "c"]
|
||||
assert get_func_args(object) == [] # pylint: disable=use-implicit-booleaness-not-comparison
|
||||
assert get_func_args(object) == []
|
||||
assert get_func_args(str.split, stripself=True) == ["sep", "maxsplit"]
|
||||
assert get_func_args(" ".join, stripself=True) == ["iterable"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue