-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_code_args.yaml
53 lines (47 loc) · 2 KB
/
check_code_args.yaml
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
# Tools that `check_code.py` will run. Keys that can be defined:
# tool [MANDATORY]: Tool that will bee used. Must be in dev dependencies from poetry.
# tool_desc: Description of the tool that will be printed.
# suggestions: Suggestions about what to do it tool fails
# extra_args: Extra arguments that will be passed after {tool} keyword.
# ignore: From the returned string when the tool fails, lines that have these words will be removed from the output.
# only_include: From the returned string when the tool fails, only these lines containing these strings will be
# included.
# pass_if_output_contains: Although the return code might be ERROR, it will be considered OK if the output string
# contains any of these strings.
- tool: codespell
path: tests lazy_type_hint README.md
tool_desc: Check for typos
suggestions: Fix typos found by the tool
- tool: black
path: .
extra_args: --check
tool_desc: Check format of the Python code
suggestions: Run `poetry run black .` before calling the script to reformat code and fix it automatically
ignore: # These lines were just too verbosed, so they are just ignored
- Skipping .ipynb
- You can fix this by running
- Oh no
- tool: ruff
path: .
extra_args: check
tool_desc: Statically check Python code
suggestions:
[
"Address all problems highlighted by the tool",
"If you need a description for the rule, call `poetry run ruff rule <RULE_CODE>`",
"If it is a false positive, add `# noqa: <RULE_CODE>` next to the triggering line",
]
- tool: mypy
path: .
tool_desc: Check type coherency within the Python code
suggestions:
[
"There seems to be type inconsistencies",
"If it is a false positive, add `# type: ignore` next to the triggering line",
]
- tool: pytest
extra_args: --collect-only
tool_desc: Check that all tests can be launched
- tool: pytest
tool_desc: Launch all tests in the repository
suggestions: Not all tests passed. Run `poetry run pytest -vv` to get a better colored output