Skip to content

Commit

Permalink
Merge pull request #293 from espressif/chore/ruff_config_file
Browse files Browse the repository at this point in the history
  • Loading branch information
hfudev authored May 28, 2024
2 parents 5430083 + 59ac654 commit 81158ea
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 681 deletions.
7 changes: 3 additions & 4 deletions foreach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@ res=0

# one-time command
pip install -U pip
if [ "$action" = "install-editable" ]; then
pip install -U flit
elif [ "$action" = "build" ]; then
if [ "$action" = "build" ]; then
pip install -U flit
elif [ "$action" = "publish" ]; then
pip install -U flit
fi

# for-loop each package
for pkg in $DEFAULT_PACKAGES; do
pushd "$pkg"
if [ "$action" = "install-editable" ]; then
flit install -s
pip install -e .
elif [ "$action" = "install" ]; then
pip install .
elif [ "$action" = "uninstall" ]; then
Expand Down
75 changes: 0 additions & 75 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,81 +21,6 @@ version_files = [
"pytest-embedded-wokwi/pyproject.toml",
]

[tool.isort]
profile = 'black'

[tool.ruff]
line-length = 120
target-version = "py37"

[tool.ruff.lint]
select = [
'F', # Pyflakes
'E', # pycodestyle
'W', # pycodestyle
# 'C90', # mccabe
'I', # isort
# 'N', # pep8-naming
# 'D', # pydocstyle
'UP', # pyupgrade
'YTT', # flake8-2020
# 'ANN', # flake8-annotations
# 'ASYNC', # flake8-async
# 'TRIO', # flake8-trio
# 'S', # flake8-bandit
# 'BLE', # flake8-blind-except
# 'FBT', # flake8-boolean-trap
# 'B', # flake8-bugbear
'A', # flake8-builtins
# 'COM', # flake8-commas
# 'CPY', # flake8-copyright
# 'C4', # flake8-comprehensions
# 'DTZ', # flake8-datetimez
# 'T10', # flake8-debugger
# 'DJ', # flake8-django
# 'EM', # flake8-errmsg
# 'EXE', # flake8-executable
# 'FA', # flake8-future-annotations
# 'ISC', # flake8-implicit-str-concat
# 'ICN', # flake8-import-conventions
# 'G', # flake8-logging-format
# 'INP', # flake8-no-pep420
# 'PIE', # flake8-pie
# 'T20', # flake8-print
# 'PYI', # flake8-pyi
# 'PT', # flake8-pytest-style
# 'Q', # flake8-quotes
# 'RSE', # flake8-raise
# 'RET', # flake8-return
# 'SLF', # flake8-self
# 'SLOT', # flake8-slots
# 'SIM', # flake8-simplify
# 'TID', # flake8-tidy-imports
# 'TCH', # flake8-type-checking
# 'INT', # flake8-gettext
'ARG', # flake8-unused-arguments
# 'PTH', # flake8-use-pathlib
# 'TD', # flake8-todos
# 'FIX', # flake8-fixme
'ERA', # eradicate
# 'PD', # pandas-vet
# 'PGH', # pygrep-hooks
# 'PL', # Pylint
# 'TRY', # tryceratops
# 'FLY', # flynt
# 'NPY', # NumPy-specific rules
# 'AIR', # Airflow
# 'PERF', # Perflint
# 'FURB', # refurb
'LOG', # flake8-logging
'RUF', # Ruff-specific rules
]

[tool.ruff.format]
quote-style = "single"
exclude = ["**/tests/*"]
docstring-code-format = true

[tool.pytest.ini_options]
norecursedirs = 'examples/*'
addopts = "-s"
75 changes: 0 additions & 75 deletions pytest-embedded-arduino/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,78 +44,3 @@ homepage = "https://github.com/espressif/pytest-embedded"
repository = "https://github.com/espressif/pytest-embedded"
documentation = "https://docs.espressif.com/projects/pytest-embedded/en/latest/"
changelog = "https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md"

[tool.isort]
profile = 'black'

[tool.ruff]
line-length = 120
target-version = "py37"

