Conversation
8130510 to
6de0f8e
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
|
@liamhuber What do you think? Could this solve your problem? |
|
Yes, at least in part! 🚀 🚀 What I see missing is the ability to narrow the focus of deprecation, e.g. to specific (kw)args inside a given function. It's possible that On |
These are severe errors. |
I like to be surprised here, but I do not think this is possible. kwargs is meant to be anything.
If code is not annotated mypy tries to guess it or falls back to
True. See: 9f2e75e
💯 |
Sorry, I was not very specific. One example of what I meant would be moving from
If we run |
Severe in what sense? These seem very benign to me.
It's just mad that we reference it without demanding it. We can just make it an abstract class property. Alternatively, we might be able to not reference it at all and simply set
I don't even know why it's complaining about this. I'm just rescoping an imported class onto the test case class. If it really is never going to be happy we could just rescope it onto the test case instance instead of the test case class by moving the offending lines from |
According to your class definition I am allowed to call
|
Look, of course, that's what I said. We can fix it by making the thing abstract and having the underlying, missing
I think you need to take off your compiled, strongly-typed hat, and put on your python hat. Python classes have a certain mutability: class Foo:
def __init__(self, x):
self.x = x
Foo.y = 42
f = Foo(0)
print(f.x, f.y)
g = Foo(1)
Foo.y = None
print(g.x, g.y)
print(f.x, f.y)I say again, this fine, mypy is just angry that it didn't know about the class attribute before hand. I didn't realize it would be this picky, but it can be resolved just like the other problem by indicating that such a class attribute exists. |
You are the author, you are the code owner and most importantly you are the maintainer. Your code, your rules. |
|
To summarize: |
|
Do you want to merge #582 into this one? |
|
BTT: How do you want to proceed? Should I remove the dummy deprecations and we merge? |
Then if there are further test failures, either fix them or ping me if you're not clear how. For things that involve architecture changes or changes to the UI, I would appreciate getting a ping on the plan just to avoid you sinking time into work that I have some deep issue with; for stuff like #582 where the functionality is all the same but we're just being more rigorous, I don't anticipate ever having serious objections so just go for it if the path forward is clear to you. |
|
-> #590 |
No description provided.