Skip to content

Commit

Permalink
Merge pull request #120 from rbscholtus/master
Browse files Browse the repository at this point in the history
Make attributes in AttrDict properly writable
  • Loading branch information
sampsyo committed Nov 20, 2020
2 parents c244db7 + f905945 commit 2b2db40
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion confuse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import division, absolute_import, print_function

__version__ = '1.3.0'
__version__ = '1.5.0'

from .exceptions import * # NOQA
from .util import * # NOQA
Expand Down
3 changes: 3 additions & 0 deletions confuse/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ def __getattr__(self, key):
else:
raise AttributeError(key)

def __setattr__(self, key, value):
self[key] = value


def as_template(value):
"""Convert a simple "shorthand" Python value to a `Template`.
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
project = u'Confuse'
copyright = u'2012, Adrian Sampson'

version = '1.3'
release = '1.3.0'
version = '1.5'
release = '1.5.0'

exclude_patterns = ['_build']

Expand Down
5 changes: 5 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@ The resulting YAML will contain "key: REDACTED" instead of the original data.
Changelog
---------

v1.5.0
''''''

- `AttrDict` now properly supports (over)writing attributes via dot notation.

v1.4.0
''''''

Expand Down

0 comments on commit 2b2db40

Please sign in to comment.