Parameter typing improvements#2805
Conversation
c40f6d3 to
07a78bd
Compare
|
@AndreasBackx Would you mind rebasing this so it can go out with 8.3.0? |
aa4076f to
c18107a
Compare
|
@AndreasBackx I just reviewed this PR following our discussion at #3329 and just realized it is not that big of a change. So I took the liberty to rebase it on top of I will program this PR for inclusion for the next 8.4.0 release cycle. Can you double-check everything looks OK to you? |
c18107a to
2756275
Compare
Parameter typing improvements
|
Wow ya, thank you so much. I reviewed, or still am, reviewing the other ones. It's been a while but it looks as expected I think. This PRO looks as how I'd expect it. I'm kind of fuzzy about changing one None -> "" here in a few places but I think that's a fine change for the edge case it might just be and them being internal implementations. |
2756275 to
5bd448d
Compare
Just refined some comparisons and removed an assert to clean up code. So let's consider this PR ready to be merged upstream unless a review is raised. |
e3d0d37 to
854645f
Compare
|
I will fix changes then this is ready for 8.4.0. |
Co-authored-by: Kevin Deldycke <kevin@deldycke.com>
854645f to
da7774b
Compare
Just rebased on top of This is ready to be merged into |
|
Thanks @AndreasBackx for the merge and for removing the left-over branch! |
This removes all of the
type: ignorementions inArgument, its subclasses, and theexceptionsmodule. To do so, the following is done:Parameteris now an abstract base class. This just clarifies it cannot be instantiated which was always the point.Parameter.namecan no longer beNone. It only ever isNonewhenexpose_value = False. Instead of having to deal withNoneandis Noneeverywhere, let's just use""instead ofNonewhenexpose_valueisFalsectxinParameter.get_error_hintcan beNone. It always has been like this, but wasn't explicit in typing. Better to be explicit than implicit.Add tests that demonstrate the correct behavior of the change. Testsshould fail without the change.
Parameter.nameis an implementation detail, it's not in the documentation.Add or update relevant docs, in the docs folder and in code... versionchanged::entries in any relevant code docs.