Skip to content

Commit 81158ea

Browse files
authored
Merge pull request #293 from espressif/chore/ruff_config_file
2 parents 5430083 + 59ac654 commit 81158ea

File tree

12 files changed

+75
-681
lines changed

12 files changed

+75
-681
lines changed

foreach.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@ res=0
1818

1919
# one-time command
2020
pip install -U pip
21-
if [ "$action" = "install-editable" ]; then
22-
pip install -U flit
23-
elif [ "$action" = "build" ]; then
21+
if [ "$action" = "build" ]; then
2422
pip install -U flit
2523
elif [ "$action" = "publish" ]; then
2624
pip install -U flit
2725
fi
2826

27+
# for-loop each package
2928
for pkg in $DEFAULT_PACKAGES; do
3029
pushd "$pkg"
3130
if [ "$action" = "install-editable" ]; then
32-
flit install -s
31+
pip install -e .
3332
elif [ "$action" = "install" ]; then
3433
pip install .
3534
elif [ "$action" = "uninstall" ]; then

pyproject.toml

-75
Original file line numberDiff line numberDiff line change
@@ -21,81 +21,6 @@ version_files = [
2121
"pytest-embedded-wokwi/pyproject.toml",
2222
]
2323

24-
[tool.isort]
25-
profile = 'black'
26-
27-
[tool.ruff]
28-
line-length = 120
29-
target-version = "py37"
30-
31-
[tool.ruff.lint]
32-
select = [
33-
'F', # Pyflakes
34-
'E', # pycodestyle
35-
'W', # pycodestyle
36-
# 'C90', # mccabe
37-
'I', # isort
38-
# 'N', # pep8-naming
39-
# 'D', # pydocstyle
40-
'UP', # pyupgrade
41-
'YTT', # flake8-2020
42-
# 'ANN', # flake8-annotations
43-
# 'ASYNC', # flake8-async
44-
# 'TRIO', # flake8-trio
45-
# 'S', # flake8-bandit
46-
# 'BLE', # flake8-blind-except
47-
# 'FBT', # flake8-boolean-trap
48-
# 'B', # flake8-bugbear
49-
'A', # flake8-builtins
50-
# 'COM', # flake8-commas
51-
# 'CPY', # flake8-copyright
52-
# 'C4', # flake8-comprehensions
53-
# 'DTZ', # flake8-datetimez
54-
# 'T10', # flake8-debugger
55-
# 'DJ', # flake8-django
56-
# 'EM', # flake8-errmsg
57-
# 'EXE', # flake8-executable
58-
# 'FA', # flake8-future-annotations
59-
# 'ISC', # flake8-implicit-str-concat
60-
# 'ICN', # flake8-import-conventions
61-
# 'G', # flake8-logging-format
62-
# 'INP', # flake8-no-pep420
63-
# 'PIE', # flake8-pie
64-
# 'T20', # flake8-print
65-
# 'PYI', # flake8-pyi
66-
# 'PT', # flake8-pytest-style
67-
# 'Q', # flake8-quotes
68-
# 'RSE', # flake8-raise
69-
# 'RET', # flake8-return
70-
# 'SLF', # flake8-self
71-
# 'SLOT', # flake8-slots
72-
# 'SIM', # flake8-simplify
73-
# 'TID', # flake8-tidy-imports
74-
# 'TCH', # flake8-type-checking
75-
# 'INT', # flake8-gettext
76-
'ARG', # flake8-unused-arguments
77-
# 'PTH', # flake8-use-pathlib
78-
# 'TD', # flake8-todos
79-
# 'FIX', # flake8-fixme
80-
'ERA', # eradicate
81-
# 'PD', # pandas-vet
82-
# 'PGH', # pygrep-hooks
83-
# 'PL', # Pylint
84-
# 'TRY', # tryceratops
85-
# 'FLY', # flynt
86-
# 'NPY', # NumPy-specific rules
87-
# 'AIR', # Airflow
88-
# 'PERF', # Perflint
89-
# 'FURB', # refurb
90-
'LOG', # flake8-logging
91-
'RUF', # Ruff-specific rules
92-
]
93-
94-
[tool.ruff.format]
95-
quote-style = "single"
96-
exclude = ["**/tests/*"]
97-
docstring-code-format = true
98-
9924
[tool.pytest.ini_options]
10025
norecursedirs = 'examples/*'
10126
addopts = "-s"

pytest-embedded-arduino/pyproject.toml

