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

bug: fixes flake8==6.1.0 bug, unpins flake8==6.0.0 #211

Merged
merged 4 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 4 additions & 2 deletions db_dtypes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ def astype(self, dtype, copy=True):
def _cmp_method(self, other, op):
"""Compare array values, for use in OpsMixin."""

if is_scalar(other) and (pandas.isna(other) or type(other) == self.dtype.type):
if is_scalar(other) and (
pandas.isna(other) or isinstance(other, self.dtype.type)
):
other = type(self)([other])

if type(other) != type(self):
if type(other) is not type(self):
return NotImplemented

oshape = getattr(other, "shape", None)
Expand Down
7 changes: 1 addition & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

import nox

# Pin flake8 to 6.0.0
# See https://github.com/googleapis/python-db-dtypes-pandas/issues/199
FLAKE8_VERSION = "flake8==6.0.0"

BLACK_VERSION = "black==22.3.0"
ISORT_VERSION = "isort==5.10.1"
LINT_PATHS = ["docs", "db_dtypes", "tests", "noxfile.py", "setup.py"]
Expand Down Expand Up @@ -88,7 +84,7 @@ def lint(session):
Returns a failure if the linters find linting errors or sufficiently
serious code quality issues.
"""
session.install(FLAKE8_VERSION, BLACK_VERSION)
session.install("flake8", BLACK_VERSION)
session.run(
"black",
"--check",
Expand Down Expand Up @@ -287,7 +283,6 @@ def unit_prerelease(session):


def install_systemtest_dependencies(session, *constraints):

# Use pre-release gRPC for system tests.
# Exclude version 1.52.0rc1 which has a known issue.
# See https://github.com/grpc/grpc/issues/32163
Expand Down
Loading