Skip to content

chore: format code files with nox #281

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

Merged
merged 2 commits into from
Jul 8, 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
4 changes: 1 addition & 3 deletions db_dtypes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
import pyarrow
import pyarrow.compute


from db_dtypes.version import __version__
from db_dtypes import core

from db_dtypes.version import __version__

date_dtype_name = "dbdate"
time_dtype_name = "dbtime"
Expand Down
1 change: 0 additions & 1 deletion db_dtypes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

from db_dtypes import pandas_backports


pandas_release = pandas_backports.pandas_release


Expand Down
1 change: 0 additions & 1 deletion db_dtypes/pandas_backports.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import pandas.compat.numpy.function
import pandas.core.nanops


pandas_release = packaging.version.parse(pandas.__version__).release

# Create aliases for private methods in case they move in a future version.
Expand Down
1 change: 0 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import os
import pathlib
import re
import re
import shutil
from typing import Dict, List
import warnings
Expand Down
2 changes: 2 additions & 0 deletions samples/snippets/pandas_date_and_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def pandas_date_and_time():
# [START bigquery_pandas_date_create]

import datetime

import pandas as pd

import db_dtypes # noqa import to register dtypes

dates = pd.Series([datetime.date(2021, 9, 17), "2021-9-18"], dtype="dbdate")
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io
import os
import re

from setuptools import setup

# Package metadata.
Expand Down
3 changes: 1 addition & 2 deletions tests/compliance/date/test_date_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
"""

import pandas
from pandas.tests.extension import base
import pandas._testing as tm
from pandas.tests.extension import base
import pytest

import db_dtypes


# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/87): Add
# compliance tests for arithmetic operations.

Expand Down
3 changes: 1 addition & 2 deletions tests/compliance/time/test_time_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
"""

import pandas
from pandas.tests.extension import base
import pandas._testing as tm
from pandas.tests.extension import base
import pytest

import db_dtypes


# TODO(https://github.com/googleapis/python-db-dtypes-pandas/issues/87): Add
# compliance tests for arithmetic operations.

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import db_dtypes


SECOND_NANOS = 1_000_000_000
MINUTE_NANOS = 60 * SECOND_NANOS
HOUR_NANOS = 60 * MINUTE_NANOS
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import db_dtypes
from db_dtypes import pandas_backports


VALUE_PARSING_TEST_CASES = [
# Min/Max values for pandas.Timestamp.
("1677-09-22", datetime.date(1677, 9, 22)),
Expand Down