Skip to content

Commit

Permalink
- Fixed using dict as type incorrectly considered as class requiring …
Browse files Browse the repository at this point in the history
…class_path.
  • Loading branch information
mauvilsa committed Feb 11, 2021
1 parent 723c841 commit 5b0fe90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ only be introduced in major versions with advance notice in the **Deprecated**
section of releases.


v3.X.X
------

Fixed
^^^^^
- Using dict as type incorrectly considered as class requiring class_path.


v3.4.1 (2021-02-03)
-------------------

Expand Down
3 changes: 3 additions & 0 deletions jsonargparse/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ def _typing_schema(annotation):
elif _issubclass(annotation, (str, int, float)):
return annotation_to_schema(annotation), None

elif annotation == dict:
return {'type': 'object'}, None

elif not hasattr(annotation, '__origin__'):
if annotation != inspect._empty:
schema = {
Expand Down

0 comments on commit 5b0fe90

Please sign in to comment.