From 092fa2a6da155c93898c8581a1bc6de7c72a9827 Mon Sep 17 00:00:00 2001 From: VarunAnanth2003 Date: Sun, 3 Nov 2024 12:45:35 -0800 Subject: [PATCH] line length fixes --- casanovo/casanovo.py | 5 +++-- casanovo/denovo/model.py | 4 ++-- tests/conftest.py | 8 ++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/casanovo/casanovo.py b/casanovo/casanovo.py index 5547a807..01098255 100644 --- a/casanovo/casanovo.py +++ b/casanovo/casanovo.py @@ -62,8 +62,9 @@ def __init__(self, *args, **kwargs) -> None: click.Option( ("-m", "--model"), help=""" - Either the model weights (.ckpt file) or a URL pointing to the model weights - file. If not provided, Casanovo will try to download the latest release automatically. + Either the model weights (.ckpt file) or a URL pointing to + the model weights file. If not provided, + Casanovo will try to download the latest release automatically. """, ), click.Option( diff --git a/casanovo/denovo/model.py b/casanovo/denovo/model.py index 40d0cc3d..5e807153 100644 --- a/casanovo/denovo/model.py +++ b/casanovo/denovo/model.py @@ -1021,8 +1021,8 @@ def predict_step(self, batch, *args): predictions: List[Tuple[List[str], int, float, str, np.ndarray, np.ndarray, str]] Model predictions for the given batch of spectra containing spectrum ids, precursor charge and m/z, candidate peptide sequences, peptide - scores, amino acid-level scores, and associated proteins. Stored separately by - spectrum id. + scores, amino acid-level scores, and associated proteins. + Stored separately by spectrum id. """ store_dict = collections.defaultdict(list) for start_idx in range(0, len(batch[0]), self.psm_batch_size): diff --git a/tests/conftest.py b/tests/conftest.py index 1729dcb3..009c0737 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,14 +22,18 @@ def tiny_fasta_file(tmp_path): fasta_file = tmp_path / "tiny_fasta.fasta" with fasta_file.open("w+") as fasta_ref: fasta_ref.write( - ">foo\nMEAPAQLLFLLLLWLPDTTREIVMTQSPPTLSLSPGERVTLSCRASQSVSSSYLTWYQQKPGQAPRLLIYGASTRATSIPARFSGSGSGTDFTLTISSLQPEDFAVYYCQQDYNLP" + ( + ">foo\nMEAPAQLLFLLLLWLPDTTREIVMTQSPPTLSLSPGERVTLSCRASQSVSSSYLTWYQ" + "QKPGQAPRLLIYGASTRATSIPARFSGSGSGTDFTLTISSLQPEDFAVYYCQQDYNLP" + ) ) return fasta_file @pytest.fixture def mgf_medium(tmp_path): - """An MGF file with 7 spectra and scan numbers, C+57.021 mass modification considered""" + """An MGF file with 7 spectra and scan numbers, + C+57.021 mass modification considered""" peptides = [ "ATSIPAR", "VTLSCR",