Closed jranalli closed 1 year ago
As I'm looking at it I think we want to retain the kwarg part. If the goal is to match the old signatures for T_s, etc. I think you need to retain the quality=True flag for mp1, and the ability to use density.
So I think for mp1 it would be like:
if p is not None:
T,_,_,x,_ = self._argparse(s=s, p=p)
else:
T,_,_,x,_ = self._argparse(s=s, **kwarg)
if quality:
return T,x
return T
And for ig:
if p is not None:
return self.T(s=s, p=p)
return self.T(s=s, **kwarg)
Does that look right to you? If so, I'm happy to make the edits.
True. I think I'd like to weave this into my own working branch and play with it a bit before we fold it in.
Ok, just committed the changes that would follow the methodology proposed there if you want to use these as a simpler starting point. Or you can just back off by a commit or start from wherever you like!
Whew. It really took me a while to get back to this. I agree with your edits - this is the right way to do it. I'm approving this pull request.
closes #52. Modifications were made as simply as possible and used a similar method to argparse.
Check for the presence of the variable of interest in
vargs
, and if it's there, move it intokwargs
. Then call the followup function without referencingvargs
. Only applies whenp
is the first positional argument, becauseargparse
already assumesT
is the first positional argument.Some test code to ensure reliability. Any other calls already rely on kwargs and should be fine.