You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use pre-commit to validate python code locally, currently, CDK does not pass pre-commit checks, which makes it less usable if usable at all.
Expected Behavior
The code in CDK is properly formatted and pre-commit checks are passed.
Logs
base) ➜ python git:(keu/cdk-base-pydantic-models) ✗ pre-commit run --files airbyte_cdk/sources/config.py
licenseheaders...........................................................Passed
black....................................................................Passed
isort....................................................................Passed
prettier.............................................(no files to check)Skipped
flake8...................................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1
airbyte-cdk/python/airbyte_cdk/sources/config.py: note: In member "schema" of class "BaseConfig":
airbyte-cdk/python/airbyte_cdk/sources/config.py:60:9: error: Returning Any
from function declared to return "Dict[str, Any]" [no-any-return]
return schema
^
airbyte-cdk/python/airbyte_cdk/sources/abstract_source.py:29: note: In module imported here,
airbyte-cdk/python/airbyte_cdk/sources/__init__.py:1: note: ... from here:
airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py:13:1: error:
Module 'airbyte_cdk.models' does not explicitly export attribute
'ConnectorSpecification'; implicit reexport disabled [attr-defined]
from airbyte_cdk.models import ConnectorSpecification
^
airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py: note: In member "__call__" of class "JsonFileLoader":
airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py:32:9: error:
Returning Any from function declared to return "Dict[str, Any]" [no-any-return]
return json.load(open(uri))
^
airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py: note: In function "resolve_ref_links":
airbyte-cdk/python/airbyte_cdk/sources/utils/schema_helpers.py:47:9: error:
Returning Any from function declared to return "Dict[str, Any]" [no-any-return]
return obj
^
The text was updated successfully, but these errors were encountered:
Current Behavior
We use pre-commit to validate python code locally, currently, CDK does not pass pre-commit checks, which makes it less usable if usable at all.
Expected Behavior
The code in CDK is properly formatted and pre-commit checks are passed.
Logs
The text was updated successfully, but these errors were encountered: