From 8f51abd30647c9dfe857621ab97f52d3e5f2fbd9 Mon Sep 17 00:00:00 2001 From: SergeantMenacingGarlic <87030047+SergeantMenacingGarlic@users.noreply.github.com> Date: Mon, 10 Oct 2022 16:13:36 -0400 Subject: Add datetime.datetime type to commit_date and author_date --- git/index/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'git/index/base.py') diff --git a/git/index/base.py b/git/index/base.py index 10f8b8b2..17d18db5 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -4,6 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php +import datetime import glob from io import BytesIO import os @@ -1032,8 +1033,8 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable): head: bool = True, author: Union[None, "Actor"] = None, committer: Union[None, "Actor"] = None, - author_date: Union[str, None] = None, - commit_date: Union[str, None] = None, + author_date: Union[datetime.datetime, str, None] = None, + commit_date: Union[datetime.datetime, str, None] = None, skip_hooks: bool = False, ) -> Commit: """Commit the current default index file, creating a commit object. -- cgit v1.2.1