Make ruff happier
This commit is contained in:
parent
9d4b229b44
commit
fb81e2bd1f
1 changed files with 4 additions and 4 deletions
|
|
@ -33,8 +33,8 @@ class Mod:
|
||||||
def __init__(self, path: str) -> None:
|
def __init__(self, path: str) -> None:
|
||||||
self.__path = path
|
self.__path = path
|
||||||
|
|
||||||
with open(path + "config.toml") as configFile:
|
with open(path + "config.toml") as config_file:
|
||||||
self.__config = tomlkit.load(configFile)
|
self.__config = tomlkit.load(config_file)
|
||||||
|
|
||||||
if "enabled" not in self.__config:
|
if "enabled" not in self.__config:
|
||||||
raise InvalidModError("config.toml does not contain the enabled key")
|
raise InvalidModError("config.toml does not contain the enabled key")
|
||||||
|
|
@ -47,9 +47,9 @@ class Mod:
|
||||||
# Nothing to do
|
# Nothing to do
|
||||||
return
|
return
|
||||||
|
|
||||||
with open(self.__path + "config.toml", "w") as configFile:
|
with open(self.__path + "config.toml", "w") as config_file:
|
||||||
self.__config["enabled"] = value
|
self.__config["enabled"] = value
|
||||||
tomlkit.dump(self.__config, configFile)
|
tomlkit.dump(self.__config, config_file)
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"Mod({self.__path})"
|
return f"Mod({self.__path})"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue