mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-28 15:10:36 +00:00
fix setuptools_scm argparse usage
This commit is contained in:
parent
4284f65f7f
commit
12b6e10737
@ -6,11 +6,14 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from importlib_metadata import PackageNotFoundError
|
||||||
|
from importlib_metadata import version
|
||||||
|
|
||||||
import dockertidy.Exception
|
import dockertidy.Exception
|
||||||
|
from dockertidy import __version__
|
||||||
from dockertidy.Config import SingleConfig
|
from dockertidy.Config import SingleConfig
|
||||||
from dockertidy.Utils import SingleLog
|
from dockertidy.Utils import SingleLog
|
||||||
from dockertidy.Utils import timedelta_type
|
from dockertidy.Utils import timedelta_type
|
||||||
from importlib_metadata import version, PackageNotFoundError
|
|
||||||
|
|
||||||
|
|
||||||
class DockerTidy:
|
class DockerTidy:
|
||||||
@ -34,7 +37,7 @@ class DockerTidy:
|
|||||||
parser.add_argument("-q", dest="logging.level", action="append_const",
|
parser.add_argument("-q", dest="logging.level", action="append_const",
|
||||||
const=1, help="decrease log level")
|
const=1, help="decrease log level")
|
||||||
parser.add_argument("--version", action="version",
|
parser.add_argument("--version", action="version",
|
||||||
version=version(__name__))
|
version="%(prog)s {}".format(__version__))
|
||||||
|
|
||||||
subparsers = parser.add_subparsers(help="sub-command help")
|
subparsers = parser.add_subparsers(help="sub-command help")
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
"""Default package."""
|
"""Default package."""
|
||||||
|
from importlib_metadata import PackageNotFoundError
|
||||||
|
from importlib_metadata import version
|
||||||
|
|
||||||
__author__ = "Robert Kaussow"
|
__author__ = "Robert Kaussow"
|
||||||
__project__ = "docker-tidy"
|
__project__ = "docker-tidy"
|
||||||
@ -6,3 +8,4 @@ __license__ = "Apache-2.0"
|
|||||||
__maintainer__ = "Robert Kaussow"
|
__maintainer__ = "Robert Kaussow"
|
||||||
__email__ = "mail@geeklabor.de"
|
__email__ = "mail@geeklabor.de"
|
||||||
__url__ = "https://github.com/xoxys/docker-tidy"
|
__url__ = "https://github.com/xoxys/docker-tidy"
|
||||||
|
__version__ = version("docker-tidy")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
import docker.errors
|
import docker.errors
|
||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
from docker_custodian import docker_gc
|
from docker_custodian import docker_gc
|
||||||
from io import StringIO
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
Loading…
Reference in New Issue
Block a user