-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e259413
commit 392bd2b
Showing
354 changed files
with
906,236 additions
and
182,963 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,41 @@ | ||
import sys | ||
from pathlib import Path | ||
|
||
from mypy.stubgen import Options as StubOptions | ||
from mypy.stubgen import generate_stubs | ||
|
||
IMPORT_PATHS = [ | ||
Path("polars", "expr", "expr"), | ||
Path("polars", "series", "series"), | ||
Path("polars", "lazyframe", "frame"), | ||
Path("polars", "dataframe", "frame"), | ||
] | ||
|
||
|
||
if __name__ == "__main__": | ||
output_dir = sys.argv[1] | ||
modules = [".".join(import_path.parts) for import_path in IMPORT_PATHS] | ||
include_docstrings = sys.argv[2] == "true" | ||
options = StubOptions( | ||
inspect=True, | ||
# 'module_file' contains the base class | ||
# onto which dynamic methods are registered | ||
files=[], | ||
output_dir=output_dir, | ||
include_private=True, | ||
export_less=False, | ||
# standard params (not auto-defaulted) | ||
pyversion=sys.version_info[:2], | ||
interpreter=sys.executable, | ||
ignore_errors=False, | ||
parse_only=False, | ||
no_import=False, | ||
search_path=["."], | ||
doc_dir="", | ||
packages=[], | ||
modules=modules, | ||
verbose=True, # TODO: change this, but nice for debugging now | ||
quiet=False, | ||
include_docstrings=include_docstrings, | ||
) | ||
generate_stubs(options) |
Oops, something went wrong.