Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 1, 2026
commit 05d06f5af8cba32fddc94260961ea972564ee7b7
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Progressive multi-set intersection optimized for imbalanced sets."""

from typing import Set

Check failure on line 3 in data_structures/disjoint_set/progressive_set_intersection.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (UP035)

data_structures/disjoint_set/progressive_set_intersection.py:3:1: UP035 `typing.Set` is deprecated, use `set` instead


def progressive_set_intersection(*sets: Set) -> Set:

Check failure on line 6 in data_structures/disjoint_set/progressive_set_intersection.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (UP006)

data_structures/disjoint_set/progressive_set_intersection.py:6:49: UP006 Use `set` instead of `Set` for type annotation help: Replace with `set`

Check failure on line 6 in data_structures/disjoint_set/progressive_set_intersection.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (UP006)

data_structures/disjoint_set/progressive_set_intersection.py:6:41: UP006 Use `set` instead of `Set` for type annotation help: Replace with `set`
"""
Compute the intersection of multiple sets efficiently.

Expand Down Expand Up @@ -42,6 +42,6 @@
for current_set in sorted_sets[1:]:
if not result:
return set()
result &= current_set # Efficient in-place intersection
result &= current_set # Efficient in-place intersection

return result
Loading