You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a call to GitConfigParser.items("somesection") fails with NoSectionError even when "somesection" exists.
however, with a prior call to GitConfigParser.sections() OR .get_value() -- as far as I can tell, anything that trips assure_data_present -- the call to items("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?
The text was updated successfully, but these errors were encountered:
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.
GitConfigParser.items("somesection")
fails withNoSectionError
even when "somesection" exists.GitConfigParser.sections()
OR.get_value()
-- as far as I can tell, anything that tripsassure_data_present
-- the call toitems("somesection")
succeedsI'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 inMetaParserBuilder.__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 toread()
), I assume that.items
will always fail. Is this intentional?The text was updated successfully, but these errors were encountered: