Skip to content
Open
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/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ jobs:
~/.nox
.nox
key:
${{ runner.os }}-nox-${{ matrix.session.session }}-${{ env.pythonLocation }}-${{
${{ runner.os }}-nox-v2-${{ matrix.session.session }}-${{ env.pythonLocation }}-${{
hashFiles('**/uv.lock') }}-${{ hashFiles('**/noxfile.py') }}
restore-keys: |
${{ runner.os }}-nox-${{ matrix.session.session }}-${{ env.pythonLocation }}
${{ runner.os }}-nox-v2-${{ matrix.session.session }}-${{ env.pythonLocation }}

- name: Setup mise
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
Expand Down
32 changes: 19 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,41 @@ repos:
types: [ python ]
args: [ "--py310-plus" ]

- repo: https://github.com/provinzkraut/unasyncd
rev: v0.9.0
- repo: local
hooks:
- id: unasyncd
additional_dependencies: [ "ruff" ]
name: unasyncd
entry: uv run unasyncd
language: system
types: [ python ]
pass_filenames: false
require_serial: true

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.13.0
- repo: local
hooks:
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
- id: ruff-format
types_or: [ python, pyi ]
- id: ruff
name: ruff
entry: tools/mise run ruff:pre-commit
language: system
types: [ python ]
pass_filenames: false
require_serial: true

- repo: local
hooks:
- id: lint
name: lint
entry: mise run lint:pre-commit
language: python
entry: tools/mise run lint:pre-commit
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed, as mise is already installed by the gh action

Copy link
Copy Markdown
Contributor Author

@Ckk3 Ckk3 Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this repo already have a mise in this folder I thought will be nice to already use it in CI and in local env.
What do you think about it?

language: system
types: [ python ]
pass_filenames: false
require_serial: true
Comment on lines +79 to 83
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix bracket spacing.

Same bracket spacing issue at line 81.

Proposed fix
-        types: [ python ]
+        types: [python]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
entry: tools/mise run lint:pre-commit
language: system
types: [ python ]
pass_filenames: false
require_serial: true
entry: tools/mise run lint:pre-commit
language: system
types: [python]
pass_filenames: false
require_serial: true
🧰 Tools
🪛 YAMLlint (1.38.0)

[error] 81-81: too many spaces inside brackets

(brackets)


[error] 81-81: too many spaces inside brackets

(brackets)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.pre-commit-config.yaml around lines 79 - 83, Fix the bracket spacing for
the pre-commit hook's types list: locate the block with the "types:" key (the
entry using tools/mise run lint:pre-commit) and remove the extra space inside
the square brackets so it reads types: [python] (or use a quoted single-item
list like types: ["python"]) to match the project's YAML style.


- repo: local
hooks:
- id: task-docs
name: Tasks documentation
entry: mise run render:usage
entry: tools/mise run render:usage
language: system
files: ^mise.toml$
pass_filenames: false
Expand Down
6 changes: 5 additions & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ run = "uv run nox --json -t tests -l | jq 'map(.name) | unique'"
description = "Check ruff formatting"
run = "uv run ruff check"

[tasks."ruff:pre-commit"]
description = "Fix ruff errors and format (for pre-commit)"
run = ["uv run ruff check --fix", "uv run ruff format"]

[tasks."ruff:fix"]
description = "Fix ruff errors"
run = "uv run ruff check --fix --unsafe-fixes"
Expand Down Expand Up @@ -256,4 +260,4 @@ run = [

[tasks."render:usage"]
description = "Generate tasks documentation"
run = ["mise generate task-docs > tasks.md"]
run = ["tools/mise generate task-docs > tasks.md"]
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dev = [
]
codeflash = ["codeflash"]
doc = ["git-cliff>=2.6.1"]
lint = ["basedpyright", "ruff", "vulture", "slotscheck>=0.16.5"]
lint = ["basedpyright", "ruff>=0.14.10,<0.15", "vulture", "slotscheck>=0.16.5"]
mysql = ["asyncmy", "cryptography"]
postgres = ["asyncpg>=0.29.0", "psycopg[binary,pool]>=3.2.3"]
test = [
Expand Down Expand Up @@ -323,6 +323,7 @@ exclude = [
".ruff_cache",
".svn",
".venv",
"__pycache__",
"__pypackages__",
"_build",
"buck-out",
Expand All @@ -333,7 +334,7 @@ exclude = [
"tests/codegen/snapshots",
"alembic/* ",
]
src = ["src/strawchemy", "tests"]
src = ["src", "tests"]

[tool.ruff.lint]
select = ["ALL"]
Expand Down
6 changes: 6 additions & 0 deletions tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ Format code

Format code

## `ruff:pre-commit`

- **Usage**: `ruff:pre-commit`

Fix ruff errors and format (for pre-commit)

## `slotscheck`

- **Usage**: `slotscheck`
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

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

Loading