Refactor unnecessary else / elif when if block has a return statement (#485)

This commit is contained in:
0xMRTT 2022-09-23 18:54:26 +02:00 committed by GitHub
commit 7e0386bf2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,7 +194,6 @@ class FirefoxGnomeThemePlugin(IPlugin):
if len(profiles) == 0: if len(profiles) == 0:
print("No profiles found") print("No profiles found")
return return
else:
self.css = self.css.format( self.css = self.css.format(
d_1=self.palette["dark_"]["1"], d_1=self.palette["dark_"]["1"],
d_2=self.palette["dark_"]["2"], d_2=self.palette["dark_"]["2"],
@ -224,9 +223,7 @@ class FirefoxGnomeThemePlugin(IPlugin):
b_blk=self.palette["dark_"]["1"], b_blk=self.palette["dark_"]["1"],
) )
for profile in profiles: for profile in profiles:
profile = ( profile = profile / "chrome" / "firefox-gnome-theme" / "customChrome.css"
profile / "chrome" / "firefox-gnome-theme" / "customChrome.css"
)
if profile.exists(): if profile.exists():
if self.custom_settings["overwrite"]: if self.custom_settings["overwrite"]:
with open(profile, "w", encoding="utf-8") as f: with open(profile, "w", encoding="utf-8") as f: