FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(build): add `pre-commit` as a dev dependency to simplify local dev and CI by max-pfeiffer · Pull Request #438 · testcontainers/testcontainers-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .lock  (1) .toml  (1) .yaml  (1) .yml  (1) All 4 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
8 changes: 3 additions & 5 deletions .github/workflows/ci-lint.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 = "*"
Comment thread
alexanderankin marked this conversation as resolved.
twine = "^4.0.2"
mypy = "1.7.1"
Comment thread
alexanderankin marked this conversation as resolved.

[[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

Back | FazBrowse Home | New Git URL