1010import shlex
1111import stat
1212import uuid
13- from typing import Dict , Set , Tuple , ClassVar , Any , TYPE_CHECKING , Literal
13+ from typing import ClassVar , Any , TYPE_CHECKING , Literal
1414from collections import OrderedDict
1515from datetime import datetime , timezone
1616from functools import partial
@@ -646,8 +646,8 @@ def archivename_validator(text):
646646
647647class BaseFormatter (metaclass = abc .ABCMeta ):
648648 format : str
649- static_data : Dict [str , Any ]
650- FIXED_KEYS : ClassVar [Dict [str , str ]] = {
649+ static_data : dict [str , Any ]
650+ FIXED_KEYS : ClassVar [dict [str , str ]] = {
651651 # Formatting aids
652652 "LF" : "\n " ,
653653 "SPACE" : " " ,
@@ -657,7 +657,7 @@ class BaseFormatter(metaclass=abc.ABCMeta):
657657 "NEWLINE" : "\n " ,
658658 "NL" : "\n " , # \n is automatically converted to os.linesep on write
659659 }
660- KEY_DESCRIPTIONS : ClassVar [Dict [str , str ]] = {
660+ KEY_DESCRIPTIONS : ClassVar [dict [str , str ]] = {
661661 "NEWLINE" : "OS dependent line separator" ,
662662 "NL" : "alias of NEWLINE" ,
663663 "NUL" : "NUL character for creating print0 / xargs -0 like output" ,
@@ -666,9 +666,9 @@ class BaseFormatter(metaclass=abc.ABCMeta):
666666 "CR" : "carriage return character" ,
667667 "LF" : "line feed character" ,
668668 }
669- KEY_GROUPS : ClassVar [Tuple [ Tuple [str , ...], ...]] = (("NEWLINE" , "NL" , "NUL" , "SPACE" , "TAB" , "CR" , "LF" ),)
669+ KEY_GROUPS : ClassVar [tuple [ tuple [str , ...], ...]] = (("NEWLINE" , "NL" , "NUL" , "SPACE" , "TAB" , "CR" , "LF" ),)
670670
671- def __init__ (self , format : str , static : Dict [str , Any ]) -> None :
671+ def __init__ (self , format : str , static : dict [str , Any ]) -> None :
672672 self .format = partial_format (format , static )
673673 self .static_data = static
674674
@@ -685,7 +685,7 @@ def format_item(self, item, jsonline=False, sort=False):
685685 @classmethod
686686 def keys_help (cls ):
687687 help = []
688- keys : Set [str ] = set ()
688+ keys : set [str ] = set ()
689689 keys .update (cls .KEY_DESCRIPTIONS .keys ())
690690 keys .update (key for group in cls .KEY_GROUPS for key in group )
691691
0 commit comments