File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
traits/stubs_tests/examples Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 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
1414class 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()
You can’t perform that action at this time.
0 commit comments