Skip to content

Commit

Permalink
read_fasta same typing as class constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Aug 31, 2022
1 parent c5f71fd commit 40cfbeb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
26 changes: 15 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
default_language_version:
python: python3.8
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
- repo: https://github.com/ambv/black
rev: 22.6.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: check-toml
- id: debug-statements
- repo: https://github.com/pycqa/isort
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: 22.6.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: black
- id: check-added-large-files
- id: debug-statements
- id: check-yaml
- id: check-toml
- repo: https://github.com/horta/sanitize-pyproject-version
rev: v0.0.4
hooks:
- id: check-version-equality
4 changes: 2 additions & 2 deletions fasta_reader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""FASTA file reader/writer"""
"""FASTA file reader/writer."""
from ._cli import cli
from ._reader import FASTAItem, FASTAReader, ParsingError, read_fasta
from ._writer import FASTAWriter, write_fasta

__version__ = "1.0.2"
__version__ = "1.0.3"

__all__ = [
"FASTAItem",
Expand Down
5 changes: 2 additions & 3 deletions fasta_reader/_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from dataclasses import dataclass
from os import PathLike
from pathlib import Path
from typing import IO, Iterator, List, Union
from typing import Iterator, List, Union

from more_itertools import peekable
from xopen import xopen
Expand Down Expand Up @@ -223,7 +222,7 @@ def __exit__(self, exception_type, exception_value, traceback):
self.close()


def read_fasta(file: Union[str, Path, IO[str]]) -> FASTAReader:
def read_fasta(file: Union[str, bytes, PathLike]) -> FASTAReader:
"""
Open a FASTA file for reading.
Expand Down

0 comments on commit 40cfbeb

Please sign in to comment.