move project metadata to pyproject.toml (#555)

also: replace flake8 by ruff.
This commit is contained in:
TW 2023-09-05 03:51:04 +02:00 committed by GitHub
parent 7b75b4f368
commit 423c6df265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 57 additions and 54 deletions

View file

@ -1,7 +1,5 @@
#!/usr/bin/env python
import sys
import pytest
from msgpack import packb, unpackb

View file

@ -1,9 +1,7 @@
#!/usr/bin/env python
import pytest
from array import array
from msgpack import packb, unpackb
import sys
def make_array(f, data):

View file

@ -33,7 +33,7 @@ def test_decode_pairs_hook():
prod_sum = 1 * 2 + 3 * 4
unpacked = unpackb(
packed,
object_pairs_hook=lambda l: sum(k * v for k, v in l),
object_pairs_hook=lambda lst: sum(k * v for k, v in lst),
use_list=1,
strict_map_key=False,
)
@ -48,7 +48,7 @@ def test_only_one_obj_hook():
def test_bad_hook():
with raises(TypeError):
packed = packb([3, 1 + 2j], default=lambda o: o)
unpacked = unpackb(packed, use_list=1)
unpackb(packed, use_list=1)
def _arr_to_str(arr):

View file

@ -3,12 +3,10 @@
from collections import OrderedDict
from io import BytesIO
import struct
import sys
import pytest
from pytest import raises, xfail
from msgpack import packb, unpackb, Unpacker, Packer, pack
from msgpack import packb, unpackb, Unpacker, Packer
def check(data, use_list=False):

View file

@ -34,7 +34,7 @@ def test_exceeding_unpacker_read_size():
read_count = 0
for idx, o in enumerate(unpacker):
assert type(o) == bytes
assert isinstance(o, bytes)
assert o == gen_binary_data(idx)
read_count += 1

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
from msgpack import packb, unpackb
from msgpack import packb
from collections import namedtuple

View file

@ -1,5 +1,4 @@
import pytest
import sys
import datetime
import msgpack
from msgpack.ext import Timestamp