diff --git a/AUTHORS b/AUTHORS index de94646c..8c3fed32 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,8 +12,10 @@ Adrian Tejn Kern Andrew Schaaf Danilo de Jesus da Silva Bellini David LaPalomento +dvogel Filip Noetzel Gary van der Merwe +gfxmonk Gora Khargosh Hannu Valtonen Jesse Printz @@ -25,6 +27,7 @@ Malthe Borch Martin Kreichgauer Martin Kreichgauer Mike Lundy +Nicholas Hairs Raymond Hettinger Roman Ovchinnikov Rotem Yaari @@ -43,9 +46,6 @@ Todd Whiteman Will McGugan Yesudeep Mangalapilly Yesudeep Mangalapilly -dvogel -gfxmonk - We would like to thank these individuals for ideas: --------------------------------------------------- diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 8fad48f8..02e4ce9b 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -52,3 +52,22 @@ file system changes and simply print them to the console:: observer.join() To stop the program, press Control-C. + +Typing +------ +If you are using type annotations it is important to note that +`watchdog.observers.Observer` is not actually a class; it is a variable that +hold the "best" observer class available on your platform. + +In order to correctly type your own code your should use +`watchdog.observers.api.BaseObserver`. For example: + + from watchdog.observers import Observer + from watchdog.observers.api import BaseObserver + + def my_func(obs: BaseObserver) -> None: + # Do something with obs + pass + + observer: BaseObserver = Observer() + my_func(observer)