Skip to content

Commit fb78e73

Browse files
tonis2claude
andcommitted
Fix pylint import order in tests for any checkout directory name
pylint only classifies node_runner as a first-party import when the checkout directory happens to be named "node_runner". CI checks out into a directory named after the repository, so node_runner was treated as third party while tests.helpers was first party, and every test that imported both was reported as C0411 wrong-import-order. Importing node_runner before tests.helpers satisfies the rule under both layouts: third-party-before-first-party when the folder name differs, and same-group when it matches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YZzPV4TzpvkQroARk4K4Hg
1 parent 1b46c6c commit fb78e73

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test_deserialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from unittest.mock import MagicMock
44

5-
from tests.helpers import MockNodeTree, MockSocket
6-
75
from node_runner.deserialize import (
86
get_node_socket_base_type,
97
get_socket_by_identifier,
@@ -12,6 +10,8 @@
1210
deserialize_node_tree,
1311
)
1412

13+
from tests.helpers import MockNodeTree, MockSocket
14+
1515

1616
class TestGetNodeSocketBaseType:
1717
"""Test socket type resolution."""

tests/test_geometry_nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
from unittest.mock import MagicMock
88

9-
from tests.helpers import MockNode, MockNodeTree
10-
119
from node_runner.serialize import serialize_node_tree
1210
from node_runner.encoding import (
1311
encode,
@@ -20,6 +18,8 @@
2018
decode_xml,
2119
)
2220

21+
from tests.helpers import MockNode, MockNodeTree
22+
2323

2424
class TestSerializeGeometryTree:
2525
"""Geometry node trees should serialize with tree_type set."""

tests/test_serialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
from mathutils import Color, Euler, Vector
66

7-
from tests.helpers import MockNode, MockNodeTree, MockRNAProperty
8-
97
from node_runner.serialize import (
108
serialize_color,
119
serialize_vector,
@@ -16,6 +14,8 @@
1614
serialize_node_tree,
1715
)
1816

17+
from tests.helpers import MockNode, MockNodeTree, MockRNAProperty
18+
1919

2020
class TestPrimitiveSerializers:
2121
"""Test basic type serializers."""

0 commit comments

Comments
 (0)