File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,10 @@ class TextIOBase(_io._TextIOBase, IOBase):
103103# Static Typing Support 
104104# 
105105
106+ GenericAlias  =  type (list [int ])
106107
107- class  Reader [T ](metaclass = abc .ABCMeta ):
108+ 
109+ class  Reader (metaclass = abc .ABCMeta ):
108110    """Protocol for simple I/O reader instances. 
109111
110112    This protocol only supports blocking I/O. 
@@ -127,8 +129,10 @@ def __subclasshook__(cls, C):
127129            return  _check_methods (C , "read" )
128130        return  NotImplemented 
129131
132+     __class_getitem__  =  classmethod (GenericAlias )
133+ 
130134
131- class  Writer [ T ] (metaclass = abc .ABCMeta ):
135+ class  Writer (metaclass = abc .ABCMeta ):
132136    """Protocol for simple I/O writer instances. 
133137
134138    This protocol only supports blocking I/O. 
@@ -146,3 +150,5 @@ def __subclasshook__(cls, C):
146150        if  cls  is  Writer :
147151            return  _check_methods (C , "write" )
148152        return  NotImplemented 
153+ 
154+     __class_getitem__  =  classmethod (GenericAlias )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments