You have to opt in with the lazy import keyword no matter what. This pep also prevents lazy import in try catch. I think your concern matters if ‘module’ itself has a lazy import that you want to check exists. With this you now need to be more rigorous in check those sub dependencies.
This can already happen with non top level imports so it is not a necessarily a new issue, but could become more prevalent if there is an overall uptake in this feature for optional dependencies.
Does that work with recursive types? I have had mixed results with `from __future__ import annotations` personally, but I haven't written much Python in ~a year or so.
It's worked for many years, but you won't often see it used outside of class definitions because all of the other tools struggle with it (Pylint, Flake8, Pylance, etc. spit out some variation of an undefined variable error).
Thank you! I'm going to give it a try, sounds like it could be perfect for me to finally get deeper into firmware development. Just can't stand working directly on the Pi.
code-server (vscode in gerneral with remote development extensions) does a lot of splitting of processes between the server and client. This makes normal code writing done on the client side. Intellisense still has the network delay, but is something that takes time anyway. The terminal doesnt get this benefit so they instead add local echo to make the delay a little easier to handle with [1]. I do not know if this works in code server.
This can already happen with non top level imports so it is not a necessarily a new issue, but could become more prevalent if there is an overall uptake in this feature for optional dependencies.