impose-cli 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: impose-cli
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Create a CLI tool easily.
5
5
  Home-page: UNKNOWN
6
6
  Author: scdev
@@ -1,11 +1,12 @@
1
1
  import os
2
2
  import inspect
3
3
  import builtins
4
+ import astor
4
5
  import click
5
6
  from .errors import InterfaceNotImplementedError
6
7
  from docstring_parser import parse as docparse
7
8
  from inspect import signature as sig
8
- from ast import parse, FunctionDef, Import, ImportFrom, unparse
9
+ from ast import parse, FunctionDef, Import, ImportFrom
9
10
  from importlib.util import spec_from_file_location, module_from_spec
10
11
  from os.path import dirname, join, exists, abspath, splitext, basename, relpath
11
12
  from . import decorators as imposedecorators
@@ -85,7 +86,7 @@ def parse_nodes(entry: str, target: str):
85
86
  for arg in arg_list:
86
87
  parameter_meta[arg.arg] = {}
87
88
  if hasattr(arg, "annotation") and getattr(arg, "annotation") is not None:
88
- parameter_meta[arg.arg]["type"] = unparse(getattr(arg, "annotation"))
89
+ parameter_meta[arg.arg]["type"] = astor.to_source(getattr(arg, "annotation")).strip()
89
90
  else:
90
91
  parameter_meta[arg.arg]["type"] = "Any"
91
92
  parameter_settings = sig(getattr(module, node.name)).parameters.get(arg.arg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: impose-cli
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Create a CLI tool easily.
5
5
  Home-page: UNKNOWN
6
6
  Author: scdev
@@ -1,2 +1,3 @@
1
1
  click
2
2
  docstring-parser
3
+ astor
@@ -9,7 +9,7 @@ DESCRIPTION = 'Create a CLI tool easily.'
9
9
  # Setting up
10
10
  setup(
11
11
  name="impose-cli",
12
- version='0.3.2',
12
+ version='0.3.3',
13
13
  author="scdev",
14
14
  author_email="samuel.chai.development@gmail.com",
15
15
  description=DESCRIPTION,
File without changes
File without changes
File without changes
File without changes
File without changes