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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: astral-sh/setup-uv@v3
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Build
run: uv build
- name: Publish
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
os: [ ubuntu-latest, macos-latest ]
python-version: [ 3.8, 3.9, 3.11, 3.12 ]
steps:
- uses: actions/checkout@v2
- uses: astral-sh/setup-uv@v3
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- run: uv build -p ${{ matrix.python-version }}
- run: uv run -p ${{ matrix.python-version }} mypy pyfu_usb/ tests/
- run: uv run -p ${{ matrix.python-version }} ty check
- run: uv run -p ${{ matrix.python-version }} ruff format --check
- run: uv run -p ${{ matrix.python-version }} ruff check
- run: uv run -p ${{ matrix.python-version }} pytest tests/
21 changes: 12 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
*.egg-info/
*.pyc
*.swp
.coverage
.pytest_cache/
.venv/
dist/
# Python-generated files
__pycache__/
*.py[oc]
build/
**/__pycache__/
**/target/
dist/
wheels/
*.egg-info

# Virtual environments
.venv

# Code coverage
.coverage
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
Expand All @@ -9,19 +9,19 @@ repos:
- id: trailing-whitespace
- repo: local
hooks:
- id: mypy
- id: types
name: check types
entry: uv run mypy pyfu_usb/ tests/
entry: uv run ty check
language: system
pass_filenames: false
always_run: true
- id: ruff_format
- id: format
name: check style
entry: uv run ruff format --check
language: system
pass_filenames: false
always_run: true
- id: ruff_check
- id: lint
name: lint
entry: uv run ruff check
language: system
Expand Down
31 changes: 10 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ dependencies = [
"rich>=12.2",
]

[dependency-groups]
dev = [
"coverage",
"pre-commit",
"pytest",
"ruff",
"ty",
]

[project.scripts]
pyfu-usb = "pyfu_usb.__main__:main"

Expand All @@ -23,30 +32,14 @@ build-backend = "hatchling.build"

[tool.uv]
managed = true
dev-dependencies = [
"coverage",
"mypy",
"pre-commit",
"pytest",
"ruff",
]

[tool.ruff]
line-length = 80
indent-width = 4
exclude = [
extend-exclude = [
".coverage",
".eggs",
".git",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
".vscode",
"build",
"dist",
"htmlcov",
"venv",
]

[tool.ruff.lint]
Expand All @@ -68,7 +61,3 @@ ignore = [
# pylint: too-many-arguments
"PLR0913"
]

[tool.mypy]
strict = true
ignore_missing_imports = true
Loading