mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Tip: style
This commit is contained in:
@@ -22,15 +22,13 @@ if len(argv) > 1:
|
||||
if len(args) == 1 and args[0] == "none":
|
||||
files = []
|
||||
print("! Skipping 'files' because it's set to 'none")
|
||||
else:
|
||||
if len(args) == 0:
|
||||
elif len(args) == 0:
|
||||
stdout.flush()
|
||||
raise (Exception("Glob patterns need to be provided as positional arguments or through envvar 'INPUT_FILES'!"))
|
||||
|
||||
else:
|
||||
for item in args:
|
||||
items = [fname for fname in glob(item, recursive=True) if not Path(fname).is_dir()]
|
||||
print(f" glob({item!s}):")
|
||||
for fname in items:
|
||||
for fname in [fname for fname in glob(item, recursive=True) if not Path(fname).is_dir()]:
|
||||
if Path(fname).stat().st_size == 0:
|
||||
print(f" - ! Skipping empty file {fname!s}")
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user