File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1919 - run : python --version ; pip --version ; pwd ; ls -l
2020 - run : pip install black codespell ruff
2121 - run : codespell -L queenland,uint,assertin
22- - run : ruff .
22+ - run : ruff check
2323 - run : black . --check
2424
2525
Original file line number Diff line number Diff line change 99import sys
1010
1111UNIT_LOOKUP = dict ()
12- for entry in pkgutil .get_data ("sc2reader.data" , "unit_lookup.csv" ).split ( " \n " ):
12+ for entry in pkgutil .get_data ("sc2reader.data" , "unit_lookup.csv" ).splitlines ( ):
1313 if not entry :
1414 continue
1515 str_id , title = entry .strip ().split ("," )
2525print ("" )
2626
2727ABIL_LOOKUP = dict ()
28- for entry in pkgutil .get_data ("sc2reader.data" , "ability_lookup.csv" ).split ( " \n " ):
28+ for entry in pkgutil .get_data ("sc2reader.data" , "ability_lookup.csv" ).splitlines ( ):
2929 if not entry :
3030 continue
3131 str_id , abilities = entry .split ("," , 1 )
Original file line number Diff line number Diff line change 1515
1616ABIL_LOOKUP = dict ()
1717for entry in (
18- pkgutil .get_data ("sc2reader.data" , "ability_lookup.csv" ).decode ("utf8" ).split ( " \n " )
18+ pkgutil .get_data ("sc2reader.data" , "ability_lookup.csv" ).decode ("utf8" ).splitlines ( )
1919):
2020 if not entry :
2121 continue
2424
2525UNIT_LOOKUP = dict ()
2626for entry in (
27- pkgutil .get_data ("sc2reader.data" , "unit_lookup.csv" ).decode ("utf8" ).split ( " \n " )
27+ pkgutil .get_data ("sc2reader.data" , "unit_lookup.csv" ).decode ("utf8" ).splitlines ( )
2828):
2929 if not entry :
3030 continue
@@ -401,7 +401,7 @@ def load_build(expansion, version):
401401
402402 unit_file = f"{ expansion } /{ version } _units.csv"
403403 for entry in (
404- pkgutil .get_data ("sc2reader.data" , unit_file ).decode ("utf8" ).split ( " \n " )
404+ pkgutil .get_data ("sc2reader.data" , unit_file ).decode ("utf8" ).splitlines ( )
405405 ):
406406 if not entry :
407407 continue
@@ -421,7 +421,7 @@ def load_build(expansion, version):
421421 abil_file = f"{ expansion } /{ version } _abilities.csv"
422422 build .add_ability (ability_id = 0 , name = "RightClick" , title = "Right Click" )
423423 for entry in (
424- pkgutil .get_data ("sc2reader.data" , abil_file ).decode ("utf8" ).split ( " \n " )
424+ pkgutil .get_data ("sc2reader.data" , abil_file ).decode ("utf8" ).splitlines ( )
425425 ):
426426 if not entry :
427427 continue
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def lineup(self):
4848 return "" .join (sorted (p .play_race [0 ].upper () for p in self .players ))
4949
5050 @property
51- def hash (self ):
51+ def hash (self ): # noqa: F811
5252 raw_hash = "," .join (sorted (p .url for p in self .players ))
5353 return hashlib .sha256 (raw_hash ).hexdigest ()
5454
You can’t perform that action at this time.
0 commit comments