Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(python): Bump ruff from 0.2.0 to 0.3.0 in /py-polars #14800

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/test_bytecode_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

Running it without `PYTHONPATH` set will result in the test failing.
"""

import datetime as dt # noqa: F401
import subprocess
from datetime import datetime # noqa: F401
Expand Down
1 change: 1 addition & 0 deletions docs/src/python/user-guide/misc/multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def main():

# --8<-- [end:example1]
"""

# --8<-- [start:example2]
import multiprocessing
import polars as pl
Expand Down
1 change: 1 addition & 0 deletions py-polars/polars/_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

Functions that are part of the public API are re-exported here.
"""

from polars._utils.convert import (
date_to_int,
datetime_to_int,
Expand Down
6 changes: 2 additions & 4 deletions py-polars/polars/_utils/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@


@overload
def parse_as_duration_string(td: None) -> None:
...
def parse_as_duration_string(td: None) -> None: ...


@overload
def parse_as_duration_string(td: timedelta | str) -> str:
...
def parse_as_duration_string(td: timedelta | str) -> str: ...


def parse_as_duration_string(td: timedelta | str | None) -> str | None:
Expand Down
6 changes: 2 additions & 4 deletions py-polars/polars/_utils/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ def deprecate_parameter_as_positional(
Use as follows::

@deprecate_parameter_as_positional("column", version="0.20.4")
def myfunc(new_name):
...
def myfunc(new_name): ...
"""

def decorate(function: Callable[P, T]) -> Callable[P, T]:
Expand Down Expand Up @@ -123,8 +122,7 @@ def deprecate_renamed_parameter(
Use as follows::

@deprecate_renamed_parameter("old_name", "new_name", version="0.20.4")
def myfunc(new_name):
...
def myfunc(new_name): ...
"""

def decorate(function: Callable[P, T]) -> Callable[P, T]:
Expand Down
1 change: 1 addition & 0 deletions py-polars/polars/_utils/udfs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities related to user defined functions (such as those passed to `apply`)."""

from __future__ import annotations

import datetime
Expand Down
6 changes: 2 additions & 4 deletions py-polars/polars/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,7 @@ def from_pandas(
rechunk: bool = ...,
nan_to_null: bool = ...,
include_index: bool = ...,
) -> DataFrame:
...
) -> DataFrame: ...


@overload
Expand All @@ -645,8 +644,7 @@ def from_pandas(
rechunk: bool = ...,
nan_to_null: bool = ...,
include_index: bool = ...,
) -> Series:
...
) -> Series: ...


def from_pandas(
Expand Down
1 change: 1 addition & 0 deletions py-polars/polars/dataframe/_html.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for formatting output data in HTML."""

from __future__ import annotations

import os
Expand Down
Loading
Loading