File tree 2 files changed +10
-0
lines changed
tests/functional/m/member
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -231,3 +231,12 @@ class Animal(Enum):
231
231
print (keyy )
232
232
for vall in Animal .__members__ .values ():
233
233
print (vall )
234
+
235
+
236
+ from typing import NewType
237
+
238
+ UserId = NewType ("UserId" , str )
239
+
240
+ some_id = UserId ("id" )
241
+ some_id .capitalize ()
242
+ some_id .not_a_str_method () # [no-member]
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ no-member:135:0:135:18::Class 'str' has no 'portocala' member:INFERENCE
17
17
no-member:170:19:170:32:NoDunderNameInInstance.__init__:Instance of 'NoDunderNameInInstance' has no '__name__' member:INFERENCE
18
18
no-member:176:14:176:23:InvalidAccessBySlots.__init__:Instance of 'InvalidAccessBySlots' has no 'teta' member:INFERENCE
19
19
no-member:208:13:208:20::Class 'Cls' has no 'BAZ' member; maybe 'BAR'?:INFERENCE
20
+ no-member:242:0:242:24::Instance of 'UserId' has no 'not_a_str_method' member:INFERENCE
You can’t perform that action at this time.
0 commit comments