| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7dd2095 commit ffcbf07
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -264,7 +264,7 @@ class Git(LazyMixin): | |||
| 264 | 264 | ||
| 265 | 265 | _excluded_ = ("cat_file_all", "cat_file_header", "_version_info") | |
| 266 | 266 | ||
| 267 | - re_unsafe_protocol = re.compile("(.+)::.+") | ||
| 267 | + re_unsafe_protocol = re.compile(r"(.+)::.+") | ||
| 268 | 268 | ||
| 269 | 269 | def __getstate__(self) -> Dict[str, Any]: | |
| 270 | 270 | return slots_to_dict(self, exclude=self._excluded_) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,7 +53,7 @@ | |||
| 53 | 53 | # Special object to compare against the empty tree in diffs | |
| 54 | 54 | NULL_TREE = object() | |
| 55 | 55 | ||
| 56 | - _octal_byte_re = re.compile(b"\\\\([0-9]{3})") | ||
| 56 | + _octal_byte_re = re.compile(rb"\\([0-9]{3})") | ||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | 59 | def _octal_repl(matchobj: Match) -> bytes: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ class RefLogEntry(Tuple[str, str, Actor, Tuple[int, int], str]): | |||
| 41 | 41 | ||
| 42 | 42 | """Named tuple allowing easy access to the revlog data fields""" | |
| 43 | 43 | ||
| 44 | - _re_hexsha_only = re.compile("^[0-9A-Fa-f]{40}$") | ||
| 44 | + _re_hexsha_only = re.compile(r"^[0-9A-Fa-f]{40}$") | ||
| 45 | 45 | __slots__ = () | |
| 46 | 46 | ||
| 47 | 47 | def __repr__(self) -> str: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -131,8 +131,8 @@ class Repo(object): | |||
| 131 | 131 | ||
| 132 | 132 | # precompiled regex | |
| 133 | 133 | re_whitespace = re.compile(r"\s+") | |
| 134 | - re_hexsha_only = re.compile("^[0-9A-Fa-f]{40}$") | ||
| 135 | - re_hexsha_shortened = re.compile("^[0-9A-Fa-f]{4,40}$") | ||
| 134 | + re_hexsha_only = re.compile(r"^[0-9A-Fa-f]{40}$") | ||
| 135 | + re_hexsha_shortened = re.compile(r"^[0-9A-Fa-f]{4,40}$") | ||
| 136 | 136 | re_envvars = re.compile(r"(\$(\{\s?)?[a-zA-Z_]\w*(\}\s?)?|%\s?[a-zA-Z_]\w*\s?%)") | |
| 137 | 137 | re_author_committer_start = re.compile(r"^(author|committer)") | |
| 138 | 138 | re_tab_full_line = re.compile(r"^\t(.*)$") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,7 +102,7 @@ def test_CommandError_unicode(self, case): | |||
| 102 | 102 | ||
| 103 | 103 | if subs is not None: | |
| 104 | 104 | # Substrings (must) already contain opening `'`. | |
| 105 | - subs = "(?<!')%s(?!')" % re.escape(subs) | ||
| 105 | + subs = r"(?<!')%s(?!')" % re.escape(subs) | ||
| 106 | 106 | self.assertRegex(s, subs) | |
| 107 | 107 | ||
| 108 | 108 | if not stream: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments