Skip to content

Commit b426920

Browse files
partheaohmayr
authored andcommitted
chore: lint
1 parent b3c6e04 commit b426920

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

packages/google-crc32c/src/google_crc32c/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from google_crc32c import cext as impl
2626

2727
implementation = "c"
28-
except ImportError as exc:
28+
except ImportError:
2929
from google_crc32c import python as impl # type: ignore
3030

3131
warnings.warn(_SLOW_CRC32C_WARNING, RuntimeWarning)

packages/google-crc32c/src/google_crc32c/cext.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import struct
16-
1715
# NOTE: ``__config__`` **must** be the first import because it (may)
1816
# modify the search path used to locate shared libraries.
19-
import google_crc32c.__config__ # type: ignore
17+
import google_crc32c.__config__ # noqa: F401
2018
from google_crc32c._checksum import CommonChecksum
2119
from google_crc32c._crc32c import extend # type: ignore
2220
from google_crc32c._crc32c import value # type: ignore

packages/google-crc32c/src/google_crc32c/python.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import array
16-
import struct
1716

1817
from google_crc32c._checksum import CommonChecksum
1918

@@ -71,7 +70,7 @@ def update(self, data):
7170
chunk (Optional[bytes]): a chunk of data used to extend
7271
the CRC32C checksum.
7372
"""
74-
if type(data) != array.array or data.itemsize != 1:
73+
if not isinstance(data, array.array) or data.itemsize != 1:
7574
buffer = array.array("B", data)
7675
else:
7776
buffer = data

0 commit comments

Comments
 (0)