3 ms·
Here’s 1% that gives 50% of result. Replace: class C: def __init__(self): self.foo = ConcreteFoo() with: class C: def __in
by d0mine 2y ago
Here’s 1% that gives 50% of result. Replace:
class C:
def __init__(self):
self.foo = ConcreteFoo()
with:
class C:
def __init__(self, foo: SupportsFoo):
self.foo = foo
where SupportsFoo is a Protocol. That’s it.