Skip to content

Commit 8d7df1e

Browse files
authored
Merge branch 'main' into enable-workflow-dispatch-for-core-tests
2 parents b1712d5 + 75d9b0a commit 8d7df1e

File tree

1 file changed

+15
-11
lines changed
  • traits/stubs_tests/examples

1 file changed

+15
-11
lines changed

traits/stubs_tests/examples/Any.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# Thanks for using Enthought open source!
1010

11-
from traits.api import HasTraits, Any, Instance, Int
11+
from traits.api import HasTraits, Any
1212

1313

1414
class Test(HasTraits):
@@ -46,14 +46,18 @@ class Test3(HasTraits):
4646
i = Any(default_value=234)
4747

4848

49-
class Foo:
50-
pass
49+
# The test below is commented out because different versions of mypy have
50+
# different opinions on whether it's okay to override `x = Any()` with `x =
51+
# Instance(Foo)` or not.
5152

52-
53-
class Superclass(HasTraits):
54-
x = Any()
55-
56-
57-
class Subclass(Superclass):
58-
x = Instance(Foo) # E: assignment
59-
y = Int()
53+
# class Foo:
54+
# pass
55+
#
56+
#
57+
# class Superclass(HasTraits):
58+
# x = Any()
59+
#
60+
#
61+
# class Subclass(Superclass):
62+
# x = Instance(Foo)
63+
# y = Int()

0 commit comments

Comments
 (0)