Blacken the code base.
This commit is contained in:
parent
d585c1529d
commit
07d079f204
19 changed files with 138 additions and 168 deletions
24
dcc/ls.py
24
dcc/ls.py
|
|
@ -12,16 +12,13 @@ class List(dcc.config.ListerBase):
|
|||
match parsed_args.target:
|
||||
case "pwads":
|
||||
return (
|
||||
("pwads",), sorted(
|
||||
(x.name,) for x in os.scandir(self.pwads) if x.is_dir()
|
||||
)
|
||||
("pwads",),
|
||||
sorted((x.name,) for x in os.scandir(self.pwads) if x.is_dir()),
|
||||
)
|
||||
case "iwads":
|
||||
return (
|
||||
("iwads",), sorted(
|
||||
(x.name,) for x in
|
||||
os.scandir(self.iwads) if x.is_file()
|
||||
)
|
||||
("iwads",),
|
||||
sorted((x.name,) for x in os.scandir(self.iwads) if x.is_file()),
|
||||
)
|
||||
case _:
|
||||
raise Exception(f"unknown target {parsed_args.target}")
|
||||
|
|
@ -35,11 +32,12 @@ class WadList(dcc.config.ListerBase):
|
|||
|
||||
def _get_results(self, name, base, wad, ext):
|
||||
return (
|
||||
(name,), sorted(
|
||||
(x.name,) for x in
|
||||
os.scandir(base.joinpath(wad))
|
||||
(name,),
|
||||
sorted(
|
||||
(x.name,)
|
||||
for x in os.scandir(base.joinpath(wad))
|
||||
if x.name.endswith(ext)
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -50,6 +48,4 @@ class ListDemos(WadList):
|
|||
|
||||
class ListVideos(WadList):
|
||||
def take_action(self, parsed_args):
|
||||
return self._get_results(
|
||||
"videos", self.fabricate, parsed_args.wad, ".mp4"
|
||||
)
|
||||
return self._get_results("videos", self.fabricate, parsed_args.wad, ".mp4")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue