Skip to content

Commit

Permalink
feat!: more kwarg-only
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Aug 22, 2024
1 parent cc05691 commit 31b0c34
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/watchdog/observers/fsevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _encode_path(self, path: bytes | str) -> bytes | str:


class FSEventsObserver(BaseObserver):
def __init__(self, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
def __init__(self, *, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
super().__init__(FSEventsEmitter, timeout=timeout)

def schedule(
Expand Down
2 changes: 1 addition & 1 deletion src/watchdog/observers/fsevents2.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,5 @@ def queue_events(self, timeout: int) -> None:


class FSEventsObserver2(BaseObserver):
def __init__(self, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
def __init__(self, *, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
super().__init__(FSEventsEmitter, timeout=timeout)
2 changes: 1 addition & 1 deletion src/watchdog/observers/kqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,5 +651,5 @@ class KqueueObserver(BaseObserver):
calls to event handlers.
"""

def __init__(self, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
def __init__(self, *, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
super().__init__(KqueueEmitter, timeout=timeout)
2 changes: 1 addition & 1 deletion src/watchdog/observers/polling.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(self, *, timeout: int = DEFAULT_OBSERVER_TIMEOUT) -> None:
class PollingObserverVFS(BaseObserver):
"""File system independent observer that polls a directory to detect changes."""

def __init__(self, stat: Callable, listdir: Callable, polling_interval: int = 1) -> None:
def __init__(self, stat: Callable, listdir: Callable, *, polling_interval: int = 1) -> None:
""":param stat: stat function. See ``os.stat`` for details.
:param listdir: listdir function. See ``os.scandir`` for details.
:type polling_interval: float
Expand Down

0 comments on commit 31b0c34

Please sign in to comment.