autopep8 run

This commit is contained in:
Evgenii Alekseev 2021-03-15 02:27:42 +03:00
parent d3e79120cb
commit 663e822a92
47 changed files with 71 additions and 68 deletions

View File

@ -73,9 +73,11 @@ def update(args: argparse.Namespace) -> None:
update packages callback
:param args: command line args
'''
app = Application.from_args(args)
# typing workaround
log_fn = lambda line: print(line) if args.dry_run else app.logger.info(line)
def log_fn(line: str) -> None:
return print(line) if args.dry_run else app.logger.info(line)
app = Application.from_args(args)
packages = app.get_updates(args.package, args.no_aur, args.no_manual, args.no_vcs, log_fn)
if args.dry_run:
return
@ -128,7 +130,8 @@ if __name__ == '__main__':
update_parser = subparsers.add_parser('update', description='run updates')
update_parser.add_argument('package', help='filter check by packages', nargs='*')
update_parser.add_argument('--dry-run', help='just perform check for updates, same as check command', action='store_true')
update_parser.add_argument(
'--dry-run', help='just perform check for updates, same as check command', action='store_true')
update_parser.add_argument('--no-aur', help='do not check for AUR updates', action='store_true')
update_parser.add_argument('--no-manual', help='do not include manual updates', action='store_true')
update_parser.add_argument('--no-vcs', help='do not check VCS packages', action='store_true')

View File

@ -113,7 +113,7 @@ class Package:
return cls(package.base, package.version, aur_url, {package.name: os.path.basename(path)})
@classmethod
def from_aur(cls: Type[Package], name: str, aur_url: str)-> Package:
def from_aur(cls: Type[Package], name: str, aur_url: str) -> Package:
'''
construct package properties from AUR page
:param name: package name (either base or normal name)