Closed hanjinliu closed 1 year ago
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.
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! 🎉
Summary by CodeRabbit
Release Notes for the Pull Request:
magicclass/widgets/codeedit.py
to automatically insert a new line with appropriate indentation based on the context.magicclass/widgets/logger.py
andmagicclass/widgets/plot.py
by addingOSError
to the suppress context manager and closing all open figures before changing the backend, respectively.magicclass/fields/_fields.py
to check if attribute name exists in the owner class's annotations before assignment, preventing potential errors.typing.Annotated
totyping_extensions.Annotated
intests/test_fields.py
for type hinting..github/workflows/test.yml
to include Python version 3.12.