Coverage for sparkle/CLI/about.py: 73%
11 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-05 14:48 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-05 14:48 +0000
1#!/usr/bin/env python3
2"""Sparkle command to show information about Sparkle."""
3import sys
4import argparse
5import sparkle
8def parser_function() -> argparse.ArgumentParser:
9 """Define the command line arguments.
11 Returns:
12 The argument parser.
13 """
14 parser = argparse.ArgumentParser("Show information about Sparkle.")
15 return parser
18def main(argv: list[str]) -> None:
19 """Main function of the command."""
20 print("\n".join([
21 f"Sparkle ({sparkle.about.description})",
22 f"Version: {sparkle.about.version}",
23 f"Licence: {sparkle.about.licence}",
24 f'Written by {", ".join(sparkle.about.authors[:-1])},\
25 and {sparkle.about.authors[-1]}',
26 f"Contact: {sparkle.about.contact}",
27 "For more details see README.md"]))
28 sys.exit()
31if __name__ == "__main__":
32 main(sys.argv[1:])