spyoungtech / ahk

Python wrapper for AutoHotkey with full type support. Harness the automation power of AutoHotkey with the beauty of Python.
MIT License
887 stars 66 forks source link

fix bug where `black.assert_equivalent` no longer raises an AssertionError #310

Closed spyoungtech closed 6 months ago

spyoungtech commented 6 months ago

https://github.com/psf/black/pull/4270 changed black.assert_equivalent to raise an ASTSafetyError exception (a custom exception inheriting from Exception) so catching AssertionError no longer works when developing with recent versions of black

This change makes the code compatible with older and newer versions of black.

coveralls commented 6 months ago

Coverage Status

coverage: 77.477%. remained the same when pulling 17532048efda2af154d1baf45704fe9957f9b927 on fix-pre-commit-hook into de90e941e50a8d7e5ff60cba60d299043d3353fa on main.