File size: 1,295 Bytes
1baebae
 
caf6ee7
1baebae
 
caf6ee7
1baebae
 
caf6ee7
 
 
 
 
 
1baebae
caf6ee7
 
 
 
 
 
 
 
 
 
 
 
 
 
37d4614
caf6ee7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[tool.ruff]
line-length = 100
target-version = "py39" # Ensures ruff uses 3.9 compatible syntax

[tool.ruff.lint]
select = ["E", "W", "F", "I", "B", "N", "UP"]
ignore = ["E501"]

[tool.ruff.lint.isort]
# This makes your imports look like a professional library
combine-as-imports = true
force-wrap-aliases = true
known-first-party = ["src"] # Treats your 'src' folder as a local package

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false

[tool.ruff.lint.pep8-naming]
# Add your custom class name here
ignore-names = ["sitk", "NormalizeIntensity_custom", "NormalizeIntensity_customd"]

[tool.mypy]
ignore_missing_imports = true
disable_error_code = ["override", "import-untyped"]
mypy_path = "."
pretty = true
show_error_codes = true
exclude = ["^app\\.py$"]

[[tool.mypy.overrides]]
# These settings apply specifically to these external libraries
module = [
    "yaml.*",
    "nrrd.*",
    "nibabel.*",
    "scipy.*",
    "sklearn.*"
]
ignore_missing_imports = true

[tool.pytest.ini_options]
# Automatically adds these flags every time you run 'pytest'
addopts = "-v --showlocals --durations=5"

# Where pytest should look for tests
testpaths = ["tests"]

# Patterns to identify test files
python_files = "test_*.py"
python_functions = "test_*"