4 ms·
What about decorators, or wrappers around third-party code whose contracts change frequently (or even second party code when interacting with functions provided
by zbentley 3y ago
What about decorators, or wrappers around third-party code whose contracts change frequently (or even second party code when interacting with functions provided by teams that don't follow explicit argument typing guidelines, if you have that sort of culture)?
- refactor_master 3y agoUsually the solutions range from a culture of “just don’t” to tests/mypy that have become increasingly stricter over the years, every time we’ve come a step further up the ladder. But I admit, it has taken quite some bridging to get there. Moving to static Python in most places has dramatically improved the code and language.
- plonk 3y agoThose are better handled by typing.ParamSpec, it should keep track of the unwrapped function's arguments.