Skip to content

Commit

Permalink
fix: Fix import error in fa2twobit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Oct 30, 2023
1 parent 1283ab3 commit 5511a60
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 27 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ setuptools = "^68.2.2"
rich = "^13.3.5"
pysimdjson = "^5.0.2"
biopython = "^1.81"
typer = "^0.9.0"
deprecated = "^1.2.13"
mashumaro = "^3.7"
urllib3 = "2.0.7"
typer = "^0.9.0"


[tool.poetry.group.dev.dependencies]
Expand Down Expand Up @@ -225,7 +225,7 @@ allow-star-arg-any = true
"src/pxblat/server/client.py" = ["PLR0913"]
"src/pxblat/cli/server.py" = ["PLR0913", "N816", "FBT001", "FBT003"]
"src/pxblat/cli/client.py" = ["B008", "PLR0913", "FBT001", "FBT003"]
"src/pxblat/cli/fa2twobit.py" = ["B008", "PLR0913", "FBT001", "FBT003"]
"src/pxblat/cli/fa2twobit.py" = ["B008", "PLR0913", "FBT001", "FBT003", "FA100"]
"src/pxblat/cli/cli.py" = ["DTZ005"]
"src/pxblat/toolkit/__init__.py" = ["PLR0913"]
"src/pxblat/parser.py" = ["A001", "A002", "ARG001"]
Expand Down
2 changes: 2 additions & 0 deletions src/pxblat/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Command line interface to pxblat."""
from __future__ import annotations

from .cli import app

__all__ = ["app"]
49 changes: 26 additions & 23 deletions src/pxblat/cli/fa2twobit.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
from __future__ import annotations

from typing import TYPE_CHECKING
from pathlib import Path
from typing import List

import typer
from typing_extensions import Annotated

from pxblat import fa_to_two_bit

from .log import logger

if TYPE_CHECKING:
from pathlib import Path

# faToTwoBit - Convert DNA from fasta to 2bit format
# usage:
# faToTwoBit in.fa [in2.fa in3.fa ...] out.2bit
Expand All @@ -24,23 +21,29 @@


def faToTwoBit(
infa: list[Path] = typer.Argument(
...,
exists=True,
dir_okay=False,
readable=True,
metavar="in.fa [inf2.fa in3.fa ...]",
show_default=False,
help="The fasta files",
),
out2bit: Path = typer.Argument(
...,
dir_okay=False,
writable=True,
show_default=False,
metavar="out.2bit",
help="The output file",
),
infa: Annotated[
List[Path],
typer.Argument(
...,
exists=True,
dir_okay=False,
readable=True,
metavar="in.fa [inf2.fa in3.fa ...]",
show_default=False,
help="The fasta files",
),
],
out2bit: Annotated[
Path,
typer.Argument(
...,
dir_okay=False,
writable=True,
show_default=False,
metavar="out.2bit",
help="The output file",
),
],
long: bool = typer.Option(
False,
"--long",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import filecmp

import pytest
from pxblat.cli import app
from pxblat.server import Server
from typer.testing import CliRunner
Expand Down

0 comments on commit 5511a60

Please sign in to comment.