-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
56 lines (49 loc) · 1.74 KB
/
Copy pathpyproject.toml
File metadata and controls
56 lines (49 loc) · 1.74 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
[project]
name = "moku-examples"
description = "Moku examples for Python API, MATLAB API, and other languages"
version = "1.0.0"
requires-python = ">= 3.9"
dependencies = [
"moku >=3.0.0"
]
[project.optional-dependencies]
dev = [
"mypy", # Type checker for pre-commit hooks
"opencv-stubs", # Type stubs for opencv-python
]
[tool.ruff]
line-length = 99
target-version = "py39"
[tool.ruff.lint]
# Enable some basic rules but avoid being too strict for examples
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
ignore = [
"E501", # Line too long (handled by formatter)
"E731", # Lambda assignment (sometimes useful for register calculations)
"F841", # Unused variables (common in examples)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
"**/examples/*" = ["F841"] # Allow unused variables in examples
"python-api/*" = ["F841"] # Allow unused variables in examples
"neural-network/*" = ["F841"] # Allow unused variables in examples
[tool.ruff.format]
quote-style = "preserve" # Preserve existing quote style (allows single quotes)
[tool.ruff.lint.isort]
required-imports = [] # No specific required imports
combine-as-imports = true # Combine multiple imports from same module
force-single-line = false # Allow multi-line imports
force-sort-within-sections = true # Sort imports within sections
known-first-party = ["moku"] # Identify moku as first-party for proper sectioning
[tool.mypy]
python_version = "3.9"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false # More lenient for examples
ignore_missing_imports = true # Ignore missing type stubs for examples
show_error_codes = true