Coverage for csaf/env.py: 38.46%
13 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-18 20:12:48 +00:00
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-18 20:12:48 +00:00
1"""Report environment to support resolution of user issues."""
3from typing import List, no_type_check
5import importlib.metadata
6import scooby
9@no_type_check
10def report() -> str:
11 """Return either text options for the user to report her env or the report of the environment for support."""
12 import langcodes # noqa
14 langcodes.__version__ = importlib.metadata.version('langcodes')
16 class Report(scooby.Report):
17 def __init__(self, additional=None, ncol=3, text_width=80, sort=False):
18 """Initiate a scooby.Report instance."""
20 # Mandatory packages.
21 core = [
22 'csaf',
23 'jmespath',
24 'langcodes',
25 'lazr.uri',
26 'msgspec',
27 'pydantic',
28 'scooby',
29 'setuptools',
30 'typer',
31 ]
33 # Optional packages.
34 optional: List[str] = []
36 scooby.Report.__init__(
37 self, additional=additional, core=core, optional=optional, ncol=ncol, text_width=text_width, sort=sort
38 )
40 return str(Report()) + '\n'