(name, thing)
| 51 | |
| 52 | |
| 53 | def get_value_data(name, thing): |
| 54 | results = { |
| 55 | 'name': name, |
| 56 | 'typeName': type(thing).__name__, |
| 57 | 'typeModule': type(thing).__module__, |
| 58 | 'isClass': isclass(thing), |
| 59 | 'isCallable': callable(thing), |
| 60 | 'isModule': ismodule(thing), |
| 61 | 'doc': thing.__doc__, |
| 62 | 'shortDoc': short_doc(thing.__doc__), |
| 63 | } |
| 64 | |
| 65 | if callable(thing): |
| 66 | params = None |
| 67 | try: |
| 68 | if isclass(thing): |
| 69 | params = get_method_params(thing.__init__) |
| 70 | else: |
| 71 | params = get_func_params(thing) |
| 72 | except ValueError: |
| 73 | # print('No Signature for ', str(thing)) |
| 74 | pass |
| 75 | |
| 76 | if params is not None: |
| 77 | results['parameters'] = params |
| 78 | |
| 79 | return results |
| 80 | |
| 81 | def get_type_data(typething, overrides): |
| 82 | if len(overrides) != 0: |
no test coverage detected