Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/recursive asdict #395

Merged
merged 5 commits into from Jun 17, 2018
Merged

Feature/recursive asdict #395

merged 5 commits into from Jun 17, 2018

Conversation

@Tinche
Copy link
Member

@Tinche Tinche commented Jun 16, 2018

Pull Request Check List

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

  • Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Updated documentation for changed code.
  • Documentation in .rst files is written using semantic newlines.
  • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Changes (and possible deprecations) have news fragments in changelog.d.
@@ -87,6 +82,35 @@ def asdict(
return rv


def _asdict_anything(val, filter, dict_factory, retain_collection_types):
"""asdict only works on attrs instances, this works on anything."""

This comment has been minimized.

@hynek

hynek Jun 16, 2018
Member

This is not how we write docstrings. 😇

@codecov
Copy link

@codecov codecov bot commented Jun 16, 2018

Codecov Report

Merging #395 into master will increase coverage by 4.97%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #395      +/-   ##
========================================
+ Coverage   95.02%   100%   +4.97%     
========================================
  Files           9      9              
  Lines         844    855      +11     
  Branches      178    183       +5     
========================================
+ Hits          802    855      +53     
+ Misses         35      0      -35     
+ Partials        7      0       -7
Impacted Files Coverage Δ
src/attr/_funcs.py 100% <100%> (ø) ⬆️
src/attr/_make.py 100% <0%> (+1.81%) ⬆️
src/attr/_compat.py 100% <0%> (+50%) ⬆️

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 2834ee4...66f2bce. Read the comment docs.

@hynek
hynek approved these changes Jun 17, 2018
@hynek
Copy link
Member

@hynek hynek commented Jun 17, 2018

Thanks!

@hynek hynek merged commit 908cb01 into master Jun 17, 2018
4 checks passed
4 checks passed
@codecov
codecov/patch 100% of diff hit (target 95.02%)
Details
@codecov
codecov/project 100% (+4.97%) compared to 2834ee4
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@hynek hynek deleted the feature/recursive-asdict branch Jun 17, 2018
@mwalercz
Copy link

@mwalercz mwalercz commented Jul 29, 2018

Hello, thank you for your work @hynek!
When are you planning to make a new release with this change? It would allow me to remove boilerplate related to serialization of complex object which contains list of tuples of attrs objects.

Do you need any help to speed up the release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants