fix(@configs/python): 🐛 update ruff and mypy configurations in pyproject.toml and README.md

This commit is contained in:
Lilith 2026-01-05 15:24:17 -08:00
parent 5735623d97
commit 4d2279fcb7
6 changed files with 21 additions and 21 deletions

View file

@ -1,6 +1,6 @@
# tqftw-python-configs
# lilith-python-configs
Shared Python tooling configurations for all TQFTW projects. Provides standardized, opinionated configurations for:
Shared Python tooling configurations for all Lilith projects. Provides standardized, opinionated configurations for:
- **ruff** - Linting and formatting (replaces black, isort, flake8)
- **mypy** - Type checking
@ -9,13 +9,13 @@ Shared Python tooling configurations for all TQFTW projects. Provides standardiz
## Installation
```bash
pip install tqftw-python-configs
pip install lilith-python-configs
```
Or with uv:
```bash
uv add tqftw-python-configs --dev
uv add lilith-python-configs --dev
```
## Usage
@ -26,23 +26,23 @@ Ruff supports extending external configurations. Add to your `pyproject.toml`:
```toml
[tool.ruff]
extend = ".venv/lib/python3.11/site-packages/tqftw_python_configs/ruff.toml"
extend = ".venv/lib/python3.11/site-packages/lilith_python_configs/ruff.toml"
```
Or use the helper to get the path programmatically:
```python
from tqftw_python_configs import get_ruff_config_path
from lilith_python_configs import get_ruff_config_path
print(get_ruff_config_path())
# /path/to/.venv/lib/python3.11/site-packages/tqftw_python_configs/ruff.toml
# /path/to/.venv/lib/python3.11/site-packages/lilith_python_configs/ruff.toml
```
**Override specific settings** while inheriting the base:
```toml
[tool.ruff]
extend = ".venv/lib/python3.11/site-packages/tqftw_python_configs/ruff.toml"
extend = ".venv/lib/python3.11/site-packages/lilith_python_configs/ruff.toml"
line-length = 120 # Override: use 120 instead of 100
[tool.ruff.lint]
@ -72,7 +72,7 @@ disallow_untyped_defs = false
Or copy `mypy.ini` to your project root:
```python
from tqftw_python_configs import get_mypy_config_path
from lilith_python_configs import get_mypy_config_path
import shutil
shutil.copy(get_mypy_config_path(), "mypy.ini")
@ -136,7 +136,7 @@ The ruff configuration enables:
## API Reference
```python
from tqftw_python_configs import (
from lilith_python_configs import (
__version__,
get_config_dir,
get_ruff_config_path,

View file

@ -3,7 +3,7 @@ requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "tqftw-python-configs"
name = "lilith-python-configs"
version = "1.0.0"
description = "Shared Python tooling configurations for ruff, mypy, and pytest"
requires-python = ">=3.10"
@ -29,10 +29,10 @@ readme = "README.md"
dev = ["build>=1.0.0", "twine>=5.0.0"]
[tool.hatch.build.targets.wheel]
packages = ["src/tqftw_python_configs"]
packages = ["src/lilith_python_configs"]
[tool.hatch.build.targets.sdist]
include = ["/src", "/README.md"]
[tool.tqftw]
[tool.lilith]
registry = "forgejo"

View file

@ -1,5 +1,5 @@
"""
tqftw-python-configs: Shared Python tooling configurations.
lilith-python-configs: Shared Python tooling configurations.
Provides standardized configurations for:
- ruff (linting + formatting)
@ -7,14 +7,14 @@ Provides standardized configurations for:
- pytest (testing)
Usage:
from tqftw_python_configs import get_ruff_config_path, get_mypy_config_path
from lilith_python_configs import get_ruff_config_path, get_mypy_config_path
# Get path to bundled ruff.toml
ruff_path = get_ruff_config_path()
# Use in pyproject.toml:
# [tool.ruff]
# extend = ".venv/lib/python3.11/site-packages/tqftw_python_configs/ruff.toml"
# extend = ".venv/lib/python3.11/site-packages/lilith_python_configs/ruff.toml"
"""
from pathlib import Path
@ -43,7 +43,7 @@ def get_ruff_config_path() -> Path:
Path to ruff.toml that can be used with ruff's extend feature.
Example:
>>> from tqftw_python_configs import get_ruff_config_path
>>> from lilith_python_configs import get_ruff_config_path
>>> config_path = get_ruff_config_path()
>>> print(f"extend = '{config_path}'")
"""

View file

@ -1,12 +1,12 @@
# tqftw-python-configs: Ruff Configuration
# lilith-python-configs: Ruff Configuration
# Linting and formatting for all TQFTW Python projects
#
# Usage in pyproject.toml:
# [tool.ruff]
# extend = ".venv/lib/python3.11/site-packages/tqftw_python_configs/ruff.toml"
# extend = ".venv/lib/python3.11/site-packages/lilith_python_configs/ruff.toml"
#
# Or use the helper:
# from tqftw_python_configs import get_ruff_config_path
# from lilith_python_configs import get_ruff_config_path
# print(get_ruff_config_path())
line-length = 100
@ -52,7 +52,7 @@ ignore = [
]
[lint.isort]
known-first-party = ["tqftw_*"]
known-first-party = ["lilith_*"]
combine-as-imports = true
force-wrap-aliases = true
force-single-line = false