From 66d9f47a97286758c3df7acfde1b1117122255c7 Mon Sep 17 00:00:00 2001 From: David Brochart Date: Sun, 20 Nov 2022 21:02:39 +0100 Subject: [PATCH] Simplify Change.raw_str() (#211) --- watchfiles/main.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/watchfiles/main.py b/watchfiles/main.py index 105cdb4e..c4dc0d90 100644 --- a/watchfiles/main.py +++ b/watchfiles/main.py @@ -28,12 +28,7 @@ class Change(IntEnum): """A file or directory was deleted.""" def raw_str(self) -> str: - if self == Change.added: - return 'added' - elif self == Change.modified: - return 'modified' - else: - return 'deleted' + return self.name FileChange = Tuple[Change, str]