Improve handling of builtin symbols in linter rules (#10919)

Add a new method to the semantic model to simplify and improve the correctness of a common pattern
This commit is contained in:
Alex Waygood 2024-04-16 11:37:31 +01:00 committed by GitHub
parent effd5188c9
commit f779babc5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
93 changed files with 886 additions and 588 deletions

View file

@ -686,7 +686,7 @@ impl TypeChecker for IoBaseChecker {
.is_some_and(|qualified_name| {
matches!(
qualified_name.segments(),
["io", "open" | "open_code"] | ["os" | "", "open"]
["io", "open" | "open_code"] | ["os" | "" | "builtins", "open"]
)
})
}