Skip to content

Commit

Permalink
Merge pull request #148 from kjappelbaum/deepsource-fix-62378246
Browse files Browse the repository at this point in the history
Use literal syntax to create data structure
  • Loading branch information
kjappelbaum committed Nov 2, 2022
2 parents ea59a3c + 98623b6 commit 24e7be9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/moffragmentor/fragmentor/nodelocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ def create_node_collection(mof, node_location_result: NodelocationResult) -> Nod
def break_rod_node(mof, indices):
metal_subset = {i for i in indices if i in mof.metal_indices}
if not isinstance(metal_subset, int):
return [set([i]) for i in metal_subset]
return [{i} for i in metal_subset]
else:
return [set([metal_subset])]
return [{metal_subset}]


def create_single_metal_nodes(mof, node_result):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_branching_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def test_get_branch_points(abaxin):
"""Test the branch point detection on a case that previously failed (#70)."""
bp = get_branch_points(abaxin)
assert set(bp) == set([146, 147, 72, 73, 112, 113, 52, 53, 92, 93])
assert set(bp) == {146, 147, 72, 73, 112, 113, 52, 53, 92, 93}


def test_is_branch_point(get_agn_mof):
Expand Down

0 comments on commit 24e7be9

Please sign in to comment.