Skip to main content

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 unless overwrite=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_configs is intentionally conservative: it never overwrites by default. Run with overwrite=True only 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


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-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qx_devtools-0.2.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file qx_devtools-0.2.0.tar.gz.

File metadata

  • Download URL: qx_devtools-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for qx_devtools-0.2.0.tar.gz
Algorithm Hash digest
SHA256 572499dcf82cef3e2b8c707d814a28f021dba1f3043a799645bd4ae6e723254a
MD5 13af7b4cf046eaea468e4676e79cdfe9
BLAKE2b-256 4f3e4f8003cc350d8ecb4660863b4ff952581e209570a8e6b37c5e2012279d3c

See more details on using hashes here.

File details

Details for the file qx_devtools-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: qx_devtools-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for qx_devtools-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 440ab2b7f31ce77c2c8ddbffe639b375630478a1c860b1376b4cb8e4aba53612
MD5 ef39e9ceb334ddd2ddc4f7894e67f5b3
BLAKE2b-256 87af41add62a2b28f28b9818852da6832e93c21647e5b80e839efe239eab6b30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page