SQLMesh version 0.224.0
https://github.com/TobikoData/sqlmesh/blob/main/sqlmesh/__init__.py#L128
I realize this is not a particularly common use case, but I'm running SQLMesh in a constantly running service, where I spawn a process that will run SQLMesh (I spawn and not fork for general safety guarantees that spawn provides, the main process is heavily multithreaded, which is another reason why I simply dont run SQLMesh from the main process, as SQLMesh forks in addition).
Problem is, the spawned process doesn't inherit sys.stdin and in fact doesn't have any stdin at all, requiring me to implement an ugly workaround for this to work.
Therefore I believe the above line should have some None checks added to it before isatty() is called.