@@ -275,7 +275,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje
275275 # list of RawConfigParser methods able to change the instance
276276 _mutating_methods_ = ("add_section" , "remove_section" , "remove_option" , "set" )
277277
278- def __init__ (self , file_or_files : Union [None , PathLike , BytesIO , Sequence [Union [PathLike , BytesIO ]]] = None ,
278+ def __init__ (self , file_or_files : Union [None , PathLike , ' BytesIO' , Sequence [Union [PathLike , ' BytesIO' ]]] = None ,
279279 read_only : bool = True , merge_includes : bool = True ,
280280 config_level : Union [Lit_config_levels , None ] = None ,
281281 repo : Union ['Repo' , None ] = None ) -> None :
@@ -667,7 +667,7 @@ def write(self) -> None:
667667 fp = self ._file_or_files
668668
669669 # we have a physical file on disk, so get a lock
670- is_file_lock = isinstance (fp , (str , IOBase )) # can't use Pathlike until 3.5 dropped
670+ is_file_lock = isinstance (fp , (str , os . PathLike , IOBase )) # can't use Pathlike until 3.5 dropped
671671 if is_file_lock and self ._lock is not None : # else raise Error?
672672 self ._lock ._obtain_lock ()
673673
@@ -676,7 +676,7 @@ def write(self) -> None:
676676 with open (fp , "wb" ) as fp_open :
677677 self ._write (fp_open )
678678 else :
679- fp = cast (BytesIO , fp )
679+ fp = cast (' BytesIO' , fp )
680680 fp .seek (0 )
681681 # make sure we do not overwrite into an existing file
682682 if hasattr (fp , 'truncate' ):
0 commit comments