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: 0 additions & 4 deletions .flake8

This file was deleted.

26 changes: 8 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,17 @@ repos:
rev: 0.31.0
hooks:
- id: check-github-workflows
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py39-plus"]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies:
- 'flake8-bugbear==24.12.12'
- 'flake8-comprehensions==3.16.0'
- 'flake8-typing-as-t==1.0.0'
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: [flake8-typing-as-t]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.14
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/sirosen/slyp
rev: 0.8.1
hooks:
Expand Down
13 changes: 10 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,16 @@ ignore_missing_imports = true
disallow_subclassing_any = false
files = ["src"]

[tool.isort]
profile = "black"
known_first_party = ["mddj"]
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.

🤦 That's slightly embarrassing. Clearly copy-pasta from mddj! Glad to see it fixed here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was wondering, didn't see why dependency-groups would have started out named "mddj". ;P

[tool.ruff]
line-length = 88
show-fixes = true

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "B", "C4", "I", "TCH", "UP"]
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.

Is TCH right? I don't see it documented.
I think flake8-typing-as-t is too small to be picked up and cloned by ruff.

I'm not sure what to do about that. I guess I could make it runnable as a module, with a __main__.py which runs it as a non-flake8 AST checker?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see that. We can run flake8 just on a single prefix (I'm doing that for flake8-lazy in places).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

ignore = ["E203"]

[tool.ruff.lint.isort]
known-first-party = ["dependency_groups"]

[tool.check-sdist]
git-only = [".*", "Makefile", "docs/*", "scripts/*"]
Expand Down
2 changes: 1 addition & 1 deletion scripts/bump-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def update_changelog(new_version):
----------

{new_version}
{'-' * len(new_version)}
{"-" * len(new_version)}

""",
content,
Expand Down
Loading