-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏷️ stub
_datasource
and fix _npyio_impl
- Loading branch information
Showing
4 changed files
with
155 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from _typeshed import OpenBinaryMode, OpenTextMode | ||
from pathlib import Path | ||
from typing import IO, Any, TypeAlias | ||
|
||
_Mode: TypeAlias = OpenBinaryMode | OpenTextMode | ||
|
||
### | ||
|
||
# exported in numpy.lib.nppyio | ||
class DataSource: | ||
def __init__(self, /, destpath: Path | str | None = ...) -> None: ... | ||
def __del__(self, /) -> None: ... | ||
def abspath(self, /, path: str) -> str: ... | ||
def exists(self, /, path: str) -> bool: ... | ||
|
||
# Whether the file-object is opened in string or bytes mode (by default) | ||
# depends on the file-extension of `path` | ||
def open(self, /, path: str, mode: _Mode = "r", encoding: str | None = None, newline: str | None = None) -> IO[Any]: ... | ||
|
||
class Repository(DataSource): | ||
def __init__(self, /, baseurl: str, destpath: str | None = ...) -> None: ... | ||
def listdir(self, /) -> list[str]: ... | ||
|
||
def open( | ||
path: str, | ||
mode: _Mode = "r", | ||
destpath: str | None = ..., | ||
encoding: str | None = None, | ||
newline: str | None = None, | ||
) -> IO[Any]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from numpy.lib._npyio_impl import ( | ||
DataSource as DataSource, | ||
NpzFile as NpzFile, | ||
__doc__ as __doc__, | ||
) |
Oops, something went wrong.