Skip to content

Commit

Permalink
🚨(project) fix ruff warnings following update
Browse files Browse the repository at this point in the history
After updating Ruff, some rules have changed and warnings are raised. Fixing
them.
  • Loading branch information
wilbrdt committed Sep 17, 2024
1 parent b8fc7a2 commit efa4896
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/api/core/warren/tests/indicators/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class NewIndicator(MyIndicator):
async def compute(self) -> list:
pass

assert NewIndicator()._compute_annotation == list
assert NewIndicator()._compute_annotation is list


@pytest.mark.anyio
Expand Down Expand Up @@ -878,7 +878,7 @@ def merge(a, b) -> list:
)
)

assert indicator._compute_annotation == dict
assert indicator._compute_annotation is dict

class MyType(BaseModel):
foo: str
Expand Down
4 changes: 2 additions & 2 deletions src/api/core/warren/tests/test_xapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_statements_transformer_add_actor_uid():
statements = StatementsTransformer.to_datetime(statements)
statements = StatementsTransformer.add_actor_uid_column(statements)

assert type(statements) == pd.DataFrame
assert type(statements) is pd.DataFrame
assert "actor.uid" in statements.columns
assert statements["actor.uid"].notna
# Check that 2 identical actors have the same UID
Expand Down Expand Up @@ -198,7 +198,7 @@ def test_statements_transformer_preprocess_statements_workflow():

statements = StatementsTransformer.preprocess(raw_statements)

assert type(statements) == pd.DataFrame
assert type(statements) is pd.DataFrame
assert "actor.uid" in statements.columns
assert statements["actor.uid"].notna
assert statements["timestamp"].equals(
Expand Down
2 changes: 1 addition & 1 deletion src/app/warren/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_release():
class Value(values.Value):
"""Custom Value instance that overrides default Value configuration."""

def __init__( # noqa: PLR0913
def __init__(
self,
default=None,
environ=True,
Expand Down

0 comments on commit efa4896

Please sign in to comment.