Skip to content

Commit

Permalink
Missing Optional in typing. (#30821)
Browse files Browse the repository at this point in the history
The function checks for None in its first line.
  • Loading branch information
xkszltl authored May 15, 2024
1 parent 64c06df commit 92544cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ def _prepare_generated_length(
return generation_config

def _prepare_generation_config(
self, generation_config: GenerationConfig, **kwargs: Dict
self, generation_config: Optional[GenerationConfig], **kwargs: Dict
) -> Tuple[GenerationConfig, Dict]:
"""
Prepares the base generation config, then applies any generation configuration options from kwargs.
Expand Down

0 comments on commit 92544cb

Please sign in to comment.