| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,36 +10,34 @@ | |||
| 10 | 10 | import abc | |
| 11 | 11 | import configparser as cp | |
| 12 | 12 | import fnmatch | |
| 13 | - from functools import wraps | ||
| 14 | 13 | import inspect | |
| 15 | - from io import BufferedReader, IOBase | ||
| 16 | 14 | import logging | |
| 17 | 15 | import os | |
| 18 | 16 | import os.path as osp | |
| 19 | 17 | import re | |
| 20 | 18 | import sys | |
| 21 | - | ||
| 22 | - from git.compat import defenc, force_text | ||
| 23 | - from git.util import LockFile | ||
| 19 | + from functools import wraps | ||
| 20 | + from io import BufferedReader, IOBase | ||
| 24 | 21 | ||
| 25 | 22 | # typing------------------------------------------------------- | |
| 26 | - | ||
| 27 | 23 | from typing import ( | |
| 24 | + IO, | ||
| 25 | + TYPE_CHECKING, | ||
| 28 | 26 | Any, | |
| 29 | 27 | Callable, | |
| 28 | + Dict, | ||
| 30 | 29 | Generic, | |
| 31 | - IO, | ||
| 32 | 30 | List, | |
| 33 | - Dict, | ||
| 34 | 31 | Sequence, | |
| 35 | - TYPE_CHECKING, | ||
| 36 | 32 | Tuple, | |
| 37 | 33 | TypeVar, | |
| 38 | 34 | Union, | |
| 39 | 35 | cast, | |
| 40 | 36 | ) | |
| 41 | 37 | ||
| 42 | - from git.types import Lit_config_levels, ConfigLevels_Tup, PathLike, assert_never, _T | ||
| 38 | + from git.compat import defenc, force_text | ||
| 39 | + from git.types import _T, ConfigLevels_Tup, Lit_config_levels, PathLike, assert_never | ||
| 40 | + from git.util import LockFile | ||
| 43 | 41 | ||
| 44 | 42 | if TYPE_CHECKING: | |
| 45 | 43 | from io import BytesIO | |
@@ -956,12 +954,7 @@ def _string_to_value(self, valuestr: str) -> Union[int, float, str, bool]: | |||
| 956 | 954 | continue | |
| 957 | 955 | # END for each numeric type | |
| 958 | 956 | ||
| 959 | - # Try boolean values as git uses them. git accepts yes/no and on/off as | ||
| 960 | - # well as true/false (git_parse_maybe_bool_text in parse.c), and so does | ||
| 961 | - # ConfigParser.getboolean on this class, so only get_value lagged behind. | ||
| 962 | - # Leaving them as strings was worse than merely inexact: "no" and "off" | ||
| 963 | - # are non-empty, so a caller testing the result got True for a value git | ||
| 964 | - # reads as false. | ||
| 957 | + # Try boolean values as git uses them. | ||
| 965 | 958 | vl = valuestr.lower() | |
| 966 | 959 | if vl in ("false", "no", "off"): | |
| 967 | 960 | return False | |
| Back | FazBrowse Home | New Git URL |
0 commit comments