-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update deprecated type hints #37
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What’s the minimum version of Python this supports?
@@ -225,15 +223,15 @@ def make_flags_str(flags: Optional[Union[str, List[str]]]) -> str: | |||
# Load decomp-toolkit generated config.json | |||
def load_build_config( | |||
config: ProjectConfig, build_config_path: Path | |||
) -> Optional[Dict[str, Any]]: | |||
) -> dict[str, Any | None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) -> dict[str, Any | None]: | |
) -> dict[str, Any] | None: |
Unless I’m misreading
objects: Dict[str, Object], | ||
build_config: Optional[Dict[str, Any]], | ||
objects: dict[str, Object], | ||
build_config: dict[str, Any | None], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
None # Additional re-configuration dependency files | ||
) | ||
self.custom_build_rules: Optional[List[Dict[str, Any]]] = ( | ||
self.custom_build_rules: list[dict[str, Any | None]] = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
None # Custom ninja build rules | ||
) | ||
self.custom_build_steps: Optional[Dict[str, List[Dict[str, Any]]]] = ( | ||
self.custom_build_steps: dict[str, list[dict[str, Any | None]]] = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good catch, sorry. Will fix.
3.9 for |
If that lets us support older Python versions without type hints, I’m all for it. Even though 3.7 and 3.8 are out of support, it’s nice to not make people upgrade just for type hints. |
No description provided.