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