Skip to content

fix: Update __exit__ method to use Optional types#733

Open
AustinZhang1024 wants to merge 1 commit into
python-escpos:masterfrom
AustinZhang1024:patch-1
Open

fix: Update __exit__ method to use Optional types#733
AustinZhang1024 wants to merge 1 commit into
python-escpos:masterfrom
AustinZhang1024:patch-1

Conversation

@AustinZhang1024
Copy link
Copy Markdown

Description

From the newest document, better to allow None in the type hint.

This will fix the invalid-context-manager error of ty.

If the context was exited without an exception, all three arguments will be None.

Tested with

Windows 11

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.

1 participant