Skip to content

Commit

Permalink
Fix __all__ specification in __init__.py files (#4265)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Aug 5, 2022
1 parent f9045cc commit 54746ad
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 0 additions & 1 deletion py-polars/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ extend-ignore =
SIM102, SIM117,

per-file-ignores =
__init__.py:F401
tests/*.py: E101, W191
extend-exclude =
# Automatically generated test artifacts
Expand Down
17 changes: 13 additions & 4 deletions py-polars/polars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def version() -> str:
ShapeError,
)
from polars.internals.expr import Expr
from polars.internals.frame import DataFrame, wrap_df # TODO: remove need for wrap_df

# TODO remove need for wrap_df
from polars.internals.frame import wrap_df # noqa: F401
from polars.internals.frame import DataFrame
from polars.internals.functions import concat, cut, date_range, get_dummies
from polars.internals.io import read_ipc_schema, read_parquet_schema
from polars.internals.lazy_frame import LazyFrame
Expand Down Expand Up @@ -107,7 +110,10 @@ def version() -> str:
)
from polars.internals.lazy_functions import to_list as list
from polars.internals.lazy_functions import var
from polars.internals.series import Series, wrap_s # TODO: remove need for wrap_s

# TODO: remove need for wrap_s
from polars.internals.series import wrap_s # noqa: F401
from polars.internals.series import Series
from polars.internals.whenthen import when
from polars.io import (
read_avro,
Expand All @@ -122,8 +128,7 @@ def version() -> str:
scan_ipc,
scan_parquet,
)
from polars.string_cache import toggle_string_cache # We do not export in __all__
from polars.string_cache import StringCache
from polars.string_cache import StringCache, toggle_string_cache
from polars.utils import threadpool_size

__all__ = [
Expand Down Expand Up @@ -162,9 +167,12 @@ def version() -> str:
"Categorical",
"Field",
"Struct",
"Null",
"PolarsDataType",
"get_idx_type",
# polars.io
"read_csv",
"read_excel",
"read_parquet",
"read_json",
"read_sql",
Expand All @@ -178,6 +186,7 @@ def version() -> str:
"read_avro",
# polars.stringcache
"StringCache",
"toggle_string_cache",
# polars.config
"Config",
# polars.internal.when
Expand Down
3 changes: 3 additions & 0 deletions py-polars/polars/internals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
"Series",
"all",
"arg_where",
"argsort_by",
"col",
"concat",
"concat_list",
"date_range",
"element",
"expr_to_lit_or_expr",
"format",
Expand All @@ -53,6 +55,7 @@
"wrap_expr",
"wrap_ldf",
"wrap_s",
"_deser_and_exec",
"_is_local_file",
"_prepare_file_arg",
"_scan_ds",
Expand Down

0 comments on commit 54746ad

Please sign in to comment.