[tool.ruff.lint]
select = [
'F', # Pyflakes
'E', # pycodestyle
'W', # pycodestyle
# 'C90', # mccabe
'I', # isort
# 'N', # pep8-naming
# 'D', # pydocstyle
'UP', # pyupgrade
'YTT', # flake8-2020
# 'ANN', # flake8-annotations
# 'ASYNC', # flake8-async
# 'TRIO', # flake8-trio
# 'S', # flake8-bandit
# 'BLE', # flake8-blind-except
# 'FBT', # flake8-boolean-trap
# 'B', # flake8-bugbear
'A', # flake8-builtins
# 'COM', # flake8-commas
# 'CPY', # flake8-copyright
# 'C4', # flake8-comprehensions
# 'DTZ', # flake8-datetimez
# 'T10', # flake8-debugger
# 'DJ', # flake8-django
# 'EM', # flake8-errmsg
# 'EXE', # flake8-executable
# 'FA', # flake8-future-annotations
# 'ISC', # flake8-implicit-str-concat
# 'ICN', # flake8-import-conventions
# 'G', # flake8-logging-format
# 'INP', # flake8-no-pep420
# 'PIE', # flake8-pie
# 'T20', # flake8-print
# 'PYI', # flake8-pyi
# 'PT', # flake8-pytest-style
# 'Q', # flake8-quotes
# 'RSE', # flake8-raise
# 'RET', # flake8-return
# 'SLF', # flake8-self
# 'SLOT', # flake8-slots
# 'SIM', # flake8-simplify
# 'TID', # flake8-tidy-imports
# 'TCH', # flake8-type-checking
# 'INT', # flake8-gettext
'ARG', # flake8-unused-arguments
# 'PTH', # flake8-use-pathlib
# 'TD', # flake8-todos
# 'FIX', # flake8-fixme
'ERA', # eradicate
# 'PD', # pandas-vet
# 'PGH', # pygrep-hooks
# 'PL', # Pylint
# 'TRY', # tryceratops
# 'FLY', # flynt
# 'NPY', # NumPy-specific rules
# 'AIR', # Airflow
# 'PERF', # Perflint
# 'FURB', # refurb
'LOG', # flake8-logging
'RUF', # Ruff-specific rules
]

[tool.ruff.format]
quote-style = "single"
exclude = ["**/tests/*"]
docstring-code-format = true
75 changes: 0 additions & 75 deletions pytest-embedded-idf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,78 +45,3 @@ homepage = "https://github.com/espressif/pytest-embedded"
repository = "https://github.com/espressif/pytest-embedded"
documentation = "https://docs.espressif.com/projects/pytest-embedded/en/latest/"
changelog = "https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md"

[tool.isort]
profile = 'black'

[tool.ruff]
line-length = 120
target-version = "py37"

[tool.ruff.lint]
select = [
'F', # Pyflakes
'E', # pycodestyle
'W', # pycodestyle
# 'C90', # mccabe
'I', # isort
# 'N', # pep8-naming
# 'D', # pydocstyle
'UP', # pyupgrade
'YTT', # flake8-2020
# 'ANN', # flake8-annotations
# 'ASYNC', # flake8-async
# 'TRIO', # flake8-trio
# 'S', # flake8-bandit
# 'BLE', # flake8-blind-except
# 'FBT', # flake8-boolean-trap
# 'B', # flake8-bugbear
'A', # flake8-builtins
# 'COM', # flake8-commas
# 'CPY', # flake8-copyright
# 'C4', # flake8-comprehensions
# 'DTZ', # flake8-datetimez
# 'T10', # flake8-debugger
# 'DJ', # flake8-django
# 'EM', # flake8-errmsg
# 'EXE', # flake8-executable
# 'FA', # flake8-future-annotations
# 'ISC', # flake8-implicit-str-concat
# 'ICN', # flake8-import-conventions
# 'G', # flake8-logging-format
# 'INP', # flake8-no-pep420
# 'PIE', # flake8-pie
# 'T20', # flake8-print
# 'PYI', # flake8-pyi
# 'PT', # flake8-pytest-style
# 'Q', # flake8-quotes
# 'RSE', # flake8-raise
# 'RET', # flake8-return
# 'SLF', # flake8-self
# 'SLOT', # flake8-slots
# 'SIM', # flake8-simplify
# 'TID', # flake8-tidy-imports
# 'TCH', # flake8-type-checking
# 'INT', # flake8-gettext
'ARG', # flake8-unused-arguments
# 'PTH', # flake8-use-pathlib
# 'TD', # flake8-todos
# 'FIX', # flake8-fixme
'ERA', # eradicate
# 'PD', # pandas-vet
# 'PGH', # pygrep-hooks
# 'PL', # Pylint
# 'TRY', # tryceratops
# 'FLY', # flynt
# 'NPY', # NumPy-specific rules
# 'AIR', # Airflow
# 'PERF', # Perflint
# 'FURB', # refurb
'LOG', # flake8-logging
'RUF', # Ruff-specific rules
]

