Skip to content

Commit 7e64b0f

Browse files
committed
Use Optional
1 parent 8978450 commit 7e64b0f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bpython/importcompletion.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ def complete(self, cursor_offset: int, line: str) -> Optional[Set[str]]:
155155
else:
156156
return None
157157

158-
def find_modules(
159-
self, path: Path
160-
) -> Generator[Union[str, None], None, None]:
158+
def find_modules(self, path: Path) -> Generator[Optional[str], None, None]:
161159
"""Find all modules (and packages) for a given directory."""
162160
if not path.is_dir():
163161
# Perhaps a zip file

0 commit comments

Comments
 (0)