Enhancement: A rewritten implementation of the code flow and type constraint engine provides better handling of complex code flow like nested loops, try/except/finally statements, etc.
Enhancement: In VS Code extension, changed the logic for how to handle opened files that don't fall within any workspace. Previously, all such files were analyzed in a default workspace using default settings. The new logic uses the current workspace if there is only one. The "default" workspace fallback is still used for multi-root workspaces.
Bug Fix: Fixed bugs in logic that determines when to allow importing a non-stub from a stub file. It's not allowed for third-party files.
Bug Fix: Changed import logic to search for imported symbols in the target module before looking for submodules of the same name.
Bug Fix: Unreachable code is displayed even for files where errors or warnings are suppressed.
Bug Fix: Fixed TypeVar matching logic to avoid adding widened types if the TypeVar was already matched against subclasses of the type that is being added.
Bug Fix: Union types that include Literal[True] and Literal[False] are now collapsed into a 'bool' type.