Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
72 lines (65 loc) · 2.36 KB
/
Copy pathpyproject.toml
File metadata and controls
72 lines (65 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# =============================================================================
# My Obsidian Python Bridge Scripts - project configuration
#
# This repository is a *collection of standalone scripts* (not an installable
# package): the Obsidian Python Bridge plugin discovers and executes the .py
# files living at the repo root. Hence `package = false` for uv and no
# [build-system] section.
#
# Dev tooling (lint, format, tests) is configured here:
# uv sync -> create .venv + install dev group
# uv run ruff format . -> format
# uv run ruff check . -> lint
# uv run pytest -> unit tests
# =============================================================================
[project]
name = "my-obsidian-python-scripts"
version = "2.1.0"
description = "Collection of Python scripts for the Obsidian Python Bridge V2 plugin"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "mathe00" }]
requires-python = ">=3.10"
dependencies = ["requests>=2.31"]
[dependency-groups]
dev = [
"ruff>=0.9",
"pytest>=8.0",
]
[tool.uv]
# Scripts collection, not a buildable package.
package = false
# -----------------------------------------------------------------------------
# Ruff — lint + format
# -----------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = [".venv", ".opencode"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort (import ordering)
"N", # pep8-naming
"UP", # pyupgrade (modern syntax)
"B", # flake8-bugbear (likely bugs)
"SIM", # flake8-simplify
"C4", # flake8-comprehensions
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long — the formatter owns this; long strings/URLs stay readable
"SIM105", # contextlib.suppress — explicit try/except/pass is clearer for best-effort notifications
]
[tool.ruff.lint.per-file-ignores]
# Test modules may use magic values and long literals freely;
# keep asserts readable without docstring pressure.
"tests/*" = ["E501"]
# -----------------------------------------------------------------------------
# Pytest
# -----------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q --strict-markers"