-75
Original file line numberDiff line numberDiff line change
@@ -44,78 +44,3 @@ homepage = "https://github.com/espressif/pytest-embedded"
4444
repository = "https://github.com/espressif/pytest-embedded"
4545
documentation = "https://docs.espressif.com/projects/pytest-embedded/en/latest/"
4646
changelog = "https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md"
47-
48-
[tool.isort]
49-
profile = 'black'
50-
51-
[tool.ruff]
52-
line-length = 120
53-
target-version = "py37"
54-
55-
[tool.ruff.lint]
56-
select = [
57-
'F', # Pyflakes
58-
'E', # pycodestyle
59-
'W', # pycodestyle
60-
# 'C90', # mccabe
61-
'I', # isort
62-
# 'N', # pep8-naming
63-
# 'D', # pydocstyle
64-
'UP', # pyupgrade
65-
'YTT', # flake8-2020
66-
# 'ANN', # flake8-annotations
67-
# 'ASYNC', # flake8-async
68-
# 'TRIO', # flake8-trio
69-
# 'S', # flake8-bandit
70-
# 'BLE', # flake8-blind-except
71-
# 'FBT', # flake8-boolean-trap
72-
# 'B', # flake8-bugbear
73-
'A', # flake8-builtins
74-
# 'COM', # flake8-commas
75-
# 'CPY', # flake8-copyright
76-
# 'C4', # flake8-comprehensions
77-
# 'DTZ', # flake8-datetimez
78-
# 'T10', # flake8-debugger
79-
# 'DJ', # flake8-django
80-
# 'EM', # flake8-errmsg
81-
# 'EXE', # flake8-executable
82-
# 'FA', # flake8-future-annotations
83-
# 'ISC', # flake8-implicit-str-concat
84-
# 'ICN', # flake8-import-conventions
85-
# 'G', # flake8-logging-format
86-
# 'INP', # flake8-no-pep420
87-
# 'PIE', # flake8-pie
88-
# 'T20', # flake8-print
89-
# 'PYI', # flake8-pyi
90-
# 'PT', # flake8-pytest-style
91-
# 'Q', # flake8-quotes
92-
# 'RSE', # flake8-raise
93-
# 'RET', # flake8-return
94-
# 'SLF', # flake8-self
95-
# 'SLOT', # flake8-slots
96-
# 'SIM', # flake8-simplify
97-
# 'TID', # flake8-tidy-imports
98-
# 'TCH', # flake8-type-checking
99-
# 'INT', # flake8-gettext
100-
'ARG', # flake8-unused-arguments
101-
# 'PTH', # flake8-use-pathlib
102-
# 'TD', # flake8-todos
103-
# 'FIX', # flake8-fixme
104-
'ERA', # eradicate
105-
# 'PD', # pandas-vet
106-
# 'PGH', # pygrep-hooks
107-
# 'PL', # Pylint
108-
# 'TRY', # tryceratops
109-
# 'FLY', # flynt
110-
# 'NPY', # NumPy-specific rules
111-
# 'AIR', # Airflow
112-
# 'PERF', # Perflint
113-
# 'FURB', # refurb
114-
'LOG', # flake8-logging
115-
'RUF', # Ruff-specific rules
116-
]
117-
118-
[tool.ruff.format]
119-
quote-style = "single"
120-
exclude = ["**/tests/*"]
121-
docstring-code-format = true

pytest-embedded-idf/pyproject.toml

-75
Original file line numberDiff line numberDiff line change
@@ -45,78 +45,3 @@ homepage = "https://github.com/espressif/pytest-embedded"
4545
repository = "https://github.com/espressif/pytest-embedded"
4646
documentation = "https://docs.espressif.com/projects/pytest-embedded/en/latest/"
4747
changelog = "https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md"
48-
49-
[tool.isort]
50-
profile = 'black'
51-
52-
[tool.ruff]
53-
line-length = 120
54-
target-version = "py37"
55-
56-
[tool.ruff.lint]
57-
select = [
58-
'F', # Pyflakes
59-
'E', # pycodestyle
60-
'W', # pycodestyle
61-
# 'C90', # mccabe
62-
'I', # isort
63-
# 'N', # pep8-naming
64-
# 'D', # pydocstyle
65-
'UP', # pyupgrade
66-
'YTT', # flake8-2020
67-
# 'ANN', # flake8-annotations
68-
# 'ASYNC', # flake8-async
69-
# 'TRIO', # flake8-trio
70-
# 'S', # flake8-bandit
71-
# 'BLE', # flake8-blind-except
72-
# 'FBT', # flake8-boolean-trap
73-
# 'B', # flake8-bugbear
74-
'A', # flake8-builtins
75-
# 'COM', # flake8-commas
76-
# 'CPY', # flake8-copyright
77-
# 'C4', # flake8-comprehensions
78-
# 'DTZ', # flake8-datetimez
79-
# 'T10', # flake8-debugger
80-
# 'DJ', # flake8-django
81-
# 'EM', # flake8-errmsg
82-
# 'EXE', # flake8-executable
83-
# 'FA', # flake8-future-annotations
84-
# 'ISC', # flake8-implicit-str-concat
85-
# 'ICN', # flake8-import-conventions
86-
# 'G', # flake8-logging-format
87-
# 'INP', # flake8-no-pep420
88-
# 'PIE', # flake8-pie
89-
# 'T20', # flake8-print
90-
# 'PYI', # flake8-pyi
91-
# 'PT', # flake8-pytest-style
92-
# 'Q', # flake8-quotes
93-
# 'RSE', # flake8-raise
94-
# 'RET', # flake8-return
95-
# 'SLF', # flake8-self
96-
# 'SLOT', # flake8-slots
97-
# 'SIM', # flake8-simplify
98-
# 'TID', # flake8-tidy-imports
99-
# 'TCH', # flake8-type-checking
100-
# 'INT', # flake8-gettext
101-
'ARG', # flake8-unused-arguments
102-
# 'PTH', # flake8-use-pathlib
103-
# 'TD', # flake8-todos
104-
# 'FIX', # flake8-fixme
105-
'ERA', # eradicate
106-
# 'PD', # pandas-vet
107-
# 'PGH', # pygrep-hooks
108-
# 'PL', # Pylint
109-
# 'TRY', # tryceratops
110-
# 'FLY', # flynt
111-
# 'NPY', # NumPy-specific rules
112-
# 'AIR', # Airflow
113-
# 'PERF', # Perflint
114-
# 'FURB', # refurb
115-
'LOG', # flake8-logging
116-
'RUF', # Ruff-specific rules
117-
]
118-
119-
[tool.ruff.format]
120-
quote-style = "single"
121-
exclude = ["**/tests/*"]
122-
docstring-code-format = true

