[pre-commit.ci] pre-commit autoupdate (#205)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pycqa/isort: 5.11.4 → 5.12.0](https://github.com/pycqa/isort/compare/5.11.4...5.12.0)
- [github.com/psf/black: 22.12.0 → 23.3.0](https://github.com/psf/black/compare/22.12.0...23.3.0)
- [github.com/pre-commit/mirrors-mypy: v0.991 → v1.2.0](https://github.com/pre-commit/mirrors-mypy/compare/v0.991...v1.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot] 2023-05-14 20:53:02 +03:00 committed by GitHub
parent ef982743b6
commit 8104ce1b68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View File

@ -6,17 +6,17 @@ repos:
- id: end-of-file-fixer
- id: check-toml
- repo: https://github.com/pycqa/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
args: [ "--profile", "black", "--filter-files" ]
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.3.0
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.991"
rev: "v1.2.0"
hooks:
- id: mypy
files: ^(cloudevents/)

View File

@ -30,7 +30,6 @@ class BinaryHTTPCloudEventConverter(base.Converter):
content_type: typing.Optional[str] = None,
headers: typing.Optional[typing.Mapping[str, str]] = None,
) -> bool:
if headers is None:
headers = {"ce-specversion": ""}
return has_binary_headers(headers)

View File

@ -24,7 +24,6 @@ from cloudevents.sdk import types
class EventGetterSetter(object): # pragma: no cover
# ce-specversion
def CloudEventVersion(self) -> str:
raise Exception("not implemented")

View File

@ -44,7 +44,6 @@ def failing_func(*args):
class KafkaConversionTestBase:
expected_data = {"name": "test", "amount": 1}
expected_custom_mapped_key = "custom-key"

View File

@ -239,7 +239,12 @@ def test_json_data_serialization_with_explicit_json_content_type(
dummy_attributes, json_content_type
):
dummy_attributes["datacontenttype"] = json_content_type
assert loads(CloudEvent(dummy_attributes, data='{"hello": "world"}',).json())[
assert loads(
CloudEvent(
dummy_attributes,
data='{"hello": "world"}',
).json()
)[
"data"
] == {"hello": "world"}