Skip to content

update code-checkers config #9707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions airbyte-integrations/connectors/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"lxml": "4.7",
}


TASK_COMMANDS: Dict[str, List[str]] = {
"black": [
f"pip install black~={TOOLS_VERSIONS['black']}",
Expand All @@ -53,6 +52,7 @@
"mypy": [
"pip install .",
f"pip install mypy~={TOOLS_VERSIONS['mypy']}",
"mypy --install-types --non-interactive ",
f"mypy {{source_path}} --config-file={CONFIG_FILE}",
],
"test": [
Expand Down Expand Up @@ -133,7 +133,7 @@ def _run_task(
try:
with ctx.prefix(f"source {activator}"):
for command in commands:
result = ctx.run(command, warn=True)
result = ctx.run(command, echo=True, warn=True)
if result.return_code:
exit_code = 1
break
Expand Down Expand Up @@ -191,11 +191,19 @@ def all_checks(ctx, connectors=None): # type: ignore[no-untyped-def]
Zero exit code indicates about successful passing of all checks.
Terminate on the first non-zero exit code.
"""
black(ctx, connectors=connectors)
flake(ctx, connectors=connectors)
isort(ctx, connectors=connectors)
mypy(ctx, connectors=connectors)
coverage(ctx, connectors=connectors)
tasks = (
black,
flake,
isort,
mypy,
coverage,
)
for task_ in tasks:
try:
task_(ctx, connectors=connectors)
except Exit as e:
if e.code:
raise


@task(help={"connectors": _arg_help_connectors, "write": "Write changes into the files (runs 'black' without '--check' option)"})
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ color_output = false
skip_gitignore = true

[tool.mypy]
platform = "linux"
cache_dir = "/dev/null"
exclude = "build"
incremental = false
platform = "linux"

# Strictness
ignore_missing_imports = true
allow_redefinition = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
implicit_reexport = true
no_strict_optional = true
strict_equality = true
# Output
Expand All @@ -45,6 +47,7 @@ show_column_numbers = true
show_error_codes = true
show_error_context = true
# Warnings
warn_no_return = false
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
Expand Down