Skip to content
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
8 changes: 3 additions & 5 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
with:
python-version: "3.9" # the pre-commit is hooked in as 3.9
- name: Install Python dependencies
run: poetry install
- name: Install pre-commit
run: pip install pre-commit
- name: Run linter
run: pre-commit run -a
run: poetry install --no-interaction
- name: Execute pre-commit handler
run: poetry run pre-commit run -a
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.9
python: python3

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -10,13 +10,13 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/psf/black-pre-commit-mirror
rev: '24.1.1'
rev: '24.2.0'
hooks:
- id: black
args: [ '--config', 'pyproject.toml' ]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.14'
rev: 'v0.3.0'
hooks:
- id: ruff
# Explicitly setting config to prevent Ruff from using `pyproject.toml` in sub packages.
Expand Down
125 changes: 122 additions & 3 deletions poetry.lock

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

14 changes: 8 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ redis = ["redis"]
selenium = ["selenium"]

[tool.poetry.group.dev.dependencies]
mypy = "1.7.1"
pre-commit = "^3.6"
pg8000 = "*"
pytest = "7.4.3"
pytest-cov = "4.1.0"
sphinx = "^7.2.6"
pg8000 = "*"
twine = "^4.0.2"
mypy = "1.7.1"

[[tool.poetry.source]]
name = "PyPI"
Expand All @@ -139,15 +140,14 @@ exclude_lines = [
"raise NotImplementedError" # TODO: used in core/generic.py, not sure we need DbContainer
]

[tool.ruff.flake8-type-checking]
strict = true

[tool.ruff]
target-version = "py39"
line-length = 120
fix = true
fixable = ["I"]
src = ["core", "modules/*"]

[tool.ruff.lint]
fixable = ["I"]
exclude = ["**/tests/**/*.py"]
select = [
# flake8-2020
Expand Down Expand Up @@ -194,6 +194,8 @@ ignore = [
"INP001"
]

[tool.ruff.lint.flake8-type-checking]
strict = true

[tool.mypy]
python_version = "3.9"
Expand Down