Skip to content

Commit fc0d06a

Browse files
authored
Merge pull request #2067 from tisnik/lcore-2334-use-specific-rule-code-for-ignore-type-issues
LCORE-2334: Use specific rule code for ignore type issues
2 parents 5d15542 + e7659c4 commit fc0d06a

4 files changed

Lines changed: 16 additions & 10 deletions

File tree

tests/e2e/features/steps/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def set_lightspeed_stack_config_directory(context: Context, directory: str) -> N
7979
context.lightspeed_stack_config_directory = directory.strip().rstrip("/")
8080

8181

82-
@given("The service uses the {config_name} configuration") # type: ignore
82+
@given("The service uses the {config_name} configuration") # type: ignore[reportCallIssue]
8383
def configure_service(context: Context, config_name: str) -> None:
8484
"""Switch to the given configuration when the basename differs from the last apply.
8585

tests/unit/models/config/test_a2a_state_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ def test_both_sqlite_and_postgres_raises_error(self, tmp_path: str) -> None:
114114
def test_forbids_extra_fields(self) -> None:
115115
"""Test that extra fields are forbidden."""
116116
with pytest.raises(ValidationError):
117-
A2AStateConfiguration(unknown_field="value") # type: ignore
117+
A2AStateConfiguration(unknown_field="value") # type: ignore[reportCallIssue]

tests/unit/models/responses/test_authorized_response.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ def test_constructor_fields_required(self) -> None:
3333
"""
3434
with pytest.raises(ValidationError):
3535
# missing all parameters
36-
_ = AuthorizedResponse() # pyright: ignore
36+
_ = AuthorizedResponse() # pyright: ignore[reportCallIssue]
3737

3838
with pytest.raises(ValidationError):
3939
# missing user_id parameter
40-
_ = AuthorizedResponse(username="testuser") # pyright: ignore
40+
_ = AuthorizedResponse(
41+
username="testuser"
42+
) # pyright: ignore[reportCallIssue]
4143

4244
with pytest.raises(ValidationError):
4345
# missing username parameter
4446
_ = AuthorizedResponse(
4547
user_id="123e4567-e89b-12d3-a456-426614174000"
46-
) # pyright: ignore
48+
) # pyright: ignore[reportCallIssue]

tests/unit/models/responses/test_successful_responses.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,17 +658,19 @@ def test_constructor_fields_required(self) -> None:
658658
"""
659659
with pytest.raises(ValidationError):
660660
# missing all parameters
661-
_ = AuthorizedResponse() # pyright: ignore
661+
_ = AuthorizedResponse() # pyright: ignore[reportCallIssue]
662662

663663
with pytest.raises(ValidationError):
664664
# missing user_id parameter
665-
_ = AuthorizedResponse(username="testuser") # pyright: ignore
665+
_ = AuthorizedResponse(
666+
username="testuser"
667+
) # pyright: ignore[reportCallIssue]
666668

667669
with pytest.raises(ValidationError):
668670
# missing username parameter
669671
_ = AuthorizedResponse(
670672
user_id="123e4567-e89b-12d3-a456-426614174000"
671-
) # pyright: ignore
673+
) # pyright: ignore[reportCallIssue]
672674

673675

674676
class TestConversationResponse:
@@ -753,7 +755,7 @@ def test_constructor_not_deleted(self) -> None:
753755
def test_missing_required_parameters(self) -> None:
754756
"""Test ConversationDeleteResponse raises ValidationError when required fields missing."""
755757
with pytest.raises(ValidationError):
756-
ConversationDeleteResponse() # pylint: disable=missing-kwoa # pyright: ignore
758+
ConversationDeleteResponse() # pylint: disable=missing-kwoa # pyright: ignore[reportCallIssue]
757759
with pytest.raises(ValidationError):
758760
ConversationDeleteResponse( # pylint: disable=missing-kwoa # pyright: ignore[reportCallIssue]
759761
deleted=True
@@ -1287,7 +1289,9 @@ class NoExamplesResponse(AbstractSuccessfulResponse):
12871289
"""Class without examples."""
12881290

12891291
field: str = "test"
1290-
model_config: ConfigDict = {"json_schema_extra": {}} # pyright: ignore
1292+
model_config: ConfigDict = {
1293+
"json_schema_extra": {}
1294+
} # pyright: ignore[reportIncompatibleVariableOverride]
12911295

12921296
with pytest.raises(SchemaError, match="Examples not found"):
12931297
NoExamplesResponse.openapi_response()

0 commit comments

Comments
 (0)