Skip to content
Draft
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
11 changes: 7 additions & 4 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Run Linters

permissions:
contents: read

on:
push:
branches:
Expand Down Expand Up @@ -56,8 +59,8 @@ jobs:
- name: Check code format
run: poetry run ruff format --check .

mypy-check:
name: MyPy Check
ty-check:
name: Ty Check
runs-on: ubuntu-latest
steps:
# Common steps:
Expand All @@ -76,5 +79,5 @@ jobs:
run: poetry install

# Job-specifc step(s):
- name: Check MyPy typing
run: poetry run mypy .
- name: Check Ty typing
run: poetry run ty check .
31 changes: 30 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 7 additions & 48 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ deptry = "^0.21.1"
docker = "^7.1.0"
faker = "^21.0.0"
freezegun = "^1.4.0"
mypy = "^1.11.2"
ty = "^0.0.1a16"
pandas-stubs = "^2.1.4.231218"
pdoc = "^14.3.0"
poethepoet = ">=0.26.1,<0.32.0"
Expand Down Expand Up @@ -115,59 +115,17 @@ filterwarnings = [ # syntax: "action:message_regex:category:module:line"
# [tool.ruff]
# Ruff moved to dedicated config file: `.ruff.toml`

[tool.mypy]
# Platform configuration
python_version = "3.10"
# imports related
ignore_missing_imports = true
follow_imports = "silent"
# None and Optional handling
no_implicit_optional = true
strict_optional = true
# Configuring warnings
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
warn_return_any = false
# Untyped definitions and calls
check_untyped_defs = true
disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = false
# Disallow dynamic typing
disallow_subclassing_any = true
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
# Miscellaneous strictness flags
allow_untyped_globals = false
allow_redefinition = false
local_partial_types = false
implicit_reexport = true
strict_equality = true
# Configuring error messages
show_error_context = false
show_column_numbers = false
show_error_codes = true
[tool.ty.environment]
python-version = "3.10"

[tool.ty.src]
exclude = [
"tests/integration_tests/fixtures/source-broken",
"tests/integration_tests/fixtures/source-test",
"docs",
"tests",
]

[[tool.mypy.overrides]]
ignore_missing_imports = true # No stubs yet (😢)
module = [
"airbyte_protocol",
"airbyte_protocol.models",
]

[tool.pyright]
pythonVersion = "3.10"
venvPath = "./" # Assuming .venv is at the root of your project
Expand All @@ -187,7 +145,8 @@ coverage-report = { shell = "coverage report" }
coverage-html = { shell = "coverage html -d htmlcov && open htmlcov/index.html" }
coverage-reset = { shell = "coverage erase" }

check = { shell = "ruff check . && mypy . && pytest --collect-only -qq" }
type-check = { shell = "ty check .", help = "Type check with ty" }
check = { shell = "ruff check . && poe type-check && pytest --collect-only -qq" }

docs-generate = {env = {PDOC_ALLOW_EXEC = "1"}, cmd = "python -m docs.generate run"}
docs-preview = {shell = "poe docs-generate && open docs/generated/index.html"}
Expand Down
Loading