56
56
T_OMD_value = TypeVar ("T_OMD_value" , str , bytes , int , float , bool )
57
57
58
58
if sys .version_info [:3 ] < (3 , 7 , 2 ):
59
- # typing.Ordereddict not added until py 3.7.2
59
+ # typing.Ordereddict not added until Python 3.7.2.
60
60
from collections import OrderedDict
61
61
62
62
OrderedDict_OMD = OrderedDict
73
73
log = logging .getLogger ("git.config" )
74
74
log .addHandler (logging .NullHandler ())
75
75
76
- # invariants
77
- # represents the configuration level of a configuration file
78
-
79
76
77
+ # The configuration level of a configuration file.
80
78
CONFIG_LEVELS : ConfigLevels_Tup = ("system" , "user" , "global" , "repository" )
81
79
82
-
83
80
# Section pattern to detect conditional includes.
84
81
# https://git-scm.com/docs/git-config#_conditional_includes
85
82
CONDITIONAL_INCLUDE_REGEXP = re .compile (r"(?<=includeIf )\"(gitdir|gitdir/i|onbranch):(.+)\"" )
@@ -603,7 +600,7 @@ def read(self) -> None: # type: ignore[override]
603
600
files_to_read = [self ._file_or_files ]
604
601
else : # for lists or tuples
605
602
files_to_read = list (self ._file_or_files )
606
- # end assure we have a copy of the paths to handle
603
+ # end ensure we have a copy of the paths to handle
607
604
608
605
seen = set (files_to_read )
609
606
num_read_include_files = 0
@@ -612,7 +609,7 @@ def read(self) -> None: # type: ignore[override]
612
609
file_ok = False
613
610
614
611
if hasattr (file_path , "seek" ):
615
- # Must be a file objectfile -object.
612
+ # Must be a file-object.
616
613
file_path = cast (IO [bytes ], file_path ) # TODO: Replace with assert to narrow type, once sure.
617
614
self ._read (file_path , file_path .name )
618
615
else :
@@ -626,7 +623,7 @@ def read(self) -> None: # type: ignore[override]
626
623
continue
627
624
628
625
# Read includes and append those that we didn't handle yet.
629
- # We expect all paths to be normalized and absolute (and will assure that is the case).
626
+ # We expect all paths to be normalized and absolute (and will ensure that is the case).
630
627
if self ._has_includes ():
631
628
for _ , include_path in self ._included_paths ():
632
629
if include_path .startswith ("~" ):
0 commit comments