from getmyancestors.classes.tree import Tree
-def main():
+def main() -> int:
parser = argparse.ArgumentParser(
description="Retrieve GEDCOM data from FamilySearch Tree (4 Jul 2016)",
add_help=False,
# Report settings used when getmyancestors is executed
if args.save_settings and args.outfile.name != "<stdout>":
- def parse_action(act):
+ def parse_action(act) -> str:
if not args.show_password and act.dest == "password":
return "******"
value = getattr(args, act.dest)
# initialize a FamilySearch session and a family tree object
print("Login to FamilySearch...", file=sys.stderr)
- fs = Session(
+ fs = Session( # type: ignore
args.username,
args.password,
args.client_id,
if not fs.logged:
sys.exit(2)
_ = fs._
- tree = Tree(fs)
+ tree: Tree = Tree(fs) # type: ignore
# check LDS account
if args.get_ordinances:
file=sys.stderr,
)
+ return 0
+
if __name__ == "__main__":
main()
[mypy]
show_error_codes = True
+no_warn_no_return = True
;show_error_context = True
;pretty = True
warn_unused_configs = True
warn_incomplete_stub = True
-# Our tests, they don't return a value typically
+# 3rd party packages missing types
+[mypy-babelfish,diskcache]
+ignore_missing_imports = True