[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:
parent
ef982743b6
commit
8104ce1b68
|
@ -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/)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -44,7 +44,6 @@ def failing_func(*args):
|
|||
|
||||
|
||||
class KafkaConversionTestBase:
|
||||
|
||||
expected_data = {"name": "test", "amount": 1}
|
||||
expected_custom_mapped_key = "custom-key"
|
||||
|
||||
|
|
|
@ -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"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue