hanjinliu / magic-class

Generate multifunctional and macro recordable GUIs from Python classes
https://hanjinliu.github.io/magic-class/
BSD 3-Clause "New" or "Revised" License
40 stars 5 forks source link

Add python 3.12 #123

Closed hanjinliu closed 1 year ago

hanjinliu commented 1 year ago

Summary by CodeRabbit

Release Notes for the Pull Request:

coderabbitai[bot] commented 1 year ago

Walkthrough

This update brings enhancements to the codebase, focusing on error handling, resource management, and compatibility. It introduces support for Python 3.12 in CI/CD, improves parentheses matching logic, handles additional exceptions, manages plot resources better, and ensures attribute existence before assignment. The use of typing_extensions module is also noted.

Changes

File Summary
.github/workflows/test.yml Added support for Python 3.12 in the CI/CD configuration.
magicclass/widgets/codeedit.py Improved parentheses matching logic in _new_line_event method.
magicclass/widgets/logger.py, magicclass/widgets/plot.py Enhanced error handling and resource management by suppressing OSError and closing all plots before backend switch.
magicclass/fields/_fields.py Ensured attribute existence in __set_name__ method before assignment.
tests/test_fields.py Switched from typing.Annotated to typing_extensions.Annotated.

🐇💻

Code changes here, code changes there,

With each pull request, we show we care.

From handling errors to managing plots,

We're improving our code, connecting the dots.

So here's to the devs, with their keyboards a-tap,

Making magic happen, one code snap after snap! 🎉

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume. - Additionally, enter `@coderabbitai pause` to halt the bot's ongoing reviews as any issue or review comment. To resume reviews, enter `@coderabbitai resume` as any issue or review comment.