fix(ls): rename --quick to --quiet; add version command; bump to 1.3.14
- Fix ls -q long option name: --quick → --quiet (typo fix) - Remove mdrsclient/VERSION file; read version via importlib.metadata - Bump version 1.3.13 → 1.3.14 - Add Python 3.14 to supported classifiers; promote to Development Status 4 - Beta - Add `version` subcommand (prints "mdrs <version>") - Document `version` command in README Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from argparse import Namespace
|
||||
from typing import Any
|
||||
|
||||
from mdrsclient.__version__ import __version__
|
||||
from mdrsclient.commands.base import BaseCommand
|
||||
|
||||
|
||||
class VersionCommand(BaseCommand):
|
||||
@classmethod
|
||||
def register(cls, parsers: Any) -> None:
|
||||
version_parser = parsers.add_parser("version", help="show the version of this tool")
|
||||
version_parser.set_defaults(func=cls.func)
|
||||
|
||||
@classmethod
|
||||
def func(cls, args: Namespace) -> None:
|
||||
cls.version()
|
||||
|
||||
@classmethod
|
||||
def version(cls) -> None:
|
||||
print(f"mdrs {__version__}")
|
||||
Reference in New Issue
Block a user