Closed nemith closed 11 months ago
And from looking at your code, I assume you did not use
black
for the formatting. The code must be formatted withblack
to pass the test.
Just the opposite. My editor is setup to run black and isort and isort is formatting the imports (black doesn't)
It would be great not to add a dependency again. Luckily we removed Python 3.7 support, so we are fine to use typing.Protocol
I can update to use typing.Protocol. I am not ADDING a dependency but FIXING one. Fixed ALL the typing_extension imports as well in the latest update.
Fix implemented here: #867
I created a separate issue related to the removal of mypy_extensions.
mypy_extensions
andtyping_extensions
were decalred only as dev depenendencies. This means in a clean enviroment (like a fresh venv) nornir would fail to load.Turns out the use for mypy_extensions was deprecated so we can remove that also Protocol is part of the base typing package so we can get rid of the
typing_extensions
package as well fixing both.See: https://mypy.readthedocs.io/en/stable/additional_features.html?highlight=mypy_extensions#extended-callable-types
Fixes: #861
Testing
Before (on master)
After my fix