Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mypy Unused "type: ignore" comment, use narrower... errors #1016

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/watchdog/observers/fsevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import time
import unicodedata

import _watchdog_fsevents as _fsevents # type: ignore[import]
import _watchdog_fsevents as _fsevents # type: ignore[import-not-found]

from watchdog.events import (
DirCreatedEvent,
Expand Down
4 changes: 2 additions & 2 deletions src/watchdog/observers/fsevents2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
from typing import List, Optional, Type

# pyobjc
import AppKit # type: ignore[import]
from FSEvents import ( # type: ignore[import]
import AppKit # type: ignore[import-not-found]
from FSEvents import ( # type: ignore[import-not-found]
CFRunLoopGetCurrent,
CFRunLoopRun,
CFRunLoopStop,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fsevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from time import sleep
from unittest.mock import patch

import _watchdog_fsevents as _fsevents # type: ignore[import]
import _watchdog_fsevents as _fsevents # type: ignore[import-not-found]

from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
Expand Down
2 changes: 1 addition & 1 deletion tests/test_skip_repeats_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_consecutives_allowed_across_empties():
@cpython_only
def test_eventlet_monkey_patching():
try:
import eventlet # type: ignore[import]
import eventlet # type: ignore[import-untyped]
except Exception:
pytest.skip("eventlet not installed")

Expand Down
Loading