Skip to content

Commit

Permalink
fix: liniting
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Oct 1, 2024
1 parent 359a97b commit 81d634c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion py-polars/tests/unit/operations/test_bitwise.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import sys
import typing

import pytest

Expand Down Expand Up @@ -94,6 +95,7 @@ def trailing_ones(v: int | None) -> int | None:
],
)
@pytest.mark.skipif(sys.version_info < (3, 10), reason="bit_count introduced in 3.10")
@typing.no_type_check()
def test_bit_counts(value: int, dtype: pl.DataType) -> None:
bitsize = 8
if "Boolean" in str(dtype):
Expand All @@ -116,7 +118,7 @@ def test_bit_counts(value: int, dtype: pl.DataType) -> None:
if dtype.is_signed_integer() and value >> (bitsize - 1) > 0:
value = value - pow(2, bitsize - 1)

co = value.bit_count() # type: ignore[attr-defined]
co = value.bit_count()
cz = bitsize - co
else:
co = None
Expand Down

0 comments on commit 81d634c

Please sign in to comment.