Skip to content

Add datetime.datetime type to commit_date and author_date - #1501

Merged
Byron merged 1 commit into
gitpython-developers:mainfrom
SergeantMenacingGarlic:date_types
Oct 14, 2022
Merged

Add datetime.datetime type to commit_date and author_date#1501
Byron merged 1 commit into
gitpython-developers:mainfrom
SergeantMenacingGarlic:date_types

Conversation

@SergeantMenacingGarlic

Copy link
Copy Markdown
Contributor

Update type hints to match acceptable date types.

Passing a datetime.datetime object for author_date or commit_date causes a mypy type error, these dates are passed to parse_date in git.objects.util, which does accept a datetime.datetime object.

@Byron
Byron merged commit 183cf35 into gitpython-developers:main Oct 14, 2022
@Byron Byron added this to the v3.1.30 - Bugfixes milestone Oct 14, 2022
@Byron

Byron commented Oct 14, 2022

Copy link
Copy Markdown
Member

Thanks a lot, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants