From ac4fe6efbccc2ad5c2044bf36e34019363018630 Mon Sep 17 00:00:00 2001 From: Robert Westman Date: Sat, 5 Jun 2021 12:22:24 +0200 Subject: Fixes type check for is_valid_object --- git/repo/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/repo/base.py') diff --git a/git/repo/base.py b/git/repo/base.py index e7b1274b..b19503ee 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -620,7 +620,7 @@ class Repo(object): raise return True - def is_valid_object(self, sha: str, object_type: Union['blob', 'commit', 'tree', 'tag'] = None) -> bool: + def is_valid_object(self, sha: str, object_type: str = None) -> bool: try: complete_sha = self.odb.partial_to_complete_sha_hex(sha) object_info = self.odb.info(complete_sha) -- cgit v1.2.1