-
Notifications
You must be signed in to change notification settings - Fork 5
/
TODO
62 lines (45 loc) · 1.5 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@register()
===========
- provide __repr__?
- provide __dir__?
- should we raise exception if config class has key starting with "_"
instead of skipping it?
- provide some kind of isinstance() check for @register()ed classes?
- should we check class is not instantiated?
- should we avoid instantiation in metaclass_wrapper
(exception from __init__)?
parse()
=======
- provide some way to also parse a dict object
- should we rollback() and reset _conf_map on validation error?
- should parse() return get_parsed_conf()?
- add _after_parse callback? (it's gonna be a class method)
- add 'transformer' callable to schema?
should it be executed before or after validate?
should it be executed for the default value as well (probably not)?
parse_with_envvars()
====================
- not happy with `case_sensitive` arg
schema()
========
- add 'nullable' parameter and raise exc if overridden arg is an empty str or
None?
- schema: figure out what do in case no default value is specified
- move running of validation into schema (validate() method)
validators
==========
- isurl() validator does not check IPv4 octects are <= 255
Generic
=======
- provde a way to pass (and parse) a dict object?
Tests
=====
...
Others
======
- make _BOOL_TRUE and _BOOL_FALSE public and documented (rename to
TRUE_BOOL_STRINGS and FALSE_BOOL_STRINGS or something)?
Corner cases
============
- by default @register attachs a 'mro' attribute to the class; despite this
can be overridden it would be nice to remove it somehow.