Skip to content

Conversation

@TeddiO
Copy link
Owner

@TeddiO TeddiO commented Dec 29, 2025

Essentially prevent the with block from returning an exception, and return False, meaning the only values that should ever be returned are a SteamID64 (string) or False. The exception is still output via the logger as a warning type.

In a future release I might split these out to two separate return values to tighten up typing.

Also added some basic unit tests testing from 3.8 upwards. We should likely bump the minimum version to 3.9 or above soon to take advantage of native type hinting, but for the time being happy to officially leave it as 3.6 support and above.

Also added a GH:A to ensure these tests run fine and dandy.

@TeddiO TeddiO changed the title Add exception handling to reduce the types of data that can be returned Add exception handling to reduce the types of data that can be returned & tests Dec 29, 2025
@TeddiO TeddiO marked this pull request as ready for review December 29, 2025 13:42
@TeddiO TeddiO merged commit 2cfa7ae into master Dec 29, 2025
7 checks passed
@TeddiO TeddiO deleted the exception-handling branch December 29, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants