ruff/crates/ty_python_semantic/resources/mdtest
Carl Meyer f8890b70c3
[ty] __file__ is always a string inside a Python module (#18071)
## Summary

Understand that `__file__` is always set and a `str` when looked up as
an implicit global from a Python file we are type checking.

## Test Plan

mdtests
2025-05-13 08:20:43 -07:00
..
annotations [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
assignment [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
binary [ty] Infer parameter specializations of generic aliases (#18021) 2025-05-12 22:12:44 -04:00
boolean
boundness_declaredness Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
call [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
class Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
comparison
comprehensions
conditional
declaration
diagnostics [ty] Add a note to the diagnostic if a new builtin is used on an old Python version (#18068) 2025-05-13 10:08:04 -04:00
directives [ty] Improve diagnostics for assert_type and assert_never (#18050) 2025-05-13 13:00:20 +00:00
doc ty_python_semantic: add union type context to function call type errors 2025-05-09 13:40:51 -04:00
exception [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
expression [ty] Understand classes that inherit from subscripted Protocol[] as generic (#17832) 2025-05-09 17:39:15 +01:00
function [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
generics [ty] Infer parameter specializations of generic aliases (#18021) 2025-05-12 22:12:44 -04:00
import [ty] Recognize submodules in self-referential imports (#18005) 2025-05-13 16:59:11 +02:00
literal [ty] Understand classes that inherit from subscripted Protocol[] as generic (#17832) 2025-05-09 17:39:15 +01:00
loops
narrow [ty] Add tests for else branches of hasattr() narrowing (#18067) 2025-05-13 09:57:53 -04:00
regression
scopes [ty] __file__ is always a string inside a Python module (#18071) 2025-05-13 08:20:43 -07:00
shadowing
snapshots [ty] Add a note to the diagnostic if a new builtin is used on an old Python version (#18068) 2025-05-13 10:08:04 -04:00
stubs Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
subscript [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
suppressions
type_of Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
type_properties [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
type_qualifiers
unary Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
with
.mdformat.toml
attributes.md [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
cycle.md [ty] add cycle handling for FunctionType::signature query (#17833) 2025-05-05 12:12:38 -07:00
dataclass_transform.md [ty] Detect overloads decorated with @dataclass_transform (#17835) 2025-05-07 15:51:13 +02:00
dataclasses.md [ty] Implement DataClassInstance protocol for dataclasses. (#18018) 2025-05-13 10:31:26 +02:00
decorators.md ty_python_semantic: add union type context to function call type errors 2025-05-09 13:40:51 -04:00
descriptor_protocol.md Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
final.md
intersection_types.md
invalid_syntax.md
known_constants.md
mdtest_config.md
mdtest_custom_typeshed.md [ty] Fix duplicate diagnostics for unresolved module when an import from statement imports multiple members (#17886) 2025-05-06 12:37:10 +01:00
metaclass.md Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
mro.md [ty] Allow classes to inherit from type[Any] or type[Unknown] (#18060) 2025-05-12 20:30:21 -04:00
named_tuple.md [ty] Add more tests for NamedTuples (#17975) 2025-05-10 10:46:08 +02:00
overloads.md
pep695_type_aliases.md [ty] Understand homogeneous tuple annotations (#17998) 2025-05-12 22:02:25 -04:00
properties.md ty_python_semantic: add union type context to function call type errors 2025-05-09 13:40:51 -04:00
protocols.md [ty] Understand classes that inherit from subscripted Protocol[] as generic (#17832) 2025-05-09 17:39:15 +01:00
slots.md
statically_known_branches.md Fix typos (#17988) 2025-05-09 14:57:14 -04:00
sys_platform.md
sys_version_info.md
terminal_statements.md
type_api.md Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00
typed_dict.md
union_types.md
unpacking.md
unreachable.md