|
| 1 | +[project] |
| 2 | +name = "morgul" |
| 3 | +version = "0.1.0" |
| 4 | +description = "Minimal Windows 11 Notepad-style Markdown editor" |
| 5 | +readme = "README.md" |
| 6 | +# App is Unlicense. Runtime deps stay permissive (no GPL/AGPL-only). |
| 7 | +license = "Unlicense" |
| 8 | +authors = [ |
| 9 | + { name = "python-processing-unit", email = "darthmalware@orderofsithlords.onmicrosoft.com" }, |
| 10 | +] |
| 11 | +# Floor: markdown-it-py 4 / pytest 9 / modern PySide6 all need 3.10+. |
| 12 | +requires-python = ">=3.10" |
| 13 | +dependencies = [ |
| 14 | + # CommonMark → HTML for the preview pane (MIT). |
| 15 | + # 4.0.0 is the first 4.x line; requires-python >=3.10 (matches us). |
| 16 | + "markdown-it-py>=4.0.0", |
| 17 | + # GFM task lists for markdown-it-py (MIT). 0.4.0 still on py>=3.8. |
| 18 | + "mdit-py-plugins>=0.4.0", |
| 19 | + # Qt widgets only — skip PySide6_Addons. LGPL-3.0 OR GPL (we use LGPL terms). |
| 20 | + # 6.6.0: stable Essentials split; 6.9+ needed if you run on 3.13 (resolver picks it). |
| 21 | + "PySide6-Essentials>=6.6.0", |
| 22 | + # typing.override back-port (stdlib only since 3.12). 4.4.0 first shipped it. |
| 23 | + "typing-extensions>=4.4.0", |
| 24 | +] |
| 25 | + |
| 26 | +[project.scripts] |
| 27 | +morgul = "morgul.app:run" |
| 28 | + |
| 29 | +[build-system] |
| 30 | +requires = ["uv_build>=0.12.0,<0.13.0"] |
| 31 | +build-backend = "uv_build" |
| 32 | + |
| 33 | +[dependency-groups] |
| 34 | +dev = [ |
| 35 | + # 8.0.0: first pytest 8; requires-python was >=3.8 (fine on 3.10+). |
| 36 | + "pytest>=8.0.0", |
| 37 | + # 0.9.0: modern lint config (preview, stable ALL set). requires-python >=3.7. |
| 38 | + "ruff>=0.9.0", |
| 39 | + # 0.0.50: rules table + `all = "error"` are dependable. requires-python >=3.8. |
| 40 | + "ty>=0.0.50", |
| 41 | +] |
| 42 | + |
| 43 | +[tool.uv] |
| 44 | +default-groups = ["dev"] |
| 45 | + |
| 46 | +# --- ruff: strictest practical --- |
| 47 | +[tool.ruff] |
| 48 | +target-version = "py310" |
| 49 | +line-length = 88 |
| 50 | +preview = true |
| 51 | +src = ["src", "tests"] |
| 52 | + |
| 53 | +[tool.ruff.lint] |
| 54 | +select = ["ALL"] |
| 55 | +ignore = [ |
| 56 | + # Formatter wars — ruff format owns these. |
| 57 | + "missing-trailing-comma", |
| 58 | + "single-line-implicit-string-concatenation", |
| 59 | + # Docstring style pairs that conflict with each other. |
| 60 | + "incorrect-blank-line-before-class", |
| 61 | + "multi-line-summary-second-line", |
| 62 | + # Unlicense / public domain — no copyright headers. |
| 63 | + "missing-copyright-notice", |
| 64 | +] |
| 65 | + |
| 66 | +[tool.ruff.lint.per-file-ignores] |
| 67 | +# Tests may be a little looser (asserts, magic values, no main-guard demos). |
| 68 | +"tests/**" = [ |
| 69 | + "assert", |
| 70 | + "magic-value-comparison", |
| 71 | + "D", |
| 72 | + "ANN", |
| 73 | + "implicit-namespace-package", |
| 74 | +] |
| 75 | + |
| 76 | +[tool.ruff.lint.pydocstyle] |
| 77 | +convention = "google" |
| 78 | + |
| 79 | +[tool.ruff.format] |
| 80 | +quote-style = "double" |
| 81 | +indent-style = "space" |
| 82 | +line-ending = "lf" |
| 83 | + |
| 84 | +# --- ty: every rule is an error --- |
| 85 | +[tool.ty.environment] |
| 86 | +python-version = "3.10" |
| 87 | + |
| 88 | +[tool.ty.rules] |
| 89 | +all = "error" |
| 90 | + |
| 91 | +[tool.pytest.ini_options] |
| 92 | +testpaths = ["tests"] |
| 93 | +pythonpath = ["src"] |
| 94 | +addopts = "-q" |
0 commit comments