Commit Graph

17 Commits

Author SHA1 Message Date
Arjan Molenaar
6ba5c1f032
Add unit test for logging 2023-05-22 09:32:41 +02:00
pre-commit-ci[bot]
ed866fdf71
[pre-commit.ci] pre-commit autoupdate (#294)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)
- [github.com/charliermarsh/ruff-pre-commit: v0.0.237 → v0.0.242](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.237...v0.0.242)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-06 18:52:10 -05:00
Dan Yeaw
387e53d5b2
Switch linting to ruff 2023-02-02 22:16:05 -05:00
pre-commit-ci[bot]
d4d0ece49e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-11-20 03:12:27 +00:00
Dan Yeaw
6513631bc2
Sourcery refactoring 2022-11-19 22:09:49 -05:00
Dan Yeaw
599fd85141
Move mypy config to pyproject.toml 2022-11-19 22:03:14 -05:00
pre-commit-ci[bot]
640e0710a5
[pre-commit.ci] pre-commit autoupdate (#239)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0)
- [github.com/pre-commit/mirrors-mypy: v0.981 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.981...v0.982)
- [github.com/asottile/pyupgrade: v2.38.2 → v3.0.0](https://github.com/asottile/pyupgrade/compare/v2.38.2...v3.0.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-10 18:54:50 -04:00
Arjan Molenaar
557eb22e30
Event manager executes all handlers
It accumulates the exceptions and raises an ExceptionGroup
exception if there were any failures.

Rationale:

Event handlers should not be dependent on the order in which they
are executed.

If a handler fails the remaining handlers are not executed.
This can result in non-deterministic behavior.

This commit fixes that my allowing all handlers to be executed.

To make this work we use the (backported) ExceptionGroup from
Python 3.11.
2022-05-08 13:28:21 +02:00
Dan Yeaw
15627f607f
Enable pyupgrade to modernize syntax 2021-07-03 15:13:29 -04:00
Dan Yeaw
b33155a79f
Enable docformatter pre-commit checks
Signed-off-by: Dan Yeaw <dan@yeaw.me>
2020-09-15 19:50:55 -04:00
Dan Yeaw
8714be7aac
Add flake8 to pre-commit
Signed-off-by: Dan Yeaw <dan@yeaw.me>
2020-08-28 22:13:46 -04:00
Dan Yeaw
34f7a524bc
Add isort, check-toml, and check-yaml to pre-commit
Signed-off-by: Dan Yeaw <dan@yeaw.me>
2020-08-28 22:08:26 -04:00
Arjan Molenaar
afb1a7996f Fix error in multimethod's otherwise clause 2019-11-09 19:27:15 +01:00
Arjan Molenaar
7b7041173e Add back generic methods
From the old code, updated to Python 3.
2019-11-08 17:40:14 +01:00
Arjan Molenaar
8aba6a7955 Add back multimethod support in a separate module
Note that overriding is no longer possible from within the same class!
2019-11-08 17:27:16 +01:00
Arjan Molenaar
bb20f6992b Replace old code by Python3 implementation from Gaphor
Multimethods are missing now. Those have to be added back.
2019-11-08 16:35:11 +01:00
Arjan Molenaar
b7f4d5b12c Move tests to toplevel 2019-11-08 13:52:19 +01:00