From c5fd7fcdcf208fa88d6c63740b91f6152ce1e01c Mon Sep 17 00:00:00 2001 From: Antonio Camargo Date: Fri, 18 Apr 2025 16:32:11 -0700 Subject: [PATCH] Include attributes in the stub file --- needletail.pyi | 10 ++++++++-- src/python.rs | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/needletail.pyi b/needletail.pyi index 71c35a3..7fa5e1e 100644 --- a/needletail.pyi +++ b/needletail.pyi @@ -1,8 +1,9 @@ from pathlib import Path -from typing import Iterator, Union +from typing import Iterator, Optional, Union class FastxReader(Iterator[Record]): - """An iterator that yields sequence records. + """ + An iterator that yields sequence records. Yields ------ @@ -59,6 +60,11 @@ class Record: normalize(iupac) Normalize the sequence stored in the `seq` attribute of the object. """ + + id: str + seq: str + qual: Optional[str] + def is_fasta(self) -> bool: """ Check if the object represents a FASTA record. diff --git a/src/python.rs b/src/python.rs index 0d1642b..beb6e59 100644 --- a/src/python.rs +++ b/src/python.rs @@ -1,6 +1,7 @@ //! Python bindings for needletail // TODO: +// - Enable reading FASTA and FASTQ files from stdin // - The `normalize` method of the `Record` class should return a new `Record` // object with the normalized sequence. // - Add a `reverse_complement` method to the `Record` class that returns a new