Skip to content

Commit 36df24f

Browse files
committed
Add documentation link
1 parent 8379e1b commit 36df24f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

mypyc/irbuild/prepare.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,14 @@ def prepare_class_def(
299299
"Inheriting from most builtin types is unimplemented", path, cdef.line
300300
)
301301
errors.note(
302-
"Potential workaround: @mypy_extensions.mypyc_attr(native_class=False)", path, cdef.line
302+
"Potential workaround: @mypy_extensions.mypyc_attr(native_class=False)",
303+
path,
304+
cdef.line,
305+
)
306+
errors.note(
307+
"https://mypyc.readthedocs.io/en/stable/native_classes.html#defining-non-native-classes",
308+
path,
309+
cdef.line,
303310
)
304311

305312
# Set up the parent class

mypyc/test-data/irbuild-classes.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,8 @@ from mypy_extensions import mypyc_attr
13761376

13771377
@mypyc_attr(native_class=True)
13781378
class M(type): # E: Inheriting from most builtin types is unimplemented \
1379-
# N: Potential workaround: @mypy_extensions.mypyc_attr(native_class=False)
1379+
# N: Potential workaround: @mypy_extensions.mypyc_attr(native_class=False) \
1380+
# N: https://mypyc.readthedocs.io/en/stable/native_classes.html#defining-non-native-classes
13801381
pass
13811382

13821383
@mypyc_attr(native_class=True)

0 commit comments

Comments
 (0)