From f694205de59d3cde719552c5e563f3ffbdf53c32 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Sat, 19 Mar 2022 21:33:32 -0700 Subject: [PATCH] Make linters happy This is theoretically a non-functional change --- games/game_blackandwhite2.py | 10 +++++----- games/game_masterduel.py | 23 ++++++++++++++++------- games/game_valkyriachronicles.py | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/games/game_blackandwhite2.py b/games/game_blackandwhite2.py index 8f48f9f..c1e6b47 100644 --- a/games/game_blackandwhite2.py +++ b/games/game_blackandwhite2.py @@ -249,12 +249,12 @@ def getPreview(save): save = BlackAndWhite2SaveGame(save) lines = [ [ - (u"Name : " + save.getName(), Qt.AlignLeft), - (u"| Profile : " + save.getSaveGroupIdentifier()[1:], Qt.AlignLeft), + ("Name : " + save.getName(), Qt.AlignLeft), + ("| Profile : " + save.getSaveGroupIdentifier()[1:], Qt.AlignLeft), ], - [(u"Land number : " + save.getLand(), Qt.AlignLeft)], - [(u"Saved at : " + save.getCreationTime().toString(), Qt.AlignLeft)], - [(u"Elapsed time : " + save.getElapsed(), Qt.AlignLeft)], + [("Land number : " + save.getLand(), Qt.AlignLeft)], + [("Saved at : " + save.getCreationTime().toString(), Qt.AlignLeft)], + [("Elapsed time : " + save.getElapsed(), Qt.AlignLeft)], ] pixmap = QPixmap(320, 320) diff --git a/games/game_masterduel.py b/games/game_masterduel.py index 5c65679..cb7c381 100644 --- a/games/game_masterduel.py +++ b/games/game_masterduel.py @@ -8,12 +8,16 @@ import mobase from ..basic_game import BasicGame + class MasterDuelGame(BasicGame, mobase.IPluginFileMapper): Name = "Yu-Gi-Oh! Master Duel Support Plugin" Author = "The Conceptionist & uwx" Version = "1.0.2" - Description = "Adds support for basic Yu-Gi-Oh! Master Duel mods.\nEligible folders for mods are \"0000\" and \"AssetBundle\"." + Description = ( + "Adds support for basic Yu-Gi-Oh! Master Duel mods.\n" + 'Eligible folders for mods are "0000" and "AssetBundle".' + ) GameName = "Yu-Gi-Oh! Master Duel" GameShortName = "masterduel" @@ -34,22 +38,25 @@ class MasterDuelGame(BasicGame, mobase.IPluginFileMapper): ).withArgument("-popupwindow"), ] - # dataDirectory returns the specific LocalData folder because this is where most mods will go to + # dataDirectory returns the specific LocalData folder because + # this is where most mods will go to def dataDirectory(self) -> QDir: return QDir(self.userDataDir()) _userDataDirCached: Optional[str] = None - # Gets the LocalData/xxxxxxxxx directory. This directory has a different, unique, 8-character hex name for each - # user. + # Gets the LocalData/xxxxxxxxx directory. This directory has a different, + # unique, 8-character hex name for each user. def userDataDir(self) -> str: if self._userDataDirCached is not None: return self._userDataDirCached dir = self.gameDirectory() - dir.cd('LocalData') + dir.cd("LocalData") - subdirs = dir.entryList(filters=cast(QDir.Filters, QDir.Dirs | QDir.NoDotAndDotDot)) + subdirs = dir.entryList( + filters=cast(QDir.Filters, QDir.Dirs | QDir.NoDotAndDotDot) + ) dir.cd(subdirs[0]) self._userDataDirCached = dir.absolutePath() @@ -66,7 +73,9 @@ class MasterDuelGame(BasicGame, mobase.IPluginFileMapper): m.createTarget = False m.isDirectory = True m.source = join(modsPath, modName, "AssetBundle") - m.destination = self.gameDirectory().filePath(join("masterduel_Data", "StreamingAssets", "AssetBundle")) + m.destination = self.gameDirectory().filePath( + join("masterduel_Data", "StreamingAssets", "AssetBundle") + ) mappings.append(m) return mappings diff --git a/games/game_valkyriachronicles.py b/games/game_valkyriachronicles.py index feb3fd2..d208de6 100644 --- a/games/game_valkyriachronicles.py +++ b/games/game_valkyriachronicles.py @@ -1,6 +1,6 @@ -from PyQt5.QtCore import QDir from ..basic_game import BasicGame + class ValkyriaChroniclesGame(BasicGame): Name = "Valkyria Chronicles Support Plugin" Author = "Ketsuban"