Skip to content

Commit

Permalink
use correct one of is and ==
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Apr 17, 2024
1 parent d1c5ff5 commit a9f4250
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/seer/automation/autofix/autofix.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def _get_slug_id(self, organization_id: int) -> str | None:
"get_organization_slug", org_id=organization_id
)
slug = None if response is None else response.get("slug", None)
if slug == None:
if slug is None:
autofix_logger.warn(
f"Slug lookup call for organization {organization_id} succeeded but returned value None."
)
Expand Down
2 changes: 1 addition & 1 deletion src/seer/grouping/grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def get_nearest_neighbors(self, issue: GroupingRequest) -> SimilarityResponse:
DbGroupingRecord.project_id == issue.project_id,
DbGroupingRecord.stacktrace_embedding.cosine_distance(embedding) <= 0.15,
DbGroupingRecord.group_id != issue.group_id,
DbGroupingRecord.group_id != None,
DbGroupingRecord.group_id is not None,
)
.order_by("distance")
.limit(issue.k)
Expand Down
2 changes: 1 addition & 1 deletion tests/automation/autofix/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_autofix_request_with_multiple_repos(self):
@parametrize
def test_event_no_exception_events(event: SentryEventData, entry: InvalidEventEntry):
event["entries"] = [entry]
assert len(EventDetails.from_event(event).exceptions) is 0
assert len(EventDetails.from_event(event).exceptions) == 0


@parametrize
Expand Down
2 changes: 1 addition & 1 deletion tests/automation/codebase/test_codebase_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def test_update_with_temporary_chunk_replacement(
chunks = (
session.query(DbDocumentChunk)
.where(DbDocumentChunk.path == "file1.py")
.where(DbDocumentChunk.namespace == None)
.where(DbDocumentChunk.namespace is None)
.order_by("index")
.all()
)
Expand Down

0 comments on commit a9f4250

Please sign in to comment.