Skip to content

Commit 70cd018

Browse files
fix missing imports (mostly with stub files)
1 parent 5835bbf commit 70cd018

File tree

7 files changed

+19
-2
lines changed

7 files changed

+19
-2
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
pip install mypy
4040
pip install -r requirements.txt
4141
pip install urwid twisted watchdog "jedi >=0.16" babel "sphinx >=1.5"
42-
pip install types-backports types-requests types-setuptools types-toml
42+
pip install types-backports types-requests types-setuptools types-toml types-pygments
4343
- name: Check with mypy
4444
# for now only run on a few files to avoid slipping backward
45-
run: mypy --ignore-missing-imports bpython/autocomplete.py
45+
run: mypy bpython/autocomplete.py

stubs/greenlet.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from typing import Any, Callable
2+
__version__: str
3+
def getcurrent() -> None: ...
4+
class greenlet:
5+
def __init__(self, func: Callable[[], Any]): ...
6+
def switch(self, value: Any=None) -> Any: ...

stubs/pyperclip.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def copy(content: str): ...
2+
class PyperclipException(Exception): ...

stubs/watchdog/__init__.pyi

Whitespace-only changes.

stubs/watchdog/events.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class FileSystemEventHandler: ...

stubs/watchdog/observers.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
class Observer:
3+
def start(self): ...
4+
def schedule(self, dirname: str, recursive:bool): ...
5+
def unschedule_all(self): ...

stubs/xdg.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from typing import ClassVar
2+
class BaseDirectory:
3+
xdg_config_home: ClassVar[str]

0 commit comments

Comments
 (0)