File tree Expand file tree Collapse file tree
games/stalker2heartofchornobyl/paks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,14 +40,16 @@ def _init_mod_states(self):
4040 paks_txt = QFileInfo (profile .absoluteFilePath ("stalker2_paks.txt" ))
4141 if paks_txt .exists ():
4242 try :
43- with open (paks_txt .absoluteFilePath (), "r" , encoding = "utf-8" ) as paks_file :
43+ with open (
44+ paks_txt .absoluteFilePath (), "r" , encoding = "utf-8"
45+ ) as paks_file :
4446 index = 0
4547 for line in paks_file :
4648 stripped_line = line .strip ()
4749 if stripped_line :
4850 self .paks [index ] = (stripped_line , "" , "" , "" )
4951 index += 1
50- except (IOError , OSError ) as e :
52+ except (IOError , OSError ):
5153 pass
5254
5355 def set_paks (self , paks : dict [int , _PakInfo ]):
Original file line number Diff line number Diff line change 1- import os
21from functools import cmp_to_key
32from pathlib import Path
43from typing import cast
@@ -50,7 +49,9 @@ def load_paks_list(self) -> list[str]:
5049 paks_list : list [str ] = []
5150 if paks_txt .exists ():
5251 try :
53- with open (paks_txt .absoluteFilePath (), "r" , encoding = "utf-8" ) as paks_file :
52+ with open (
53+ paks_txt .absoluteFilePath (), "r" , encoding = "utf-8"
54+ ) as paks_file :
5455 for line in paks_file :
5556 stripped_line = line .strip ()
5657 if stripped_line :
@@ -151,9 +152,8 @@ def _parse_pak_files(self):
151152 continue
152153 filetree = mod_item .fileTree ()
153154
154- has_logicmods = (
155- filetree .find ("Content/Paks/LogicMods" )
156- or filetree .find ("Paks/LogicMods" )
155+ has_logicmods = filetree .find ("Content/Paks/LogicMods" ) or filetree .find (
156+ "Paks/LogicMods"
157157 )
158158 if isinstance (has_logicmods , mobase .IFileTree ):
159159 continue
@@ -176,9 +176,9 @@ def _parse_pak_files(self):
176176 pak_paths [pak_name ] = (
177177 mod_item .absolutePath ()
178178 + "/"
179- + cast (
180- mobase . IFileTree , sub_entry . parent ()
181- ). path ( "/" ) ,
179+ + cast (mobase . IFileTree , sub_entry . parent ()). path (
180+ "/"
181+ ),
182182 mod_item .absolutePath () + "/" + pak_mods .path ("/" ),
183183 )
184184 pak_source [pak_name ] = mod_item .name ()
You can’t perform that action at this time.
0 commit comments