11import logging
22from os import PathLike
33from os .path import basename , splitext
4- from typing import BinaryIO , List , Optional , Set
4+ from typing import Any , BinaryIO , List , Optional , Set
55
66from .cd import (
77 coherence_ratio ,
@@ -36,8 +36,8 @@ def from_bytes(
3636 steps : int = 5 ,
3737 chunk_size : int = 512 ,
3838 threshold : float = 0.2 ,
39- cp_isolation : List [str ] = None ,
40- cp_exclusion : List [str ] = None ,
39+ cp_isolation : Optional [ List [str ] ] = None ,
40+ cp_exclusion : Optional [ List [str ] ] = None ,
4141 preemptive_behaviour : bool = True ,
4242 explain : bool = False ,
4343) -> CharsetMatches :
@@ -486,8 +486,8 @@ def from_fp(
486486 steps : int = 5 ,
487487 chunk_size : int = 512 ,
488488 threshold : float = 0.20 ,
489- cp_isolation : List [str ] = None ,
490- cp_exclusion : List [str ] = None ,
489+ cp_isolation : Optional [ List [str ] ] = None ,
490+ cp_exclusion : Optional [ List [str ] ] = None ,
491491 preemptive_behaviour : bool = True ,
492492 explain : bool = False ,
493493) -> CharsetMatches :
@@ -508,12 +508,12 @@ def from_fp(
508508
509509
510510def from_path (
511- path : PathLike ,
511+ path : " PathLike[Any]" ,
512512 steps : int = 5 ,
513513 chunk_size : int = 512 ,
514514 threshold : float = 0.20 ,
515- cp_isolation : List [str ] = None ,
516- cp_exclusion : List [str ] = None ,
515+ cp_isolation : Optional [ List [str ] ] = None ,
516+ cp_exclusion : Optional [ List [str ] ] = None ,
517517 preemptive_behaviour : bool = True ,
518518 explain : bool = False ,
519519) -> CharsetMatches :
@@ -535,12 +535,12 @@ def from_path(
535535
536536
537537def normalize (
538- path : PathLike ,
538+ path : " PathLike[Any]" ,
539539 steps : int = 5 ,
540540 chunk_size : int = 512 ,
541541 threshold : float = 0.20 ,
542- cp_isolation : List [str ] = None ,
543- cp_exclusion : List [str ] = None ,
542+ cp_isolation : Optional [ List [str ] ] = None ,
543+ cp_exclusion : Optional [ List [str ] ] = None ,
544544 preemptive_behaviour : bool = True ,
545545) -> CharsetMatch :
546546 """
0 commit comments