atolat30 commited on
Commit
057cab4
·
1 Parent(s): f04e1d5

Update type hints to use Optional for better Python 3.9 compatibility

Browse files
Files changed (1) hide show
  1. prompt_manager.py +2 -2
prompt_manager.py CHANGED
@@ -1,5 +1,5 @@
1
  from dataclasses import dataclass
2
- from typing import Dict, List, Union, Tuple
3
  from logger_config import logger
4
 
5
  @dataclass
@@ -150,7 +150,7 @@ Adapt your communication style to match the user's level of expertise.""",
150
  Try asking something like:
151
  {examples}"""
152
 
153
- def get_templates(self, aspect_name: Union[str, None]) -> Tuple[str, str]:
154
  """Get system and user templates for the specified aspect."""
155
  logger.debug(f"Getting templates for aspect: {aspect_name}")
156
  if aspect_name is None:
 
1
  from dataclasses import dataclass
2
+ from typing import Dict, List, Optional, Tuple
3
  from logger_config import logger
4
 
5
  @dataclass
 
150
  Try asking something like:
151
  {examples}"""
152
 
153
+ def get_templates(self, aspect_name: Optional[str]) -> Tuple[str, str]:
154
  """Get system and user templates for the specified aspect."""
155
  logger.debug(f"Getting templates for aspect: {aspect_name}")
156
  if aspect_name is None: