File tree 9 files changed +20
-31
lines changed
9 files changed +20
-31
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
24
COPY .devcontainer/requirements.txt .
25
25
RUN python3 -m venv /opt/venv
26
26
ENV PATH="/opt/venv/bin:$PATH"
27
- RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel isort
27
+ RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel
28
28
RUN pip3 install --no-cache-dir -r requirements.txt
29
29
30
30
RUN find /opt/venv/lib/ -follow -type f -name '*.a' -delete \
Original file line number Diff line number Diff line change 26
26
" bungcip.better-toml" ,
27
27
" github.copilot" ,
28
28
" ms-azuretools.vscode-docker" ,
29
+ " charliermarsh.ruff" ,
29
30
" ms-python.python" ,
30
31
" ms-python.vscode-pylance" ,
31
32
" ms-vscode-remote.remote-containers" ,
37
38
],
38
39
"settings" : {
39
40
"python.analysis.typeCheckingMode" : " basic" ,
40
- "python.languageServer" : " Jedi" ,
41
41
"python.linting.enabled" : true ,
42
- "python.linting.pylintEnabled" : true ,
43
- "python.formatting.provider" : " black" ,
44
42
"python.testing.pytestArgs" : [
45
43
" tests"
46
44
],
52
50
"editor.formatOnSave" : true ,
53
51
"editor.inlineSuggest.enabled" : true ,
54
52
"editor.codeActionsOnSave" : {
55
- "source.organizeImports" : true
53
+ "source.organizeImports" : true ,
54
+ "source.fixAll" : true
56
55
},
57
56
"workbench.editorAssociations" : {
58
57
"*.ipynb" : " jupyter-notebook"
Original file line number Diff line number Diff line change 2
2
mypy >= 0.900
3
3
numpy >= 1.22.0
4
4
pre-commit >= 2.18.0
5
- pylint >= 2.5.0
6
5
pytest >= 6.0.0
6
+ ruff
7
7
scipy >= 1.10.0
Original file line number Diff line number Diff line change 6
6
* .pyc
7
7
.pytest_cache /
8
8
.mypy_cache /
9
+ .ruff_cache /
9
10
10
11
data /
11
12
models /
Original file line number Diff line number Diff line change 40
40
run : |
41
41
python -m pip install --upgrade pip wheel setuptools
42
42
python -m pip install -r .devcontainer/requirements.txt
43
- - name : Lint with pylint
43
+ - name : Ruff
44
44
run : |
45
- pylint src
45
+ ruff check src
46
46
- name : Test with PyTest
47
47
run : |
48
48
pytest -v .
Original file line number Diff line number Diff line change 4
4
* .pyc
5
5
.pytest_cache /
6
6
.mypy_cache /
7
+ .ruff_cache /
7
8
8
9
venv /
9
10
data /
Original file line number Diff line number Diff line change 18
18
rev : v1.3.0
19
19
hooks :
20
20
- id : mypy
21
- - repo : https://github.com/pycqa/isort
22
- rev : 5.12.0
21
+ - repo : https://github.com/astral-sh/ruff-pre-commit
22
+ rev : v0.0.269
23
23
hooks :
24
- - id : isort
25
- args : ["--profile", "black"]
24
+ - id : ruff
Original file line number Diff line number Diff line change 10
10
find . -type f -name " __pycache__" -delete
11
11
rm -rf .mypy_cache/
12
12
rm -rf .pytest_cache/
13
+ rm -rf .ruff_cache/
13
14
14
15
# # Testing
15
16
test :
18
19
# # Basic linting
19
20
lint :
20
21
black src
21
- isort src --profile=black
22
+ ruff check src
22
23
mypy src
23
- pylint src
Original file line number Diff line number Diff line change 1
- [tool .isort ]
2
- profile = " black"
3
-
4
- [tool .black ]
1
+ [tool .ruff ]
2
+ select = [" E" , " F" ]
5
3
line-length = 88
6
4
7
- [tool .pylint .messages_control ]
8
- disable = [
9
- " no-member" ,
10
- " too-many-arguments" ,
11
- " too-few-public-methods" ,
12
- " no-else-return" ,
13
- " duplicate-code" ,
14
- " too-many-branches" ,
15
- " redefined-builtin" ,
16
- " dangerous-default-value" ,
17
- ]
5
+ [tool .ruff .isort ]
6
+ lines-after-imports = 2
18
7
19
- [tool .pylint . format ]
20
- max- line-length = 88
8
+ [tool .black ]
9
+ line-length = 88
21
10
22
11
[[tool .mypy .overrides ]]
23
12
ignore_missing_imports = true
You can’t perform that action at this time.
0 commit comments