Skip to content

Commit d24e955

Browse files
[pre-commit.ci] Auto fixes from pre-commit.com hooks.
1 parent 79e10f4 commit d24e955

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

games/game_stalker2heartofchornobyl.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ def __init__(self):
5656

5757
def resolve_path(self, path: str) -> str:
5858
path = path.replace("%USERPROFILE%", os.environ.get("USERPROFILE", ""))
59-
59+
6060
if "%GAME_DOCUMENTS%" in path:
6161
game_docs = self.GameDocumentsDirectory.replace("%USERPROFILE%", os.environ.get("USERPROFILE", ""))
6262
path = path.replace("%GAME_DOCUMENTS%", game_docs)
63-
63+
6464
if "%GAME_PATH%" in path:
6565
game_path = self._gamePath if hasattr(self, '_gamePath') else ""
6666
path = path.replace("%GAME_PATH%", game_path)
67-
67+
6868
return path
6969

7070
def init(self, organizer: mobase.IOrganizer) -> bool:
@@ -74,7 +74,7 @@ def init(self, organizer: mobase.IOrganizer) -> bool:
7474
BasicLocalSavegames(QDir(self.resolve_path(self.GameSavesDirectory)))
7575
)
7676
<<<<<<< HEAD
77-
77+
7878
=======
7979

8080
# Create the directory more reliably
@@ -93,7 +93,7 @@ def init(self, organizer: mobase.IOrganizer) -> bool:
9393
except Exception as e:
9494
<<<<<<< HEAD
9595
self._organizer.log(mobase.LogLevel.ERROR, f"Unexpected error creating mod directory: {e}")
96-
96+
9797
organizer.onUserInterfaceInitialized(self.init_tab)
9898
=======
9999
print(f"Error creating mod directory: {e}")
@@ -135,17 +135,17 @@ def init_tab(self, main_window: QMainWindow):
135135
def mappings(self) -> List[mobase.Mapping]:
136136
pak_extensions = ["*.pak", "*.utoc", "*.ucas"]
137137
target_dir = "Content/Paks/~mods/"
138-
138+
139139
mappings = []
140-
140+
141141
for ext in pak_extensions:
142142
mappings.append(mobase.Mapping(ext, target_dir, False))
143-
143+
144144
source_dirs = ["Paks/", "~mods/", "Content/Paks/~mods/"]
145145
for source_dir in source_dirs:
146146
for ext in pak_extensions:
147147
mappings.append(mobase.Mapping(f"{source_dir}{ext}", target_dir, False))
148-
148+
149149
return mappings
150150

151151
def gameDirectory(self) -> QDir:
@@ -155,23 +155,23 @@ def paksDirectory(self) -> QDir:
155155
<<<<<<< HEAD
156156
path = os.path.join(self.gameDirectory().absolutePath(), self.GameDataPath, "Content", "Paks")
157157
return QDir(path)
158-
158+
159159
def paksModsDirectory(self) -> QDir:
160160
try:
161161
path = os.path.join(self.paksDirectory().absolutePath(), "~mods")
162162
return QDir(path)
163163
except Exception as e:
164164
fallback = os.path.join(self.gameDirectory().absolutePath(), self.GameDataPath, "Content", "Paks", "~mods")
165165
return QDir(fallback)
166-
166+
167167
def logicModsDirectory(self) -> QDir:
168168
path = os.path.join(self.gameDirectory().absolutePath(), self.GameDataPath, "Content", "Paks", "LogicMods")
169169
return QDir(path)
170-
170+
171171
def binariesDirectory(self) -> QDir:
172172
path = os.path.join(self.gameDirectory().absolutePath(), self.GameDataPath, "Binaries", "Win64")
173173
return QDir(path)
174-
174+
175175
=======
176176
return QDir(self.gameDirectory().absolutePath() + "/Stalker2/Content/Paks")
177177

@@ -199,16 +199,16 @@ def activeProblems(self) -> list[int]:
199199
problems = set()
200200
if self._organizer.managedGame() == self:
201201
<<<<<<< HEAD
202-
202+
203203
mod_path = self.paksModsDirectory().absolutePath()
204204
if not os.path.isdir(mod_path):
205205
problems.add(Problems.MISSING_MOD_DIRECTORIES)
206206
self._organizer.log(mobase.LogLevel.DEBUG, f"Missing mod directory: {mod_path}")
207-
207+
208208
for mod in self._organizer.modList().allMods():
209209
mod_info = self._organizer.modList().getMod(mod)
210210
filetree = mod_info.fileTree()
211-
211+
212212
=======
213213
# More reliable directory check using os.path
214214
mod_path = self.paksModsDirectory().absolutePath()

games/stalker2heartofchornobyl/paks/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def dropMimeData(
204204
before_paks_p: list[_PakInfo] = []
205205
moved_paks_p: list[_PakInfo] = []
206206
after_paks_p: list[_PakInfo] = []
207-
207+
208208
for row, paks in sorted(self.paks.items()):
209209
if row < new_priority:
210210
if row in source_rows:

games/stalker2heartofchornobyl/paks/widget.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _parse_pak_files(self):
123123
pak_source: dict[str, str] = {}
124124
existing_folders: set[int] = set()
125125
<<<<<<< HEAD
126-
126+
127127
=======
128128

129129
print(f"[PAK Debug] Starting scan of {len(mods)} mods")
@@ -150,7 +150,7 @@ def _parse_pak_files(self):
150150
<<<<<<< HEAD
151151
except ValueError:
152152
pass
153-
153+
154154
=======
155155
print(
156156
f"[PAK Debug] Found existing numbered folder: {folder_num}"
@@ -230,7 +230,7 @@ def _parse_pak_files(self):
230230

231231
sorted_paks = dict(sorted(paks.items(), key=cmp_to_key(pak_sort)))
232232
shaken_paks: list[str] = self._shake_paks(sorted_paks)
233-
233+
234234
=======
235235
print(
236236
f"[PAK Debug] ✅ Added loose PAK from ~mods: {pak_name}"
@@ -263,7 +263,7 @@ def _parse_pak_files(self):
263263
while pak_index in existing_folders:
264264
pak_index -= 1
265265
<<<<<<< HEAD
266-
266+
267267
=======
268268

269269
# If PAK is already in a numbered folder, keep its current assignment
@@ -279,7 +279,7 @@ def _parse_pak_files(self):
279279

280280
final_paks[pak] = (pak_source[pak], pak_paths[pak][0], target_dir)
281281
<<<<<<< HEAD
282-
282+
283283
=======
284284

285285
# Convert to model format (4-tuple matching Oblivion Remastered)
@@ -291,7 +291,7 @@ def _parse_pak_files(self):
291291
new_data_paks[i] = (pak, source, current_path, target_path)
292292
i += 1
293293
<<<<<<< HEAD
294-
294+
295295
=======
296296

297297
print(f"[PAK Debug] Final PAK count: {len(new_data_paks)}")

0 commit comments

Comments
 (0)