fixed some spelling mistakes,
that's all :)
MODIFY
README.md
README.md
@@ -73,9 +73,9 @@ pure Python implementation, comment out `python setup.py build_ext --inplace`
and re-run.
NOTE: Some tests might fail when running the tests locally. An example of this
-is this codec tests. If the supporting codec library is not availabe, the test
+is this codec tests. If the supporting codec library is not available, the test
will fail. These failures can be ignored since the tests will on pull requests
-and will be run in the correct environments with the correct dependecies set up.
+and will be run in the correct environments with the correct dependencies set up.
### Releasing

MODIFY
docs/logical_types.rst
docs/logical_types.rst
@@ -69,7 +69,7 @@ correct. Instead, we want to group it with the `string` like so::
Custom Logical Types
--------------------
-The Avro specification defines a handful of logical types that most implementations support. For example, one of the definied logical types is a microsecond precision timestamp. The specification states that this value will get encoded as an avro `long` type.
+The Avro specification defines a handful of logical types that most implementations support. For example, one of the defined logical types is a microsecond precision timestamp. The specification states that this value will get encoded as an avro `long` type.
For the sake of an example, let's say you want to create a new logical type for a microsecond precision timestamp that uses a string as the underlying avro type.

MODIFY
docs/writer.rst
docs/writer.rst
@@ -8,7 +8,7 @@ fastavro.write
Using the tuple notation to specify which branch of a union to take
-------------------------------------------------------------------
-Since this library uses plain dictionaries to reprensent a record, it is
+Since this library uses plain dictionaries to represent a record, it is
possible for that dictionary to fit the definition of two different records.
For example, given a dictionary like this::
@@ -88,7 +88,7 @@ dictionary. For example::
Using the record hint to specify which branch of a union to take
----------------------------------------------------------------
-In addition to the tuple notation for specifing the name of a record, you can
+In addition to the tuple notation for specifying the name of a record, you can
also include a special `-type` attribute (note that this attribute is `-type`,
not `type`) on a record to do the same thing. So the example above which looked
like this::

MODIFY
fastavro/_read_py.py
fastavro/_read_py.py
@@ -812,7 +812,7 @@ class Block:
.. attribute:: offset
- Offset of the block from the begining of the avro file
+ Offset of the block from the beginning of the avro file
.. attribute:: size
@@ -1080,7 +1080,7 @@ def schemaless_reader(
reader_schema: Optional[Schema] = None,
return_record_name: bool = False,
) -> AvroMessage:
- """Reads a single record writen using the
+ """Reads a single record written using the
:meth:`~fastavro._write_py.schemaless_writer`
Parameters

MODIFY
fastavro/_schema.pyx
fastavro/_schema.pyx
@@ -161,14 +161,14 @@ cdef _parse_schema(schema, namespace, expand, _write_hint, names, named_schemas)
scale = parsed_schema.get("scale")
if scale and (not isinstance(scale, int) or scale < 0):
raise SchemaParseException(
- f"decimal scale must be a postive integer, not {scale}"
+ f"decimal scale must be a positive integer, not {scale}"
)
precision = parsed_schema.get("precision")
if precision:
if not isinstance(precision, int) or precision <= 0:
raise SchemaParseException(
- "decimal precision must be a postive integer, "
+ "decimal precision must be a positive integer, "
+ f"not {precision}"
)
if schema_type == "fixed":

MODIFY
fastavro/_schema_py.py
fastavro/_schema_py.py
@@ -215,7 +215,7 @@ def parse_schema(
For the sake of example, let's assume you have a `Parent` schema that
references a `Child` schema`. If you were to try to parse the parent schema
on its own, you would get an exception because the child schema isn't
- defined. To accomodate this, we can use the `named_schemas` argument to pass
+ defined. To accommodate this, we can use the `named_schemas` argument to pass
a shared dictionary when parsing both of the schemas. The dictionary will
get populated with the necessary schema references to make parsing possible.
For example::
@@ -314,14 +314,14 @@ def _parse_schema(
scale = parsed_schema.get("scale")
if scale and (not isinstance(scale, int) or scale < 0):
raise SchemaParseException(
- f"decimal scale must be a postive integer, not {scale}"
+ f"decimal scale must be a positive integer, not {scale}"
)
precision = parsed_schema.get("precision")
if precision:
if not isinstance(precision, int) or precision <= 0:
raise SchemaParseException(
- "decimal precision must be a postive integer, "
+ "decimal precision must be a positive integer, "
+ f"not {precision}"
)
if schema_type == "fixed":

MODIFY
fastavro/_write.pyx
fastavro/_write.pyx
@@ -369,7 +369,7 @@ cdef write_record(bytearray fo, object datum, dict schema, dict named_schemas):
cpdef write_data(bytearray fo, datum, schema, dict named_schemas, fname):
"""Write a datum of data to output stream.
- Paramaters
+ Parameters
----------
fo: file like
Output file

MODIFY
tests/test_appendable.py
tests/test_appendable.py
@@ -41,7 +41,7 @@ def test_appendable_false_unseekable_stream():
class MockStreamLike:
# This mock file-like object simply returns False for 'seekable', and,
- # if 'tell' were called, rasies OSError. This mimicks a streaming
+ # if 'tell' were called, raises OSError. This mimics a streaming
# buffer like sys.stdout.buffer without actually using it.
def seekable(self):
return False

MODIFY
tests/test_schema.py
tests/test_schema.py
@@ -100,7 +100,7 @@ def test_decimal_scale_is_an_int():
}
with pytest.raises(
- SchemaParseException, match="decimal scale must be a postive integer"
+ SchemaParseException, match="decimal scale must be a positive integer"
):
parse_schema(schema)
@@ -124,7 +124,7 @@ def test_decimal_scale_is_a_positive_int():
}
with pytest.raises(
- SchemaParseException, match="decimal scale must be a postive integer"
+ SchemaParseException, match="decimal scale must be a positive integer"
):
parse_schema(schema)
@@ -149,7 +149,7 @@ def test_decimal_precision_is_an_int():
with pytest.raises(
SchemaParseException,
- match="decimal precision must be a postive integer",
+ match="decimal precision must be a positive integer",
):
parse_schema(schema)
@@ -174,7 +174,7 @@ def test_decimal_precision_is_a_positive_int():
with pytest.raises(
SchemaParseException,
- match="decimal precision must be a postive integer",
+ match="decimal precision must be a positive integer",
):
parse_schema(schema)

fixed some spelling mistakes,

that's all :)