forked from PrairieLearn/PrairieLearn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
107 lines (102 loc) · 4.47 KB
/
pyproject.toml
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
[tool.ruff]
include = [
"./apps/prairielearn/elements/**/*.py",
"./apps/prairielearn/python/*.py",
"./graders/**/*.py",
"./exampleCourse/**/*.py",
"./testCourse/**/*.py"
]
exclude = [
# These files are intentionally not parseable as Python.
"./exampleCourse/questions/demo/autograder/codeUpload/submitted_code_samples/fib_error_binary_file/fib.py",
"./exampleCourse/questions/demo/autograder/codeUpload/submitted_code_samples/fib_error_large_text_file/fib.py",
]
target-version = "py310"
[tool.ruff.lint]
extend-select = ["I"]
[tool.ruff.lint.per-file-ignores]
# Files related to the Python autograder will often intentionally appear
# broken in isolation. We'll allow specific errors in these files to
# account for that.
#
# - F401: module imported but unused
# - F821: undefined name
# - F841: local variable name is assigned to but never used
# - E999: SyntaxError
"exampleCourse/questions/**/tests/setup_code.py" = ["F401", "F821"]
"exampleCourse/questions/**/tests/initial_code.py" = ["F401", "F821", "E999"]
"exampleCourse/questions/**/tests/leading_code.py" = ["F401", "F821", "F841"]
"exampleCourse/questions/**/tests/trailing_code.py" = ["F821", "E999"]
"exampleCourse/questions/**/tests/ans.py" = ["F821"]
# Questions commonly use "ambiguous variable names" to represent specific
# concepts, e.g. I for an identity matrix. We'll allow these to be used in
# questions.
"exampleCourse/questions/**/*.py" = ["E741"]
# The zygote specifically uses imports in strange places to facilitate the
# preloading of commonly-used modules.
"zygote.py" = ["E402", "F401"]
[tool.ruff.format]
exclude = [
"./exampleCourse/questions/demo/autograder/python/leadingTrailing/tests/trailing_code.py",
"./exampleCourse/questions/demo/autograder/python/square/tests/initial_code.py"
]
[tool.pyright]
include = [
"./apps/prairielearn/elements/pl-answer-panel",
"./apps/prairielearn/elements/pl-big-o-input",
"./apps/prairielearn/elements/pl-card",
"./apps/prairielearn/elements/pl-code",
"./apps/prairielearn/elements/pl-dataframe",
"./apps/prairielearn/elements/pl-external-grader-results",
"./apps/prairielearn/elements/pl-external-grader-variables",
"./apps/prairielearn/elements/pl-figure",
"./apps/prairielearn/elements/pl-file-download",
"./apps/prairielearn/elements/pl-file-editor",
"./apps/prairielearn/elements/pl-file-preview",
"./apps/prairielearn/elements/pl-file-upload",
"./apps/prairielearn/elements/pl-graph",
"./apps/prairielearn/elements/pl-hidden-hints",
"./apps/prairielearn/elements/pl-hide-in-manual-grading",
"./apps/prairielearn/elements/pl-hide-in-panel",
"./apps/prairielearn/elements/pl-integer-input",
"./apps/prairielearn/elements/pl-manual-grading-only",
"./apps/prairielearn/elements/pl-matrix-latex",
"./apps/prairielearn/elements/pl-multiple-choice",
"./apps/prairielearn/elements/pl-number-input",
"./apps/prairielearn/elements/pl-overlay",
"./apps/prairielearn/elements/pl-order-blocks",
"./apps/prairielearn/elements/pl-python-variable",
"./apps/prairielearn/elements/pl-question-panel",
"./apps/prairielearn/elements/pl-string-input",
"./apps/prairielearn/elements/pl-submission-panel",
"./apps/prairielearn/elements/pl-symbolic-input",
"./apps/prairielearn/elements/pl-template",
"./apps/prairielearn/elements/pl-units-input",
"./apps/prairielearn/elements/pl-variable-output",
"./apps/prairielearn/elements/pl-workspace",
"./apps/prairielearn/elements/pl-xss-safe",
"./apps/prairielearn/python/check_data_test.py",
"./apps/prairielearn/python/check_data.py",
"./apps/prairielearn/python/colors_test.py",
"./apps/prairielearn/python/colors.py",
"./apps/prairielearn/python/conftest.py",
"./apps/prairielearn/python/prairielearn_test.py",
"./apps/prairielearn/python/prairielearn.py",
"./apps/prairielearn/python/python_helper_sympy_test.py",
"./apps/prairielearn/python/python_helper_sympy.py",
"./apps/prairielearn/python/question_phases.py",
"./apps/prairielearn/python/traverse_test.py",
"./apps/prairielearn/python/traverse.py",
"./apps/prairielearn/python/zygote.py",
"./apps/prairielearn/python/zygote_utils.py",
"./apps/prairielearn/python/zygote_utils_test.py",
]
extraPaths = ["./apps/prairielearn/python"]
pythonVersion = "3.10"
reportUnnecessaryTypeIgnoreComment = "error"
[tool.pytest.ini_options]
addopts = "--cov=apps"
testpaths = [
"apps/prairielearn/elements",
"apps/prairielearn/python",
]