Skip to content

Commit

Permalink
docs: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Nov 1, 2024
1 parent a9e11db commit 85998bd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Install from PyPI using ``pip``:
$ python -m pip install -U watchdog
# or to install the watchmedo utility:
$ python -m pip install -U "watchdog[watchmedo]"
$ python -m pip install -U 'watchdog[watchmedo]'
Install from source:

Expand Down
19 changes: 18 additions & 1 deletion changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,25 @@ Changelog

2024-xx-xx • `full history <https://github.com/gorakhargosh/watchdog/compare/v5.0.3...HEAD>`__

- Pin test dependecies.
- [docs] Add typing info to quick start. (`#1082 <https://github.com/gorakhargosh/watchdog/pull/1082>`__)
- [inotify] Use of ``select.poll()`` instead of deprecated ``select.select()``, if available. (`#1078 <https://github.com/gorakhargosh/watchdog/pull/1078>`__)
- Thanks to our beloved contributors: @BoboTiG, @
- [inotify] Fix reading inotify file descriptor after closing it. (`#1081 <https://github.com/gorakhargosh/watchdog/pull/1081>`__)
- [utils] The ``stop_signal`` keyword-argument type of the ``AutoRestartTrick`` class can now be either a ``signal.Signals`` or an ``int``.
- [utils] Added the ``__repr__()`` method to the ``Trick`` class.
- [utils] Removed the unused ``name()`` function from the ``echo`` module.
- [utils] Removed the unused ``is_classmethod()`` function from the ``echo`` module.
- [utils] Removed the unused ``ic_method(met()`` function from the ``echo`` module.
- [utils] Removed the unused ``is_class_private_name()`` function from the ``echo`` module.
- [utils] Removed the unused ``method_name()`` function from the ``echo`` module.
- [utils] Removed the unused ``echo_instancemethod()`` function from the ``echo`` module.
- [utils] Removed the unused ``echo_class()`` function from the ``echo`` module.
- [utils] Removed the unused ``echo_module()`` function from the ``echo`` module.
- [watchmedo] Fixed Mypy issues.
- [watchmedo] Added the ``__repr__()`` method to the ``HelpFormatter`` class.
- [watchmedo] Removed the ``--trace`` CLI argument from the ``watchmedo log`` command, useless since events are logged by default at the ``LoggerTrick`` class level.
- [windows] Fixed Mypy issues.
- Thanks to our beloved contributors: @BoboTiG, @g-pichlern, @ethan-vanderheijden, @nhairs

5.0.3
~~~~~
Expand Down
6 changes: 4 additions & 2 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,18 @@ 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
:class:`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:
:class:`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
Expand Down

0 comments on commit 85998bd

Please sign in to comment.