Core: fix (typing) mistake in PR #2887 (#2891)

I made this variable for more compatible and safer type narrowing, and then I didn't use if for the type narrowing.
This commit is contained in:
Doug Hoskisson 2024-03-03 23:26:52 -08:00 committed by GitHub
parent a70b94fd62
commit ecec931e9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class APContainer:
message = "" message = ""
if len(e.args): if len(e.args):
arg0 = e.args[0] arg0 = e.args[0]
if isinstance(e.args[0], str): if isinstance(arg0, str):
message = f"{arg0} - " message = f"{arg0} - "
raise InvalidDataError(f"{message}This might be the incorrect world version for this file") from e raise InvalidDataError(f"{message}This might be the incorrect world version for this file") from e