Преглед на файлове

Avoid unnecessary import probing

Jelmer Vernooij преди 3 седмици
родител
ревизия
3e899c7fe7
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      dulwich/objects.py

+ 2 - 2
dulwich/objects.py

@@ -44,9 +44,9 @@ if sys.version_info >= (3, 11):
 else:
     from typing_extensions import Self
 
-try:
+if sys.version_info >= (3, 10):
     from typing import TypeGuard  # type: ignore
-except ImportError:
+else:
     from typing_extensions import TypeGuard
 
 from . import replace_me