Skip to content

Commit 8638403

Browse files
committed
fix(lint): Move some whitelinsting to the source code file
1 parent 288b609 commit 8638403

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

ardupilot_methodic_configurator/annotate_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ def get_xml_data(base_url: str, directory: str, filename: str, vehicle_type: str
394394
# No locally cached file exists, get it from the internet
395395
try:
396396
# pylint: disable=import-outside-toplevel
397-
from requests import exceptions as requests_exceptions # type: ignore[import-untyped]
398-
from requests import get as requests_get
397+
from requests import exceptions as requests_exceptions # type: ignore[import-untyped] # noqa: PLC0415
398+
from requests import get as requests_get # noqa: PLC0415
399399

400400
# pylint: enable=import-outside-toplevel
401401
except ImportError as exc:

ardupilot_methodic_configurator/frontend_tkinter_component_editor_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def create_for_testing(
559559
560560
"""
561561
# Import MagicMock at the method level to avoid import issues
562-
from unittest.mock import MagicMock # pylint: disable=import-outside-toplevel
562+
from unittest.mock import MagicMock # pylint: disable=import-outside-toplevel # noqa: PLC0415
563563

564564
if local_filesystem is None:
565565
# Create a minimal mock filesystem for testing

ardupilot_methodic_configurator/frontend_tkinter_pair_tuple_combobox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ def main() -> None:
249249
root.geometry("400x100") # Set a size for the window
250250

251251
# Generate 20 random strings between 4 and 70 characters
252-
import random # pylint: disable=import-outside-toplevel
253-
import string # pylint: disable=import-outside-toplevel
252+
import random # pylint: disable=import-outside-toplevel # noqa: PLC0415
253+
import string # pylint: disable=import-outside-toplevel # noqa: PLC0415
254254

255255
random_strings = [
256256
"".join(random.choices(string.ascii_letters + string.digits, k=random.randint(4, 70))) # noqa: S311

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ indent-width = 4
211211
"ardupilot_methodic_configurator/backend_mavftp.py" = ["PGH004", "N801", "ANN001"]
212212
"ardupilot_methodic_configurator/backend_mavftp_example.py" = ["ANN001"]
213213
"ardupilot_methodic_configurator/tempcal_imu.py" = ["ANN001"]
214-
"ardupilot_methodic_configurator/annotate_params.py" = ["PLC0415"]
215-
"ardupilot_methodic_configurator/frontend_tkinter_component_editor_base.py" = ["PLC0415"]
216-
"ardupilot_methodic_configurator/frontend_tkinter_pair_tuple_combobox.py" = ["PLC0415"]
217214

218215
[tool.ruff.lint.mccabe]
219216
max-complexity = 22 # Default is 10

0 commit comments

Comments
 (0)