[tool.ruff.format]
quote-style = "single"
exclude = ["**/tests/*"]
docstring-code-format = true
4 changes: 2 additions & 2 deletions pytest-embedded-idf/tests/test_idf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import xml.etree.ElementTree as ET

import pytest

from pytest_embedded_idf.dut import IdfDut

toolchain_required = pytest.mark.skipif(
Expand Down Expand Up @@ -184,7 +183,8 @@ def test_idf_serial_flash_with_erase_nvs(testdir):
import pexpect
import pytest
def test_idf_serial_flash(dut):
def test_idf_serial_flash_with_erase_nvs(dut):
dut.expect('Erasing region') # from "erase-nvs"
dut.expect('Hash of data verified.') # from flash
dut.expect('Hello world!')
dut.expect('Restarting')
Expand Down
75 changes: 0 additions & 75 deletions pytest-embedded-jtag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,78 +38,3 @@ homepage = "https://github.com/espressif/pytest-embedded"
repository = "https://github.com/espressif/pytest-embedded"
documentation = "https://docs.espressif.com/projects/pytest-embedded/en/latest/"
changelog = "https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md"

[tool.isort]
profile = 'black'

[tool.ruff]
line-length = 120
target-version = "py37"

[tool.ruff.lint]
select = [
'F', # Pyflakes
'E', # pycodestyle
'W', # pycodestyle
# 'C90', # mccabe
'I', # isort
# 'N', # pep8-naming
# 'D', # pydocstyle
'UP', # pyupgrade
'YTT', # flake8-2020
# 'ANN', # flake8-annotations
# 'ASYNC', # flake8-async
# 'TRIO', # flake8-trio
# 'S', # flake8-bandit
# 'BLE', # flake8-blind-except
# 'FBT', # flake8-boolean-trap
# 'B', # flake8-bugbear
'A', # flake8-builtins
# 'COM', # flake8-commas
# 'CPY', # flake8-copyright
# 'C4', # flake8-comprehensions
# 'DTZ', # flake8-datetimez
# 'T10', # flake8-debugger
# 'DJ', # flake8-django
# 'EM', # flake8-errmsg
# 'EXE', # flake8-executable
# 'FA', # flake8-future-annotations
# 'ISC', # flake8-implicit-str-concat
# 'ICN', # flake8-import-conventions
# 'G', # flake8-logging-format
# 'INP', # flake8-no-pep420
# 'PIE', # flake8-pie
# 'T20', # flake8-print
# 'PYI', # flake8-pyi
# 'PT', # flake8-pytest-style
# 'Q', # flake8-quotes
# 'RSE', # flake8-raise
# 'RET', # flake8-return
# 'SLF', # flake8-self
# 'SLOT', # flake8-slots
# 'SIM', # flake8-simplify
# 'TID', # flake8-tidy-imports
# 'TCH', # flake8-type-checking
# 'INT', # flake8-gettext
'ARG', # flake8-unused-arguments
# 'PTH', # flake8-use-pathlib
# 'TD', # flake8-todos
# 'FIX', # flake8-fixme
'ERA', # eradicate
# 'PD', # pandas-vet
# 'PGH', # pygrep-hooks
# 'PL', # Pylint
# 'TRY', # tryceratops
# 'FLY', # flynt
# 'NPY', # NumPy-specific rules
# 'AIR', # Airflow
# 'PERF', # Perflint
# 'FURB', # refurb
'LOG', # flake8-logging
'RUF', # Ruff-specific rules
]

[tool.ruff.format]
quote-style = "single"
exclude = ["**/tests/*"]
docstring-code-format = true
Loading

0 comments on commit 81158ea

Please sign in to comment.