Skip to content

Commit

Permalink
Make supported_formats static
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Jun 25, 2024
1 parent ed7aa6f commit e42cd5c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion easyliftover/lifters/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def lift_url(self, url: str) -> str:
"""Lifts a URL."""
raise NotImplementedError

@staticmethod
@abstractmethod
def supported_formats(self) -> list:
def supported_formats() -> list:
"""Returns the supported formats."""
raise NotImplementedError

Expand Down
3 changes: 2 additions & 1 deletion easyliftover/lifters/bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __lift_row__(self, row: str) -> "str | None":
else:
return None

def supported_formats(self) -> list:
@staticmethod
def supported_formats() -> list:
"""Returns the supported formats."""
return ["bed"]
3 changes: 2 additions & 1 deletion easyliftover/lifters/bedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __lift_row__(self, row: str) -> "str | None":
else:
return None

def supported_formats(self) -> list:
@staticmethod
def supported_formats() -> list:
"""Returns the supported formats."""
return ["bedgraph", "bg"]
3 changes: 2 additions & 1 deletion easyliftover/lifters/bigwig.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def lift_bw(self, bw) -> str:

return wig

def supported_formats(self) -> list:
@staticmethod
def supported_formats() -> list:
"""Returns the supported formats."""
return ["bigwig", "bw"]
3 changes: 2 additions & 1 deletion easyliftover/lifters/gff.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __lift_row__(self, row: str) -> "str | None":
else:
return None

def supported_formats(self) -> list:
@staticmethod
def supported_formats() -> list:
"""Returns the supported formats."""
return ["gff", "gff3", "gtf"]
3 changes: 2 additions & 1 deletion easyliftover/lifters/vcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __lift_row__(self, row: str) -> "str | None":
else:
return None

def supported_formats(self) -> list:
@staticmethod
def supported_formats() -> list:
"""Returns the supported formats."""
return ["vcf"]
3 changes: 2 additions & 1 deletion easyliftover/lifters/wig.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def lift_content(self, content: str) -> str:

return "\n".join(result)

def supported_formats(self) -> list:
@staticmethod
def supported_formats() -> list:
"""Returns the supported formats."""
return ["wig"]

0 comments on commit e42cd5c

Please sign in to comment.