[uss_qualifier] Don't try to cleanup None area in down_uss#1423
[uss_qualifier] Don't try to cleanup None area in down_uss#1423the-glu wants to merge 1 commit intointeruss:mainfrom
Conversation
|
It seems like the root issue here should have been caught by basedpyright. The reason it didn't is that the argument of interest didn't have any type annotations, so I would expect that to be a core fix for this problem. By putting the conditional inside the method, we are effectively making a method that may do nothing when called, and that seems surprising to me. In one of the uses: self.begin_test_step("Clear operational intents created by virtual USS")
self._clear_op_intents(estimated_max_extents)
self.end_test_step()...it wouldn't make sense to perform that test step at all if _clear_op_intents was going to be a no-op -- beginning and ending a test step while knowing nothing would happen in it is confusing. So, I don't think we want to no-op the method when the argument is None, I think we should ensure the argument is not None before calling the method. I have #1425 as an alternate approach. |
Yes I do agree, #1425 is better.. I would expect basedpyright to do some type inference, at least "something that is not None", but it seems that not the case ;/ |
|
I think basedpyright continues to demonstrate its value as it would have caught this one if we had been more diligent about type annotations. It would be cool if it did type inferences, but it's still very useful as-is in my opinion |
#1405 removed by mistake the
Nonecheck that seems to appear in some cases. This fixes #1422