# m1.py
class A:
__slots__ = ('ok',)
def __init__(self, ok: int) -> None:
self.ok = ok
# m2.py
from m1 import A
class B:
__slots__ = ('x',)
def __init__(self, x: int) -> None:
self.x = x
def f(a: A) -> None:
a.ok = 1
$ pyrefly check m1.py m2.py
ERROR Object of class `A` has no attribute `ok` (not declared in `__slots__`) [missing-attribute]
--> m2.py:12:2
|
12 | a.ok = 1
| ^^^^
|
INFO 1 error
Describe the Bug
Reproducer:
Output:
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response