Skip to content

Commit 9eeb03b

Browse files
committed
update patcher.py per review sugsstion
1 parent 3996ef4 commit 9eeb03b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cpp_linter/clang_tools/patcher.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@
55
from typing import Optional, Dict, Any, List, Tuple
66
from pygit2 import Patch # type: ignore
77
from ..common_fs import FileObj
8+
from pygit2.enums import DiffOption # type: ignore
89

9-
try:
10-
from pygit2.enums import DiffOption # type: ignore
11-
12-
INDENT_HEURISTIC = DiffOption.INDENT_HEURISTIC
13-
except ImportError: # if pygit2.__version__ < 1.14
14-
from pygit2 import GIT_DIFF_INDENT_HEURISTIC # type: ignore
15-
16-
INDENT_HEURISTIC = GIT_DIFF_INDENT_HEURISTIC
10+
INDENT_HEURISTIC = DiffOption.INDENT_HEURISTIC
1711

1812

1913
class Suggestion:

0 commit comments

Comments
 (0)