GitConfigParser.items doesn't @need_value (i.e. requires a prior call to .read() )
- a call to
GitConfigParser.items("somesection")fails withNoSectionErroreven when "somesection" exists. - however, with a prior call to
GitConfigParser.sections()OR.get_value()-- as far as I can tell, anything that tripsassure_data_present-- the call toitems("somesection")succeeds
I'm not quite sure what's going on under the hood here, but my understanding after poking through the source code a bit:
GitConfigParser.items is not marked with a @needs_values decorator, nor is it a base class method (automatically decorated in MetaParserBuilder.__new__), nor does it call to a base class method with this decorator (as .get_value does) -- without a prior call to a func decorated with @needs_values (or some other call to read()), I assume that .items will always fail. Is this intentional?
Thanks for the precise description and for digging in.
To me it sounds like an oversight, too. Recently the config parser was upgraded to support multiple values, it may be it learned some tricks and became more ergonomic. I hope to publish a new release this weekend.