4343from .config import Config
4444from .enums import (
4545 AttrCheck ,
46+ BlameFlag ,
4647 BranchType ,
4748 CheckoutStrategy ,
4849 DiffOption ,
@@ -534,7 +535,7 @@ def state_cleanup(self):
534535 #
535536 # blame
536537 #
537- def blame (self , path , flags = None , min_match_characters = None ,
538+ def blame (self , path , flags : BlameFlag = BlameFlag . NORMAL , min_match_characters = None ,
538539 newest_commit = None , oldest_commit = None , min_line = None ,
539540 max_line = None ):
540541 """
@@ -546,7 +547,7 @@ def blame(self, path, flags=None, min_match_characters=None,
546547 Path to the file to blame.
547548
548549 flags
549- A GIT_BLAME_* constant.
550+ An enums.BlameFlag constant.
550551
551552 min_match_characters
552553 The number of alphanum chars that must be detected as moving/copying
@@ -566,13 +567,13 @@ def blame(self, path, flags=None, min_match_characters=None,
566567
567568 Examples::
568569
569- repo.blame('foo.c', flags=GIT_BLAME_TRACK_COPIES_SAME_FILE )
570+ repo.blame('foo.c', flags=enums.BlameFlag.IGNORE_WHITESPACE )
570571 """
571572
572573 options = ffi .new ('git_blame_options *' )
573574 C .git_blame_options_init (options , C .GIT_BLAME_OPTIONS_VERSION )
574575 if flags :
575- options .flags = flags
576+ options .flags = int ( flags )
576577 if min_match_characters :
577578 options .min_match_characters = min_match_characters
578579 if newest_commit :
0 commit comments