Skip to content

Support to respect default values from attr class#15

Merged
Tinche merged 3 commits intopython-attrs:masterfrom
shwetas1205:master
Nov 9, 2017
Merged

Support to respect default values from attr class#15
Tinche merged 3 commits intopython-attrs:masterfrom
shwetas1205:master

Conversation

@shwetas1205
Copy link

These changes are to fix #10 or #14

I added one unit test to support creating the attr class without providing optional value.

@Tinche let me know your feedback on the same.

@codecov
Copy link

codecov bot commented Oct 31, 2017

Codecov Report

Merging #15 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   99.03%   99.05%   +0.01%     
==========================================
  Files          18       18              
  Lines         935      948      +13     
==========================================
+ Hits          926      939      +13     
  Misses          9        9
Impacted Files Coverage Δ
cattr/converters.py 100% <100%> (ø) ⬆️
tests/metadata/test_roundtrips.py 100% <100%> (ø) ⬆️
tests/test_structure_attrs.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02d9da0...3f220ac. Read the comment docs.

@Tinche
Copy link
Member

Tinche commented Nov 1, 2017

Hi,

I'm sick ATM so it might be a few days until I get around to this. Thanks :)

@Tinche
Copy link
Member

Tinche commented Nov 9, 2017

Hello,

thanks for this. I'll take it in and maybe refactor it a little. Cheers!

@Tinche Tinche merged commit 60d560d into python-attrs:master Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cattr.structure does not respect default value from attr.ib

2 participants