Skip to content

Restore neighbor helper to avoid defaultdict mutation#10

Closed
beauagainagainagainagainagain wants to merge 0 commit into
codex/create-new-repositoryfrom
codex/add-setup-and-code-style-documentation-kcn4f0
Closed

Restore neighbor helper to avoid defaultdict mutation#10
beauagainagainagainagainagain wants to merge 0 commit into
codex/create-new-repositoryfrom
codex/add-setup-and-code-style-documentation-kcn4f0

Conversation

@beauagainagainagainagainagain
Copy link
Copy Markdown
Owner

Summary

  • add a shared _iter_neighbors helper that fetches adjacency lists without mutating defaultdict inputs while still raising on missing keys for plain mappings
  • route both DFS and BFS traversals through the helper and iterate directly over the mapping views to prevent defaultdict growth during iteration

Testing

  • pytest graphs/check_bipatrite.py

https://chatgpt.com/codex/tasks/task_e_68ca08d5d7a88320a6788a0fd720acce

@github-actions github-actions Bot closed this Sep 17, 2025
@github-actions github-actions Bot force-pushed the codex/add-setup-and-code-style-documentation-kcn4f0 branch from 650bdec to 1b8189b Compare September 17, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant