@@ -38,7 +38,8 @@ class Requirements(nicfit.Command):
3838 NAME = "requirements"
3939 ALIASES = ["reqs" ]
4040
41- def _splitPkg (self , line ):
41+ @staticmethod
42+ def _splitPkg (line ):
4243 pkg , ver = line , None
4344 for c in ("=" , ">" , "<" ):
4445 i = line .find (c )
@@ -51,7 +52,7 @@ def _splitPkg(self, line):
5152 def _readReq (self , file ):
5253 reqs = {}
5354 file .seek (0 )
54- for line in [l .strip () for l in file .readlines ()
55+ for line in [l .strip () for l in file .readlines () # noqa E741
5556 if l .strip () and not l .startswith ("#" )]:
5657 pkg , version = self ._splitPkg (line )
5758 reqs [pkg ] = version
@@ -137,11 +138,12 @@ def _initArgParser(self, parser):
137138 help = "Merge command. Called with with 2 args: "
138139 "<src> <dest>" )
139140
140- def _findTemplateDir (self ):
141+ @staticmethod
142+ def _findTemplateDir ():
141143 template_d = None
142144 for p in [Path (__file__ ).parent / "cookiecutter" ,
143145 Path (__file__ ).parent .parent / "cookiecutter" ,
144- ]:
146+ ]:
145147 if p .exists ():
146148 template_d = p
147149 break
@@ -214,7 +216,7 @@ def _gitCloneRepo(self, repo_path):
214216 def _merge (self , cc_dir ):
215217 md5_hashes = {}
216218 if HASH_FILE .exists ():
217- for line in [l .strip () for l in HASH_FILE .read_text ().split ("\n " )]:
219+ for line in [l .strip () for l in HASH_FILE .read_text ().split ("\n " )]: # noqa E71
218220 if line :
219221 values = line .rsplit (":" , maxsplit = 1 )
220222 if len (values ) == 2 and values [0 ] and values [1 ]:
0 commit comments