From 5e06f72c35ea8219f79b790b833da5b87b6a8d11 Mon Sep 17 00:00:00 2001 From: "R. Richard" Date: Tue, 25 Jun 2019 11:32:11 +0200 Subject: [PATCH] Rename private methods to be underscored --- lib/tfw/components/inotify/inotify.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tfw/components/inotify/inotify.py b/lib/tfw/components/inotify/inotify.py index 24abb8c..80b7902 100644 --- a/lib/tfw/components/inotify/inotify.py +++ b/lib/tfw/components/inotify/inotify.py @@ -74,10 +74,10 @@ class InotifyObserver: self._reset(paths, patterns, exclude) def _reset(self, paths, patterns, exclude): - dispatch_event = self.dispatch_event + _dispatch_event = self._dispatch_event class TransformerEventHandler(PatternMatchingEventHandler): def on_any_event(self, event): - dispatch_event(event) + _dispatch_event(event) self.handler = TransformerEventHandler(patterns, exclude) self._observer.unschedule_all() if isinstance(paths, str): @@ -122,7 +122,7 @@ class InotifyObserver: self._observer.stop() self._observer.join() - def dispatch_event(self, event): + def _dispatch_event(self, event): event_to_action = { InotifyFileCreatedEvent : self.on_created, InotifyFileModifiedEvent : self.on_modified, @@ -134,12 +134,12 @@ class InotifyObserver: InotifyDirDeletedEvent : self.on_deleted } - event = self.transform_event(event) + event = self._transform_event(event) self.on_any_event(event) event_to_action[type(event)](event) @staticmethod - def transform_event(event): + def _transform_event(event): watchdog_to_inotify = { FileCreatedEvent : InotifyFileCreatedEvent, FileModifiedEvent : InotifyFileModifiedEvent,