Replies: 1 comment 1 reply
-
I'm not sure I have a good suggestion for this pattern in general, but another option other than |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I should preface this by saying I'm still learning. Say I have the following pattern:
I want to be able to test setting the
foo
property toNone
i.e. that it is reset as well as it being set to a non-None
value. To be able to check that it has been set toNone
Iassert
that the internal instance variable is set toNone
. However,ruff
then raises theSLF001
error. I could use anoqa: SLF001
to suppress the error but am wondering if there is a best practice to achieve what I want. Thanks for your time andruff
.Beta Was this translation helpful? Give feedback.
All reactions