alexferl / vyper

Python configuration with (more) fangs
MIT License
144 stars 21 forks source link

Fix nested falsy values being treated as unset #43

Closed jeffcasavant closed 2 years ago

jeffcasavant commented 2 years ago

is_set() correctly returns True for top-level falsy values, but _search_dict() treated falsy values as missing values. Because of this falsy values nested inside dictionaries would cause is_set to return False.

This PR updates _search_dict to behave like the rest of the library does and look for non-None values rather than truey ones.

codecov[bot] commented 2 years ago

Codecov Report

Merging #43 (89a24c8) into master (56f7dfd) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #43   +/-   ##
=======================================
  Coverage   74.34%   74.34%           
=======================================
  Files           7        7           
  Lines         608      608           
=======================================
  Hits          452      452           
  Misses        156      156           
Impacted Files Coverage Δ
vyper/vyper.py 82.29% <100.00%> (ø)

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 56f7dfd...89a24c8. Read the comment docs.

jeffcasavant commented 2 years ago

Yo @alexferl ! What's your take on this coverage loss? I don't think I added anything new & untested; quite the opposite.

joshkaplinsky commented 2 years ago

Any update on this? Looking to use this fix as well! @alexferl

alexferl commented 2 years ago

Thanks, I'll try to release this ASAP.

jeffcasavant commented 2 years ago

Thanks Alex! Glad to help.

alexferl commented 2 years ago

Released in v1.1.1