Skip to content

Commit

Permalink
Fix TypeError when converting non-builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Aug 25, 2019
1 parent c8ceacd commit d60304d
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 78 deletions.
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@
"python.linting.pylintArgs": ["--rcfile", ".pylint.ini"],
"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": ["--config-file", ".mypy.ini"],
"python.linting.pydocstyleEnabled": true
"python.linting.pydocstyleEnabled": true,
"python.formatting.provider": "black",
"python.formatting.blackPath": ".venv/bin/black",
"cSpell.words": [
"backends",
"dataclass",
"dataclasses",
"datafile",
"datafiles"
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.4.1 (2019-08-25)

- Fixed a `TypeError` when converting non-builtin attributes.

# 0.4 (2019-06-29)

- Fixed ORM methods for datafiles with relative path patterns.
Expand Down
2 changes: 1 addition & 1 deletion datafiles/converters/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def to_python_value(cls, deserialized_data, *, target_object):

for name, converter in cls.CONVERTERS.items():
if name not in data:
data[name] = converter.to_python_value(None)
data[name] = converter.to_python_value(None, target_object=None)

new_value = cls.DATACLASS(**data) # pylint: disable=not-callable

Expand Down
Loading

0 comments on commit d60304d

Please sign in to comment.