Closed llucax closed 1 week ago
Well, here is the reason I didn't use type
.
nox > pylint src docs noxfile.py tests
************* Module frequenz.client.dispatch._client
src/frequenz/client/dispatch/_client.py:124:8: W0622: Redefining built-in 'type' (redefined-builtin)
-------------------------------------------------------------------
Your code has been rated at 9.99/10 (previous run: 10.00/10, -0.01)
nox > Command pylint src docs noxfile.py tests failed with exit code 4
nox > Session pylint failed.
You can add a disable rule. In general I think it is good not to shadow built-ins, but in this case I think it makes sense to make an exception.
What's needed?
We need a clear interface. Using
_type
is not necessary and it is confusing, as usually in python stuff that starts with_
is not supposed to be set by users.Proposed solution
Use
type
.Additional context