Qx devtools: ruff/mypy/pre-commit presets, code quality helpers
Project description
qx-devtools
Shared code-quality configuration presets for Qx services — ruff, mypy, pre-commit, and editorconfig in one place.
What lives here
qx.devtools.RUFF_CONFIG— string constant with the standard ruff configuration (line length 100, full lint rule set, per-file ignores for tests and Alembic).qx.devtools.MYPY_CONFIG— string constant with strict mypy configuration (strict = True, pydantic plugin, test/alembic exclusions).qx.devtools.PRE_COMMIT_CONFIG— string constant with a pre-commit config that runs ruff, ruff-format, mypy, and standard file-hygiene hooks.qx.devtools.EDITORCONFIG— string constant with the standard.editorconfig(UTF-8, LF, 4-space indent).qx.devtools.write_configs— writes any combination of the above files into a target directory. Skips existing files unlessoverwrite=True.
Usage
Write the standard config files into a new service's root directory:
from pathlib import Path
from qx.devtools import write_configs
written = write_configs(Path("my-service/"), ruff=True, mypy=True, pre_commit=True)
print(f"Written: {[str(p) for p in written]}")
Or call it from the CLI during service scaffolding:
uv run python -c "from qx.devtools import write_configs; from pathlib import Path; write_configs(Path('.'))"
Design rules
- The config strings are plain text constants so services can read, extend, or compose from them without parsing TOML/YAML.
write_configsis intentionally conservative: it never overwrites by default. Run withoverwrite=Trueonly when you want to pull in updated framework defaults.- Services that want to diverge from a specific rule should do so in their own config file rather than forking the preset — extend, don't override wholesale.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qx_devtools-1.0.0.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qx_devtools-1.0.0.tar.gz.
File metadata
- Download URL: qx_devtools-1.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bca146b8ab488d9c4cb42e8daedd4549667cf6ae8b37f50e2d254ee06ac7250d
|
|
| MD5 |
ecb04d21b5a59340df932b25322443ff
|
|
| BLAKE2b-256 |
136f40ea1ceeab1a252fd8189cd8044a190b3a807276622e2004e27d579049a7
|
File details
Details for the file qx_devtools-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qx_devtools-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
878b5d3c200696c062880bbd537f8abd8a405411200319d777108db95cc3f7ed
|
|
| MD5 |
ee62f353773f8b70868116c645eeac25
|
|
| BLAKE2b-256 |
338b14463ad260161bf0bd045c5c996cf71a51dfb8a45da90522bdf5d6be8fc9
|