Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
69 lines (65 loc) · 1.91 KB
/
Copy pathpyproject.toml
File metadata and controls
69 lines (65 loc) · 1.91 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
[build-system]
requires = ["setuptools >= 64"]
build-backend = "setuptools.build_meta"
# -------------------------------
# tool.ruff - Linting configuration
# -------------------------------
[tool.ruff]
# Note: While the formatter will attempt to format lines such that they remain within the line-length,
# it isn't a hard upper bound, and formatted lines may exceed the line-length.
target-version = "py39"
line-length = 120
exclude = [
"tests/utils/test_data_utils.py",
"tests/pipeline/test_memory_safe_vllm_inferencer.py",
"tests/models/test_hf_decoder_model.py",
"src/lmflow/pipeline/utils/raft_trainer.py",
"src/lmflow/pipeline/raft_aligner.py",
"examples/chatbot_gradio.py",
]
[tool.ruff.lint]
isort = {known-first-party = ["lmflow"]}
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# isort
"I",
"G",
]
ignore = [
# star imports
"F405", "F403",
# lambda expression assignment
"E731",
# Loop control variable not used within loop body
"B007",
# f-string format
"UP032",
# Can remove once 3.10+ is the minimum Python version
"UP007",
# `.log()` statement uses f-string
"G004",
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["F841"]
"tests/pipeline/test_sglang_infernecer.py" = ["E402"]
"tests/pipeline/test_vllm_inferencer.py" = ["E402"]
"src/lmflow/utils/conversation_template/*.py" = ["E501"]
"src/lmflow/utils/llava_conversation_lib.py" = ["E501"]
"src/lmflow/utils/constants.py" = ["E501"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"gpu: requires a GPU",
"slow: takes substantially longer than the unit-test suite",
"online: requires network access or a remote model/dataset",
"optional_backend: requires an optional inference backend",
"lmflow_core: tests for core LMFlow functionality",
"dothis: mark for developers to run explicitly",
]