Skip to content

Commit

Permalink
Remove underscores from submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Mar 1, 2024
1 parent fd3af18 commit 5a3134d
Show file tree
Hide file tree
Showing 52 changed files with 83 additions and 83 deletions.
4 changes: 2 additions & 2 deletions py-polars/polars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
__register_startup_deps()

from polars import api
from polars._utils._polars_version import get_polars_version as _get_polars_version
from polars._utils.polars_version import get_polars_version as _get_polars_version

# TODO: remove need for importing wrap utils at top level
from polars._utils._wrap import wrap_df, wrap_s # noqa: F401
from polars._utils.wrap import wrap_df, wrap_s # noqa: F401
from polars.config import Config
from polars.convert import (
from_arrow,
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Functions that are part of the public API are re-exported here.
"""
from polars._utils._scan import _execute_from_rust
from polars._utils.convert import (
date_to_int,
datetime_to_int,
Expand All @@ -15,6 +14,7 @@
to_py_time,
to_py_timedelta,
)
from polars._utils.scan import _execute_from_rust
from polars._utils.various import NoDefault, _polars_warn, is_column, no_default

__all__ = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import TYPE_CHECKING, Any, Awaitable, Generator, Generic, TypeVar

from polars._utils._wrap import wrap_df
from polars._utils.wrap import wrap_df
from polars.dependencies import _GEVENT_AVAILABLE

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._wrap import wrap_df, wrap_s
from polars._utils.various import (
_is_generator,
arrlen,
find_stacklevel,
parse_version,
range_to_series,
)
from polars._utils.wrap import wrap_df, wrap_s
from polars.datatypes import (
INTEGER_DTYPES,
N_INFER_DEFAULT,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._construction import (
from polars._utils.construction import (
arrow_to_pydf,
dict_to_pydf,
frame_to_pydf,
Expand All @@ -42,8 +42,6 @@
sequence_to_pydf,
series_to_pydf,
)
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr, wrap_ldf, wrap_s
from polars._utils.convert import parse_as_duration_string
from polars._utils.deprecation import (
deprecate_function,
Expand All @@ -54,6 +52,7 @@
deprecate_saturating,
issue_deprecation_warning,
)
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.unstable import issue_unstable_warning, unstable
from polars._utils.various import (
_prepare_row_index_args,
Expand All @@ -68,6 +67,7 @@
scale_bytes,
warn_null_comparison,
)
from polars._utils.wrap import wrap_expr, wrap_ldf, wrap_s
from polars.dataframe._html import NotebookFormatter
from polars.dataframe.group_by import DynamicGroupBy, GroupBy, RollingGroupBy
from polars.datatypes import (
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from typing import TYPE_CHECKING, Callable, Sequence

from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr

if TYPE_CHECKING:
from datetime import date, datetime, time
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from typing import TYPE_CHECKING

from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr

if TYPE_CHECKING:
from polars import Expr
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from typing import TYPE_CHECKING

from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import deprecate_function
from polars._utils.wrap import wrap_expr

if TYPE_CHECKING:
from polars import Expr
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.convert import parse_as_duration_string
from polars._utils.deprecation import (
deprecate_function,
Expand All @@ -15,7 +13,9 @@
issue_deprecation_warning,
rename_use_earliest_to_ambiguous,
)
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.unstable import unstable
from polars._utils.wrap import wrap_expr
from polars.datatypes import DTYPE_TEMPORAL_UNITS, Date, Int32

if TYPE_CHECKING:
Expand Down
10 changes: 5 additions & 5 deletions py-polars/polars/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._parse_expr_input import (
parse_as_expression,
parse_as_list_of_expressions,
parse_predicates_constraints_as_expression,
)
from polars._utils.convert import negate_duration_string, parse_as_duration_string
from polars._utils.deprecation import (
deprecate_function,
Expand All @@ -39,6 +34,11 @@
deprecate_saturating,
issue_deprecation_warning,
)
from polars._utils.parse_expr_input import (
parse_as_expression,
parse_as_list_of_expressions,
parse_predicates_constraints_as_expression,
)
from polars._utils.unstable import issue_unstable_warning, unstable
from polars._utils.various import (
BUILDING_SPHINX_DOCS,
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import (
deprecate_renamed_function,
deprecate_renamed_parameter,
)
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr

if TYPE_CHECKING:
from datetime import date, datetime, time
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from pathlib import Path
from typing import TYPE_CHECKING, Literal, overload

from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import (
deprecate_nonkeyword_arguments,
deprecate_renamed_function,
)
from polars._utils.various import normalize_filepath
from polars._utils.wrap import wrap_expr
from polars.exceptions import ComputeError

if TYPE_CHECKING:
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import (
deprecate_renamed_function,
deprecate_renamed_parameter,
issue_deprecation_warning,
rename_use_earliest_to_ambiguous,
)
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.various import find_stacklevel
from polars._utils.wrap import wrap_expr
from polars.datatypes import Date, Datetime, Int32, Time, py_type_to_dtype
from polars.datatypes.constants import N_INFER_DEFAULT
from polars.exceptions import ChronoFormatWarning
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import TYPE_CHECKING, Sequence

from polars._utils._wrap import wrap_expr
from polars._utils.wrap import wrap_expr

if TYPE_CHECKING:
from polars import Expr
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/whenthen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from typing import TYPE_CHECKING, Any, Iterable

import polars.functions as F
from polars._utils._parse_expr_input import (
from polars._utils.parse_expr_input import (
parse_as_expression,
parse_when_inputs,
)
from polars._utils._wrap import wrap_expr
from polars._utils.wrap import wrap_expr
from polars.expr.expr import Expr

if TYPE_CHECKING:
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/functions/aggregation/horizontal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import TYPE_CHECKING, Iterable

import polars.functions as F
from polars._utils._parse_expr_input import parse_as_list_of_expressions
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import deprecate_renamed_function
from polars._utils.parse_expr_input import parse_as_list_of_expressions
from polars._utils.wrap import wrap_expr
from polars.datatypes import UInt32

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
6 changes: 3 additions & 3 deletions py-polars/polars/functions/as_datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from typing import TYPE_CHECKING, Iterable, overload

from polars import functions as F
from polars._utils._parse_expr_input import (
from polars._utils.deprecation import rename_use_earliest_to_ambiguous
from polars._utils.parse_expr_input import (
parse_as_expression,
parse_as_list_of_expressions,
)
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import rename_use_earliest_to_ambiguous
from polars._utils.wrap import wrap_expr
from polars.datatypes import Date, Struct, Time

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/col.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import contextlib
from typing import TYPE_CHECKING, Any, Iterable, Protocol, cast

from polars._utils._wrap import wrap_expr
from polars._utils.wrap import wrap_expr
from polars.datatypes import is_polars_dtype

plr: Any = None
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/eager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import polars._reexport as pl
from polars import functions as F
from polars._utils._wrap import wrap_df, wrap_expr, wrap_ldf, wrap_s
from polars._utils.various import ordered_unique
from polars._utils.wrap import wrap_df, wrap_expr, wrap_ldf, wrap_s
from polars.exceptions import InvalidOperationError
from polars.type_aliases import ConcatMethod, FrameType

Expand Down
12 changes: 6 additions & 6 deletions py-polars/polars/functions/lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

import polars._reexport as pl
import polars.functions as F
from polars._utils._async import _AioDataFrameResult, _GeventDataFrameResult
from polars._utils._parse_expr_input import (
parse_as_expression,
parse_as_list_of_expressions,
)
from polars._utils._wrap import wrap_df, wrap_expr
from polars._utils.async_ import _AioDataFrameResult, _GeventDataFrameResult
from polars._utils.deprecation import (
deprecate_parameter_as_positional,
deprecate_renamed_function,
issue_deprecation_warning,
)
from polars._utils.parse_expr_input import (
parse_as_expression,
parse_as_list_of_expressions,
)
from polars._utils.unstable import issue_unstable_warning, unstable
from polars._utils.wrap import wrap_df, wrap_expr
from polars.datatypes import DTYPE_TEMPORAL_UNITS, Date, Datetime, Int64, UInt32

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/len.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import contextlib
from typing import TYPE_CHECKING

from polars._utils._wrap import wrap_expr
from polars._utils.wrap import wrap_expr

with contextlib.suppress(ImportError): # Module not available when building docs
import polars.polars as plr
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/lit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from typing import TYPE_CHECKING, Any

import polars._reexport as pl
from polars._utils._wrap import wrap_expr
from polars._utils.convert import (
date_to_int,
datetime_to_int,
time_to_int,
timedelta_to_int,
)
from polars._utils.wrap import wrap_expr
from polars.datatypes import Date, Datetime, Duration, Time
from polars.dependencies import _check_for_numpy
from polars.dependencies import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/functions/range/date_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
from typing import TYPE_CHECKING, overload

from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import (
deprecate_saturating,
issue_deprecation_warning,
)
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr
from polars.functions.range._utils import parse_interval_argument

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/functions/range/datetime_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import TYPE_CHECKING, overload

from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import deprecate_saturating
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr
from polars.functions.range._utils import parse_interval_argument

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/functions/range/int_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from typing import TYPE_CHECKING, overload

from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr, wrap_s
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr, wrap_s
from polars.datatypes import Int64

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/functions/range/time_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from typing import TYPE_CHECKING, overload

from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.deprecation import deprecate_saturating
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr
from polars.functions.range._utils import parse_interval_argument

with contextlib.suppress(ImportError): # Module not available when building docs
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/functions/repeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing import TYPE_CHECKING, Any, overload

from polars import functions as F
from polars._utils._parse_expr_input import parse_as_expression
from polars._utils._wrap import wrap_expr
from polars._utils.parse_expr_input import parse_as_expression
from polars._utils.wrap import wrap_expr
from polars.datatypes import (
FLOAT_DTYPES,
INTEGER_DTYPES,
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/whenthen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING, Any, Iterable

import polars._reexport as pl
from polars._utils._parse_expr_input import parse_when_inputs
from polars._utils.parse_expr_input import parse_when_inputs

with contextlib.suppress(ImportError): # Module not available when building docs
import polars.polars as plr
Expand Down
Loading

0 comments on commit 5a3134d

Please sign in to comment.