Skip to content

cli

WithStateAttribute

Bases: Protocol

Protocol for classes that have a state attribute.

Source code in src/artificial_artwork/cli.py
13
14
15
16
class WithStateAttribute(t.Protocol):
    """Protocol for classes that have a state attribute."""

    state: t.Any

version_msg()

artificial_artwork CLI version, lib location and Python version.

Get message about artificial_artwork version, location and Python version.

Source code in src/artificial_artwork/cli.py
28
29
30
31
32
33
34
35
36
37
38
def version_msg():
    """artificial_artwork CLI version, lib location and Python version.

    Get message about artificial_artwork version, location
    and Python version.
    """
    # extract everything about version: major, minor, patch and build notes
    python_version = sys.version
    message = "Neural Style Transfer CLI %(version)s from {} (Python {})"
    location = os.path.dirname(this_file_location)
    return message.format(location, python_version)