Skip to content

Commit 7af15d3

Browse files
committed
Fix Yoda condition (SIM300)
1 parent 2bb8bec commit 7af15d3

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ ignore = [
281281
"SIM114", # Combine `if` branches using logical `or` operator
282282
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
283283
"SIM118", # Use `key in dict` instead of `key in dict.keys)
284-
"SIM300", # Yoda condition detected
285284
"SIM910", # Use `data.get(key)` instead of `data.get(key, None)`
286285
"UP007", # Use X | Y for type annotations
287286
"UP031", # Use format specifiers instead of percent format

tests/unit/sdk/test_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def test_schema_data_validation(rfile_schema, client_type):
7777
schema=rfile_schema, data={"name": "some-name", "invalid_field": "yes"}
7878
)
7979

80-
assert "invalid_field is not a valid value for CoreTransformJinja2" == excinfo.value.message
80+
assert excinfo.value.message == "invalid_field is not a valid value for CoreTransformJinja2"
8181

8282

8383
@pytest.mark.parametrize("client_type", client_types)

0 commit comments

Comments
 (0)