-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (121 loc) · 3.41 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (121 loc) · 3.41 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[project]
name = "ai_employees"
authors = [
{ name = "AI Employees Contributors" }
]
license = { text = "Apache-2.0" }
description = "Autonomous AI workforce platform for enterprise operations."
requires-python = ">=3.12"
readme = "README.md"
dynamic = ["version"]
dependencies = [
# "frappe~=16.0.0" # Installed and managed by bench.
"google-genai>=1.0.0,<2",
"anthropic>=0.40.0,<1",
"ollama>=0.4.0,<1",
"openai>=1.0.0,<3",
]
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[tool.bench.frappe-dependencies]
frappe = ">=16.0.0-dev,<17.0.0-dev"
erpnext = ">=16.0.0-dev,<17.0.0-dev"
# These dependencies are only installed when developer mode is enabled
[tool.bench.dev-dependencies]
basedmypy = "~=2.9.0"
[tool.ruff]
line-length = 110
target-version = "py314"
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"I",
"UP",
"B",
"RUF",
]
ignore = [
"B017", # assertRaises(Exception) - should be more specific
"B018", # useless expression, not assigned to anything
"B023", # function doesn't bind loop variable - will have last iteration's value
"B904", # raise inside except without from
"E101", # indentation contains mixed spaces and tabs
"E402", # module level import not at top of file
"E501", # line too long
"E741", # ambiguous variable name
"F401", # "unused" imports
"F403", # can't detect undefined names from * import
"F405", # can't detect undefined names from * import
"F722", # syntax error in forward type annotation
"W191", # indentation contains tabs
"UP030", # Use implicit references for positional format fields (translations)
"UP031", # Use format specifiers instead of percent format
"UP032", # Use f-string instead of `format` call (translations)
"UP037", # quoted annotations
"UP040", # Use type aliases instead of type annotations
]
typing-modules = ["frappe.types.DF"]
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
docstring-code-format = true
[tool.mypy]
strict = false
pretty = true
incremental = true
files = [
"ai_employees/ai_employees/api/",
"ai_employees/ai_employees/services/",
"ai_employees/ai_employees/page/",
"ai_employees/ai_employees/integrations/",
]
exclude = [
'/test_.+\.py$',
'/deep_test_.+\.py$',
]
[[tool.mypy.overrides]]
module = "ai_employees.*"
disable_error_code = [
# basedmypy-specific noise from untyped Frappe API
"no-any-expr",
"no-untyped-def",
"no-untyped-call",
"no-untyped-usage",
"any",
"no-any-return",
"decorated-any",
"var-annotated",
"redundant-expr",
"unreachable",
# Frappe functions lack return type annotations so mypy thinks they return None
"func-returns-value",
"return-value",
# dict without type params — pervasive in Frappe API patterns
"type-arg",
# Frappe dynamic attribute access (doc.fieldname, frappe.flags.x)
"union-attr",
"attr-defined",
# BaseTool.execute() override pattern
"explicit-override",
# @frappe.whitelist() decorator is untyped
"misc",
# Conditional imports in try/except for optional dependencies (ollama, anthropic, etc.)
"possibly-undefined",
]
# External libraries without stubs
[[tool.mypy.overrides]]
module = [
"frappe.*",
"erpnext.*",
"hrms.*",
"helpdesk.*",
"wiki.*",
"google.*",
"anthropic.*",
"ollama.*",
"openai.*",
]
ignore_missing_imports = true