Skip to content

Commit

Permalink
fix: rename reversed -> opposite
Browse files Browse the repository at this point in the history
  • Loading branch information
msto committed Apr 24, 2024
1 parent bd0776b commit 23cd5da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pybedlite/bed_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BedStrand(enum.Enum):
Negative = "-"

@property
def reversed(self) -> BedStrand:
def opposite(self) -> BedStrand:
"""Return the opposite strand of the current strand."""
return BedStrand.Positive if self is BedStrand.Negative else BedStrand.Negative

Expand Down
6 changes: 3 additions & 3 deletions pybedlite/tests/test_pybedlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ def test_preopened_bed_writing(
)


def test_bedstrand_reversed() -> None:
def test_bedstrand_opposite() -> None:
"""Test that we can reverse a BedStrand."""

assert BedStrand.Positive.reversed is BedStrand.Negative
assert BedStrand.Negative.reversed is BedStrand.Positive
assert BedStrand.Positive.opposite is BedStrand.Negative
assert BedStrand.Negative.opposite is BedStrand.Positive

0 comments on commit 23cd5da

Please sign in to comment.