forked from aqua5230/usage
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (90 loc) · 2.55 KB
/
pyproject.toml
File metadata and controls
101 lines (90 loc) · 2.55 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[project]
name = "usage"
version = "0.15.13"
description = "usage — 在 macOS menu bar 顯示 Claude Code 用量的繁中小工具(也提供終端機 TUI)"
readme = "README.md"
requires-python = ">=3.13"
license = "AGPL-3.0-only"
license-files = ["LICENSE"]
dependencies = [
"pyobjc-framework-Cocoa>=11.0",
"pyobjc-framework-Quartz>=11.0",
"pyobjc-framework-UserNotifications>=11.0",
"pyobjc-framework-WebKit>=11.0",
"rich>=14.0.0,<15.0.0",
]
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
py-modules = [
"main",
"menubar",
"menubar_state",
"usage_notifications",
"tui",
"pricing",
"history_loader",
"usage_rate",
"usage_statusline",
"setup_hook",
"login_item",
"usage_client",
"codex_loader",
"tui_sprite",
"i18n",
"usage_cli",
"burn_rate",
"update_checker",
"tips_loader",
"usage_lang",
"usage_statusline_forwarder",
"usage_session_resume",
"project_resolver",
"subscription",
"doctor",
]
[tool.setuptools.packages.find]
include = ["adapters*", "analyzer*", "panels*", "ui*"]
[dependency-groups]
dev = [
"ruff>=0.6",
"mypy>=1.10",
"pytest>=8",
]
build = [
"py2app>=0.28",
]
[tool.ruff]
target-version = "py313"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
[tool.ruff.lint.per-file-ignores]
# usage_statusline.py 設計成可以用系統 python3 跑(macOS 內建是 3.9),
# 必須避開 3.11+ 才有的 datetime.UTC,用 timezone.utc 取代。
"usage_statusline.py" = ["UP017"]
# Imported analytics source is kept with minimal path fixes; keep formatting
# stable for this integration commit.
"adapters/**/*.py" = ["E501", "I001", "SIM108", "UP015", "UP017"]
"analyzer/**/*.py" = ["E501", "I001", "UP015", "UP017"]
"ui/**/*.py" = ["E501", "I001", "UP017", "UP035"]
"usage_cli.py" = ["E501", "I001", "UP017"]
[tool.mypy]
python_version = "3.13"
strict = true
warn_unused_configs = true
pretty = true
exclude = "^(build|dist)/"
[[tool.mypy.overrides]]
module = ["rich.*", "PIL.*"]
ignore_missing_imports = true
# PyObjC C-extension frameworks ship without type stubs / py.typed marker.
# `ignore_missing_imports` is the standard idiom for stubless modules — this
# is NOT suppressing a real bug, just declaring the frameworks are untyped.
[[tool.mypy.overrides]]
module = ["AppKit", "Foundation", "objc", "Quartz", "UserNotifications", "WebKit"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers"