Skip to content
Prev Previous commit
Next Next commit
Use git.types.Literal instead of typing.Literal
  • Loading branch information
George-Ogden committed Nov 28, 2025
commit a1f094c81fcf4a6b559c2a26fc622c89e4f19735
5 changes: 2 additions & 3 deletions git/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
Any,
Iterator,
List,
Literal,
Match,
Optional,
Sequence,
Expand All @@ -31,7 +30,7 @@
Union,
cast,
)
from git.types import PathLike
from git.types import PathLike, Literal

if TYPE_CHECKING:
from subprocess import Popen
Expand Down Expand Up @@ -291,7 +290,7 @@ class DiffIndex(List[T_Diff]):
The class improves the diff handling convenience.
"""

change_type: Sequence[Literal["A", "C", "D", "R", "M", "T"]] = ("A", "C", "D", "R", "M", "T")
change_type: Sequence[Literal["A", "C", "D", "R", "M", "T"]] = ("A", "C", "D", "R", "M", "T") # noqa: F821
"""Change type invariant identifying possible ways a blob can have changed:

* ``A`` = Added
Expand Down
Loading