traitlets icon indicating copy to clipboard operation
traitlets copied to clipboard

nicer falsy behavior for LazyConfigValue

Open minrk opened this issue 5 years ago • 2 comments

  • empty lazy config is falsy, non-empty is truthy
  • checking in for empty lazy config returns False, indicating there's no config there

minrk avatar Jun 30 '20 08:06 minrk

I'm not sure if we should fix the tests, or the __contains__. I can't see why we would like 'foo' in c.foo to be true-ish.

Carreau avatar Jul 02 '20 15:07 Carreau

Sorry or leaving this forever. The failing tests were mainly verifying that the LazyConfig was stored so that future access would retrieve the same thing, but the asserts were broken by the new falsiness. So I updated the tests to verify presence in another way.

minrk avatar Sep 04 '20 06:09 minrk