Skip to content

Commit

Permalink
Codechange: blacken main.py with '-l 120' arg
Browse files Browse the repository at this point in the history
  • Loading branch information
andythenorth committed Feb 24, 2024
1 parent 9d74fe2 commit 6e276c6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions nml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ def parse_cli(argv):
"--no-extra-zoom", action="store_false", dest="allow_extra_zoom", help="Skip extra zoom alternative sprites"
)
opt_parser.add_option("--no-32bpp", action="store_false", dest="allow_32bpp", help="Skip 32bpp alternative sprites")
opt_parser.add_option("--no-palette-validation", action="store_true", dest="disable_palette_validation", help="Disable palette validation for sprites")
opt_parser.add_option(
"--no-palette-validation",
action="store_true",
dest="disable_palette_validation",
help="Disable palette validation for sprites",
)

opts, args = opt_parser.parse_args(argv)

Expand Down Expand Up @@ -538,7 +543,11 @@ def nml(
except IOError as ex:
raise generic.ImageError(str(ex), f)

if forced_palette != "ANY" and pal != forced_palette and not (forced_palette == "DEFAULT" and pal == "LEGACY"):
if (
forced_palette != "ANY"
and pal != forced_palette
and not (forced_palette == "DEFAULT" and pal == "LEGACY")
):
raise generic.ImageError(
"Image has '{}' palette, but you forced the '{}' palette".format(pal, used_palette), f
)
Expand All @@ -550,7 +559,8 @@ def nml(
used_palette = "DEFAULT"
else:
raise generic.ImageError(
"Image has '{}' palette, but \"{}\" has the '{}' palette".format(pal, last_file, used_palette), f
"Image has '{}' palette, but \"{}\" has the '{}' palette".format(pal, last_file, used_palette),
f,
)
last_file = f

Expand Down

0 comments on commit 6e276c6

Please sign in to comment.