updates for new version of black
MODIFY
fastavro/_write_py.py
fastavro/_write_py.py
@@ -177,7 +177,6 @@ def write_union(encoder, datum, schema, named_schemas, fname, options):
could_be_float = False
for index, candidate in enumerate(schema):
-
if could_be_float:
if extract_record_type(candidate) == "double":
best_match_index = index

MODIFY
fastavro/utils.py
fastavro/utils.py
@@ -23,7 +23,6 @@ def _gen_utf8() -> str:
def gen_data(schema: Schema, named_schemas: NamedSchemas, index: int) -> Any:
-
record_type = extract_record_type(schema)
if record_type == "null":

MODIFY
publish.sh
publish.sh
@@ -35,8 +35,10 @@ PyVers="38
for os in $OSes; do
for pyver in $PyVers; do
- if [[ ${os} == "macosx_10_15_x86_64" && ${pyver} == "310" ]]; then
- wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp${pyver}-cp${pyver}-macosx_10_14_x86_64.whl
+ if [[ ${os} == "macosx_10_15_x86_64" && ${pyver} == "39" ]]; then
+ wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp${pyver}-cp${pyver}-macosx_11_0_x86_64.whl
+ elif [[ ${os} == "macosx_10_15_x86_64" && ${pyver} == "310" ]]; then
+ wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp${pyver}-cp${pyver}-macosx_11_0_x86_64.whl
elif [[ ${os} == "macosx_10_15_x86_64" && ${pyver} == "311" ]]; then
wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp${pyver}-cp${pyver}-macosx_10_9_universal2.whl
else

MODIFY
tests/test_block_reader.py
tests/test_block_reader.py
@@ -54,7 +54,6 @@ def check_block(block, num_bytes, num_records, records, codec, offset, size):
def check_round_trip(write_to_disk):
-
blocks, records, bytes = make_blocks(write_to_disk=write_to_disk)
assert bytes == 46007
@@ -65,7 +64,6 @@ def check_round_trip(write_to_disk):
def check_round_trip_deflated(write_to_disk):
-
blocks, records, bytes = make_blocks(codec="deflate", write_to_disk=write_to_disk)
assert bytes == 16543

MODIFY
tests/test_schema_evolution.py
tests/test_schema_evolution.py
@@ -674,7 +674,6 @@ def test_union_writer_simple_reader():
writer_schema = INT_LONG_FLOAT_DOUBLE_UNION
writer_data = ("float", generate_one("float"))
for reader_schema in INT_LONG_FLOAT_DOUBLE_UNION:
-
bio = BytesIO()
fastavro.writer(bio, writer_schema, [writer_data])
bio.seek(0)
@@ -693,7 +692,6 @@ def test_writer_enum_more_symbols_than_reader_enum():
reader_schema = ENUM_AB
for symbol in writer_schema["symbols"]:
-
bio = BytesIO()
fastavro.writer(bio, writer_schema, [symbol])
bio.seek(0)

updates for new version of black