Rename to Format.fromargs().

This commit is contained in:
Chris Berkhout 2021-05-28 18:15:56 +02:00
parent c1c2ab39c2
commit 52bfe6928f
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ def cli(args=None, output_file=sys.stdout):
start=args.start or source.start(),
end=args.end,
)
fmt = Format.generate(args)
fmt = Format.fromargs(args)
result = fetch(series, source, output, args.invert, args.quantize, fmt)
print(result, end="", file=output_file)
else:

View file

@ -12,7 +12,7 @@ class Format:
datesep: str = "-"
@classmethod
def generate(cls, args):
def fromargs(cls, args):
def if_not_none(value, default):
return default if value is None else value