mirror of https://github.com/scrapy/scrapy.git
Merge pull request #4572 from noviluni/add_missed_flake8_rules
Flake8: remove E306 and F523
This commit is contained in:
commit
cfe4bf7e50
|
|
@ -19,7 +19,7 @@ def _isiterable(possible_iterator):
|
|||
|
||||
|
||||
def _fname(f):
|
||||
return "%s.%s".format(
|
||||
return "{}.{}".format(
|
||||
f.__self__.__class__.__name__,
|
||||
f.__func__.__name__
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ def _embed_ipython_shell(namespace={}, banner=''):
|
|||
def _embed_bpython_shell(namespace={}, banner=''):
|
||||
"""Start a bpython shell"""
|
||||
import bpython
|
||||
|
||||
@wraps(_embed_bpython_shell)
|
||||
def wrapper(namespace=namespace, banner=''):
|
||||
bpython.embed(locals_=namespace, banner=banner)
|
||||
|
|
@ -37,6 +38,7 @@ def _embed_bpython_shell(namespace={}, banner=''):
|
|||
def _embed_ptpython_shell(namespace={}, banner=''):
|
||||
"""Start a ptpython shell"""
|
||||
import ptpython.repl
|
||||
|
||||
@wraps(_embed_ptpython_shell)
|
||||
def wrapper(namespace=namespace, banner=''):
|
||||
print(banner)
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ def memoizemethod_noargs(method):
|
|||
weak reference to its object
|
||||
"""
|
||||
cache = weakref.WeakKeyDictionary()
|
||||
|
||||
@wraps(method)
|
||||
def new_method(self, *args, **kwargs):
|
||||
if self not in cache:
|
||||
|
|
|
|||
Loading…
Reference in New Issue