Skip to content

Commit

Permalink
The base Field class is now exposed at package level.
Browse files Browse the repository at this point in the history
Fields can now be equipped with converters by using `field(converters=...)`. Fixes #5

Validation and Conversion-related code moved to a separate dedicated module.

Fixed a number of inspection warnings in code.
  • Loading branch information
Sylvain MARIE committed Oct 10, 2019
1 parent cf327ff commit dd893f3
Show file tree
Hide file tree
Showing 4 changed files with 712 additions and 240 deletions.
8 changes: 5 additions & 3 deletions pyfields/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .core import field, MandatoryFieldInitError, UnsupportedOnNativeFieldError
from .core import field, Field, MandatoryFieldInitError, UnsupportedOnNativeFieldError
from .validate_n_convert import Converter
from .init_makers import inject_fields, make_init, init_fields
from .helpers import copy_value, copy_field, copy_attr

Expand All @@ -14,9 +15,10 @@
__all__ = [
'__version__',
# submodules
'core', 'init_makers',
'core', 'validate_n_convert', 'init_makers', 'helpers',
# symbols
'field', 'MandatoryFieldInitError', 'UnsupportedOnNativeFieldError',
'field', 'Field', 'MandatoryFieldInitError', 'UnsupportedOnNativeFieldError',
'Converter',
'inject_fields', 'make_init', 'init_fields',
'copy_value', 'copy_field', 'copy_attr'
]
Loading

0 comments on commit dd893f3

Please sign in to comment.