Skip to content

Commit

Permalink
[watchmedo] Log FileOpenedEvent, and FileClosedEvent, events in `…
Browse files Browse the repository at this point in the history
…LoggerTrick`
  • Loading branch information
BoboTiG committed Feb 27, 2023
1 parent 25a2d1f commit b4a8a14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog

- Run ``black`` on the entire source code
- [watchmedo] Exclude ``FileOpenedEvent`` events from ``AutoRestartTrick``, and ``ShellCommandTrick``, to restore watchdog < 2.3.0 behavior. A better solution should be found in the future. (`#949 <https://github.com/gorakhargosh/watchdog/pull/949>`__)
- [watchmedo] Log ``FileOpenedEvent``, and ``FileClosedEvent``, events in ``LoggerTrick``
- Thanks to our beloved contributors: @BoboTiG

2.3.0
Expand Down
8 changes: 8 additions & 0 deletions src/watchdog/tricks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ def on_created(self, event):
def on_moved(self, event):
pass

@echo_events
def on_closed(self, event):
pass

@echo_events
def on_opened(self, event):
pass


class ShellCommandTrick(Trick):

Expand Down

0 comments on commit b4a8a14

Please sign in to comment.