From e7a3dd4d2046aa17043fc257b5d09ccedecf7c94 Mon Sep 17 00:00:00 2001 From: jorwoods Date: Thu, 17 Feb 2022 15:45:00 -0600 Subject: [PATCH] Remove type tagging of command line arguments (#3) --- MANIFEST.in | 4 +++- setup.cfg | 6 +++++- src/argsubparse/argsubparse.py | 2 -- src/py.typed | 0 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 src/py.typed diff --git a/MANIFEST.in b/MANIFEST.in index a49b6be..f4fc9a5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ recursive-include src *.py -include README.md \ No newline at end of file +include README.md +global-include *.typed +global-include *.pyi \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index c5fd4f5..2089ec1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = argsubparse -version = 0.0.7 +version = 0.0.8 author = Jordan Woods author_email = jor.e.woods@gmail.com description = Dynamically build argparse subparsers @@ -20,5 +20,9 @@ package_dir = packages = find: python_requires = >=3.6 +[options.package_data] +argsubparse = + py.typed + [options.packages.find] where = src \ No newline at end of file diff --git a/src/argsubparse/argsubparse.py b/src/argsubparse/argsubparse.py index 0cc58c6..878e212 100644 --- a/src/argsubparse/argsubparse.py +++ b/src/argsubparse/argsubparse.py @@ -80,8 +80,6 @@ def create_subparser( short_option = f"-{short_option}" arg_name = (short_option, f"--{k}") - if v.annotation is not inspect._empty: - arg_params["type"] = v.annotation function_parser.add_argument(*arg_name, **arg_params) usage = [parser.usage, func.__doc__] diff --git a/src/py.typed b/src/py.typed new file mode 100644 index 0000000..e69de29