pytest-embedded-idf/tests/test_idf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import xml.etree.ElementTree as ET
66

77
import pytest
8-
98
from pytest_embedded_idf.dut import IdfDut
109

1110
toolchain_required = pytest.mark.skipif(
@@ -184,7 +183,8 @@ def test_idf_serial_flash_with_erase_nvs(testdir):
184183
import pexpect
185184
import pytest
186185
187-
def test_idf_serial_flash(dut):
186+
def test_idf_serial_flash_with_erase_nvs(dut):
187+
dut.expect('Erasing region') # from "erase-nvs"
188188
dut.expect('Hash of data verified.') # from flash
189189
dut.expect('Hello world!')
190190
dut.expect('Restarting')

pytest-embedded-jtag/pyproject.toml

-75
Original file line numberDiff line numberDiff line change
@@ -38,78 +38,3 @@ homepage = "https://github.com/espressif/pytest-embedded"
3838
repository = "https://github.com/espressif/pytest-embedded"
3939
documentation = "https://docs.espressif.com/projects/pytest-embedded/en/latest/"
4040
changelog = "https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md"
41-
42-
[tool.isort]
43-
profile = 'black'
44-
45-
[tool.ruff]
46-
line-length = 120
47-
target-version = "py37"
48-
49-
[tool.ruff.lint]
50-
select = [
51-
'F', # Pyflakes
52-
'E', # pycodestyle
53-
'W', # pycodestyle
54-
# 'C90', # mccabe
55-
'I', # isort
56-
# 'N', # pep8-naming
57-
# 'D', # pydocstyle
58-
'UP', # pyupgrade
59-
'YTT', # flake8-2020
60-
# 'ANN', # flake8-annotations
61-
# 'ASYNC', # flake8-async
62-
# 'TRIO', # flake8-trio
63-
# 'S', # flake8-bandit
64-
# 'BLE', # flake8-blind-except
65-
# 'FBT', # flake8-boolean-trap
66-
# 'B', # flake8-bugbear
67-
'A', # flake8-builtins
68-
# 'COM', # flake8-commas
69-
# 'CPY', # flake8-copyright
70-
# 'C4', # flake8-comprehensions
71-
# 'DTZ', # flake8-datetimez
72-
# 'T10', # flake8-debugger
73-
# 'DJ', # flake8-django
74-
# 'EM', # flake8-errmsg
75-
# 'EXE', # flake8-executable
76-
# 'FA', # flake8-future-annotations
77-
# 'ISC', # flake8-implicit-str-concat
78-
# 'ICN', # flake8-import-conventions
79-
# 'G', # flake8-logging-format
80-
# 'INP', # flake8-no-pep420
81-
# 'PIE', # flake8-pie
82-
# 'T20', # flake8-print
83-
# 'PYI', # flake8-pyi
84-
# 'PT', # flake8-pytest-style
85-
# 'Q', # flake8-quotes
86-
# 'RSE', # flake8-raise
87-
# 'RET', # flake8-return
88-
# 'SLF', # flake8-self
89-
# 'SLOT', # flake8-slots
90-
# 'SIM', # flake8-simplify
91-
# 'TID', # flake8-tidy-imports
92-
# 'TCH', # flake8-type-checking
93-
# 'INT', # flake8-gettext
94-
'ARG', # flake8-unused-arguments
95-
# 'PTH', # flake8-use-pathlib
96-
# 'TD', # flake8-todos
97-
# 'FIX', # flake8-fixme
98-
'ERA', # eradicate
99-
# 'PD', # pandas-vet
100-
# 'PGH', # pygrep-hooks
101-
# 'PL', # Pylint
102-
# 'TRY', # tryceratops
103-
# 'FLY', # flynt
104-
# 'NPY', # NumPy-specific rules
105-
# 'AIR', # Airflow
106-
# 'PERF', # Perflint
107-
# 'FURB', # refurb
108-
'LOG', # flake8-logging
109-
'RUF', # Ruff-specific rules
110-
]
111-
112-
[tool.ruff.format]
113-
quote-style = "single"
114-
exclude = ["**/tests/*"]
115-
docstring-code-format = true

0 commit comments

Comments
 (0)