StrictDoc Documentation
strictdoc/commands/version_command.py
Source file coverage
Path:
strictdoc/commands/version_command.py
Lines:
27
Non-empty lines:
19
Non-empty lines covered with requirements:
19 / 19 (100.0%)
Functions:
4
Functions covered by requirements:
4 / 4 (100.0%)
1
"""
2
@relation(SDOC-SRS-163, scope=file)
3
"""
4
 
5
import argparse
6
 
7
import strictdoc
8
from strictdoc.cli.base_command import BaseCommand
9
from strictdoc.helpers.parallelizer import Parallelizer
10
from strictdoc.helpers.timing import SimpleNominalExit
11
 
12
 
13
class VersionCommand(BaseCommand):
14
    HELP = "Print the version of StrictDoc."
15
    DETAILED_HELP = HELP
16
 
17
    @classmethod
18
    def add_arguments(cls, parser: argparse.ArgumentParser) -> None:
19
        pass
20
 
21
    def __init__(self, args: argparse.Namespace) -> None:
22
        self.args = args
23
 
24
    def run(self, parallelizer: Parallelizer) -> None:  # noqa: ARG002
25
        print(strictdoc.__version__)  # noqa: T201
26
 
27
        raise SimpleNominalExit