@@ -26,7 +26,7 @@ class _InterfaceImplementationTestCase(_BaseTestCase):
2626class ValidImpl (_InterfaceImplementationTestCase ):
2727 @nexusrpc .service
2828 class Interface :
29- op : nexusrpc .Operation [None , None ] # type: ignore[reportUninitializedInstanceVariable]
29+ op : nexusrpc .Operation [None , None ]
3030
3131 def unrelated_method (self ) -> None : ...
3232
@@ -54,7 +54,7 @@ def unrelated_method(self) -> None: ...
5454class ValidImplWithoutTypeAnnotations (_InterfaceImplementationTestCase ):
5555 @nexusrpc .service
5656 class Interface :
57- op : nexusrpc .Operation [int , str ] # type: ignore[reportUninitializedInstanceVariable]
57+ op : nexusrpc .Operation [int , str ]
5858
5959 with warnings .catch_warnings (record = True ) as _warnings :
6060 warnings .simplefilter ("always" )
@@ -74,7 +74,7 @@ async def op(self, ctx, input): ... # type: ignore[reportMissingParameterType]
7474class MissingOperation (_InterfaceImplementationTestCase ):
7575 @nexusrpc .service
7676 class Interface :
77- op : nexusrpc .Operation [None , None ] # type: ignore[reportUninitializedInstanceVariable]
77+ op : nexusrpc .Operation [None , None ]
7878
7979 class Impl :
8080 pass
@@ -85,7 +85,7 @@ class Impl:
8585class MissingInputAnnotation (_InterfaceImplementationTestCase ):
8686 @nexusrpc .service
8787 class Interface :
88- op : nexusrpc .Operation [None , None ] # type: ignore[reportUninitializedInstanceVariable]
88+ op : nexusrpc .Operation [None , None ]
8989
9090 with warnings .catch_warnings (record = True ) as _warnings :
9191 warnings .simplefilter ("always" )
@@ -105,7 +105,7 @@ async def op(self, ctx: StartOperationContext, input) -> None: ... # type: igno
105105class MissingContextAnnotation (_InterfaceImplementationTestCase ):
106106 @nexusrpc .service
107107 class Interface :
108- op : nexusrpc .Operation [None , None ] # type: ignore[reportUninitializedInstanceVariable]
108+ op : nexusrpc .Operation [None , None ]
109109
110110 with warnings .catch_warnings (record = True ) as _warnings :
111111 warnings .simplefilter ("always" )
@@ -125,7 +125,7 @@ async def op(self, ctx, input: None) -> None: ... # type: ignore[reportMissingP
125125class WrongOutputType (_InterfaceImplementationTestCase ):
126126 @nexusrpc .service
127127 class Interface :
128- op : nexusrpc .Operation [None , int ] # type: ignore[reportUninitializedInstanceVariable]
128+ op : nexusrpc .Operation [None , int ]
129129
130130 class Impl :
131131 @sync_operation
@@ -137,7 +137,7 @@ async def op(self, ctx: StartOperationContext, input: None) -> str: ...
137137class WrongOutputTypeWithNone (_InterfaceImplementationTestCase ):
138138 @nexusrpc .service
139139 class Interface :
140- op : nexusrpc .Operation [str , None ] # type: ignore[reportUninitializedInstanceVariable]
140+ op : nexusrpc .Operation [str , None ]
141141
142142 class Impl :
143143 @sync_operation
@@ -149,7 +149,7 @@ async def op(self, ctx: StartOperationContext, input: str) -> str: ...
149149class ValidImplWithNone (_InterfaceImplementationTestCase ):
150150 @nexusrpc .service
151151 class Interface :
152- op : nexusrpc .Operation [str , None ] # type: ignore[reportUninitializedInstanceVariable]
152+ op : nexusrpc .Operation [str , None ]
153153
154154 class Impl :
155155 @sync_operation
@@ -161,7 +161,7 @@ async def op(self, ctx: StartOperationContext, input: str) -> None: ...
161161class MoreSpecificImplAllowed (_InterfaceImplementationTestCase ):
162162 @nexusrpc .service
163163 class Interface :
164- op : nexusrpc .Operation [Any , Any ] # type: ignore[reportUninitializedInstanceVariable]
164+ op : nexusrpc .Operation [Any , Any ]
165165
166166 class Impl :
167167 @sync_operation
@@ -185,7 +185,7 @@ class Subclass(SuperClass):
185185class OutputCovarianceImplOutputCanBeSameType (_InterfaceImplementationTestCase ):
186186 @nexusrpc .service
187187 class Interface :
188- op : nexusrpc .Operation [X , X ] # type: ignore[reportUninitializedInstanceVariable]
188+ op : nexusrpc .Operation [X , X ]
189189
190190 class Impl :
191191 @sync_operation
@@ -197,7 +197,7 @@ async def op(self, ctx: StartOperationContext, input: X) -> X: ...
197197class OutputCovarianceImplOutputCanBeSubclass (_InterfaceImplementationTestCase ):
198198 @nexusrpc .service
199199 class Interface :
200- op : nexusrpc .Operation [X , SuperClass ] # type: ignore[reportUninitializedInstanceVariable]
200+ op : nexusrpc .Operation [X , SuperClass ]
201201
202202 class Impl :
203203 @sync_operation
@@ -211,7 +211,7 @@ class OutputCovarianceImplOutputCannnotBeStrictSuperclass(
211211):
212212 @nexusrpc .service
213213 class Interface :
214- op : nexusrpc .Operation [X , Subclass ] # type: ignore[reportUninitializedInstanceVariable]
214+ op : nexusrpc .Operation [X , Subclass ]
215215
216216 class Impl :
217217 @sync_operation
@@ -223,7 +223,7 @@ async def op(self, ctx: StartOperationContext, input: X) -> SuperClass: ...
223223class InputContravarianceImplInputCanBeSameType (_InterfaceImplementationTestCase ):
224224 @nexusrpc .service
225225 class Interface :
226- op : nexusrpc .Operation [X , X ] # type: ignore[reportUninitializedInstanceVariable]
226+ op : nexusrpc .Operation [X , X ]
227227
228228 class Impl :
229229 @sync_operation
@@ -235,7 +235,7 @@ async def op(self, ctx: StartOperationContext, input: X) -> X: ...
235235class InputContravarianceImplInputCanBeSuperclass (_InterfaceImplementationTestCase ):
236236 @nexusrpc .service
237237 class Interface :
238- op : nexusrpc .Operation [Subclass , X ] # type: ignore[reportUninitializedInstanceVariable]
238+ op : nexusrpc .Operation [Subclass , X ]
239239
240240 class Impl :
241241 @sync_operation
@@ -247,7 +247,7 @@ async def op(self, ctx: StartOperationContext, input: SuperClass) -> X: ...
247247class InputContravarianceImplInputCannotBeSubclass (_InterfaceImplementationTestCase ):
248248 @nexusrpc .service
249249 class Interface :
250- op : nexusrpc .Operation [SuperClass , X ] # type: ignore[reportUninitializedInstanceVariable]
250+ op : nexusrpc .Operation [SuperClass , X ]
251251
252252 class Impl :
253253 @sync_operation
@@ -297,7 +297,7 @@ def test_service_decorator_enforces_interface_implementation(
297297def test_service_does_not_implement_operation_name ():
298298 @nexusrpc .service
299299 class Contract :
300- operation_a : nexusrpc .Operation [None , None ] # type: ignore[reportUninitializedInstanceVariable]
300+ operation_a : nexusrpc .Operation [None , None ]
301301
302302 class Service :
303303 @sync_operation
0 commit comments