mirror of
https://github.com/biopython/biopython.git
synced 2025-10-20 13:43:47 +08:00
ruff fix PIE790 Unnecessary pass statement
$ ruff --fix --select PIE790 BioSQL/ Bio/ Doc/examples/ Tests/ Scripts/ Found 62 errors (62 fixed, 0 remaining). Then re-ran black.
This commit is contained in:
@ -137,7 +137,6 @@ class SequentialAlignmentWriter(AlignmentWriter):
|
||||
This method should be replaced by any derived class to do something
|
||||
useful.
|
||||
"""
|
||||
pass
|
||||
|
||||
def write_footer(self):
|
||||
"""Use this to write any footer.
|
||||
@ -145,7 +144,6 @@ class SequentialAlignmentWriter(AlignmentWriter):
|
||||
This method should be replaced by any derived class to do something
|
||||
useful.
|
||||
"""
|
||||
pass
|
||||
|
||||
def write_alignment(self, alignment):
|
||||
"""Use this to write a single alignment.
|
||||
|
@ -48,8 +48,6 @@ class DifferentialCutsite:
|
||||
class AlignmentHasDifferentLengthsError(Exception):
|
||||
"""Exception where sequences in alignment have different lengths."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class CAPSMap:
|
||||
"""A map of an alignment showing all possible dcuts.
|
||||
|
@ -44,8 +44,6 @@ standard_rna_table = None
|
||||
class TranslationError(Exception):
|
||||
"""Container for translation specific exceptions."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class CodonTable:
|
||||
"""A codon-table, or genetic code."""
|
||||
|
@ -399,7 +399,6 @@ class InsdcScanner:
|
||||
|
||||
Used by the parse_records() and parse() methods.
|
||||
"""
|
||||
pass
|
||||
|
||||
def _feed_header_lines(self, consumer, lines):
|
||||
"""Handle the header lines (list of strings), passing data to the consumer (PRIVATE).
|
||||
@ -408,7 +407,6 @@ class InsdcScanner:
|
||||
|
||||
Used by the parse_records() and parse() methods.
|
||||
"""
|
||||
pass
|
||||
|
||||
@staticmethod
|
||||
def _feed_feature_table(consumer, feature_tuples):
|
||||
@ -433,7 +431,6 @@ class InsdcScanner:
|
||||
|
||||
Used by the parse_records() and parse() methods.
|
||||
"""
|
||||
pass
|
||||
|
||||
def feed(self, handle, consumer, do_features=True):
|
||||
"""Feed a set of data into the consumer.
|
||||
|
@ -112,8 +112,6 @@ class Iterator:
|
||||
class ParserFailureError(ValueError):
|
||||
"""Failure caused by some kind of problem in the parser."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
_cleaner = FeatureValueCleaner()
|
||||
|
||||
|
@ -178,7 +178,6 @@ class Organism(_ChromosomeComponent):
|
||||
Subclasses should implement this (see also self._legend_height) to
|
||||
provide specialized legends.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class Chromosome(_ChromosomeComponent):
|
||||
@ -445,7 +444,6 @@ class ChromosomeSegment(_ChromosomeComponent):
|
||||
This should be overridden in derived classes if there are
|
||||
subcomponents to be drawn.
|
||||
"""
|
||||
pass
|
||||
|
||||
def _draw_segment(self, cur_drawing):
|
||||
"""Draw the current chromosome segment (PRIVATE)."""
|
||||
@ -484,7 +482,6 @@ class ChromosomeSegment(_ChromosomeComponent):
|
||||
This should be overridden in derived classes if there are
|
||||
subcomponents to be drawn.
|
||||
"""
|
||||
pass
|
||||
|
||||
def _draw_label(self, cur_drawing):
|
||||
"""Add a label to the chromosome segment (PRIVATE).
|
||||
@ -817,4 +814,3 @@ class SpacerSegment(ChromosomeSegment):
|
||||
so this method therefore does nothing, but is defined
|
||||
to match the expected API of the other segment objects.
|
||||
"""
|
||||
pass
|
||||
|
@ -134,7 +134,6 @@ class DistributionPage:
|
||||
|
||||
Subclasses can implement to provide a specialized legend.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class BarChartDistribution:
|
||||
@ -249,8 +248,6 @@ class LineDistribution:
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the class."""
|
||||
pass
|
||||
|
||||
def draw(self, cur_drawing, start_x, start_y, end_x, end_y):
|
||||
"""Draw a line distribution into the current drawing."""
|
||||
pass
|
||||
|
@ -64,8 +64,6 @@ DEFAULTNEXUS = (
|
||||
class NexusError(Exception):
|
||||
"""Provision for the management of Nexus exceptions."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class CharBuffer:
|
||||
"""Helps reading NEXUS-words and characters from a buffer (semi-PRIVATE).
|
||||
@ -905,7 +903,6 @@ class Nexus:
|
||||
Thus, we ignore the taxlabels command to make handling of duplicate
|
||||
taxon names easier.
|
||||
"""
|
||||
pass
|
||||
# self.taxlabels = []
|
||||
# opts = CharBuffer(options)
|
||||
# while True:
|
||||
|
@ -22,14 +22,10 @@ from typing import Dict, List, Optional
|
||||
class ChainException(Exception):
|
||||
"""Provision for the management of Chain exceptions."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NodeException(Exception):
|
||||
"""Provision for the management of Node exceptions."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class Chain:
|
||||
"""Stores a list of nodes that are linked together."""
|
||||
|
@ -13,8 +13,6 @@
|
||||
class NexusError(Exception):
|
||||
"""Provision for the management of Nexus exceptions."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class StandardData:
|
||||
"""Create a StandardData iterable object.
|
||||
|
@ -28,8 +28,6 @@ NODECOMMENT_END = "]"
|
||||
class TreeError(Exception):
|
||||
"""Provision for the management of Tree exceptions."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NodeData:
|
||||
"""Store tree-relevant data associated with nodes (e.g. branches or otus)."""
|
||||
|
@ -14,25 +14,17 @@ from Bio import BiopythonWarning
|
||||
class PDBException(Exception):
|
||||
"""Define class PDBException."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
# The PDB file cannot be unambiguously represented in the SMCRA
|
||||
# data structure
|
||||
class PDBConstructionException(Exception):
|
||||
"""Define class PDBConstructionException."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class PDBConstructionWarning(BiopythonWarning):
|
||||
"""Define class PDBConstructionWarning."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
# The SMCRA structure could not be written to file
|
||||
class PDBIOException(Exception):
|
||||
"""Define class PDBIOException."""
|
||||
|
||||
pass
|
||||
|
@ -67,7 +67,6 @@ class StructureIO:
|
||||
|
||||
def __init__(self):
|
||||
"""Initialise."""
|
||||
pass
|
||||
|
||||
def set_structure(self, pdb_object):
|
||||
"""Check what the user is providing and build a structure."""
|
||||
|
@ -310,4 +310,3 @@ class StructureBuilder:
|
||||
|
||||
def set_symmetry(self, spacegroup, cell):
|
||||
"""Set symmetry."""
|
||||
pass
|
||||
|
@ -4963,10 +4963,6 @@ def set_accuracy_95(num: float) -> float:
|
||||
class HedronMatchError(Exception):
|
||||
"""Cannot find hedron in residue for given key."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class MissingAtomError(Exception):
|
||||
"""Missing atom coordinates for hedron or dihedron."""
|
||||
|
||||
pass
|
||||
|
@ -67,7 +67,6 @@ class MMCIFIO(StructureIO):
|
||||
|
||||
def __init__(self):
|
||||
"""Initialise."""
|
||||
pass
|
||||
|
||||
def set_dict(self, dic):
|
||||
"""Set the mmCIF dictionary to be written out."""
|
||||
|
@ -196,7 +196,6 @@ class StructureDecoder:
|
||||
:param experimnetal_methods: the list of experimental methods in the structure
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
def set_bio_assembly_trans(
|
||||
self, bio_assembly_index, input_chain_indices, input_transform
|
||||
@ -208,11 +207,9 @@ class StructureDecoder:
|
||||
:param input_transform: the list of doubles for the transform of this bioassmbly transform.
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
def finalize_structure(self):
|
||||
"""Any functions needed to cleanup the structure."""
|
||||
pass
|
||||
|
||||
def set_group_bond(self, atom_index_one, atom_index_two, bond_order):
|
||||
"""Add bonds within a group.
|
||||
@ -222,7 +219,6 @@ class StructureDecoder:
|
||||
:param bond_order: the integer bond order
|
||||
|
||||
"""
|
||||
pass
|
||||
|
||||
def set_inter_group_bond(self, atom_index_one, atom_index_two, bond_order):
|
||||
"""Add bonds between groups.
|
||||
@ -232,4 +228,3 @@ class StructureDecoder:
|
||||
:param bond_order: the bond order
|
||||
|
||||
"""
|
||||
pass
|
||||
|
@ -38,7 +38,6 @@ class MMTFIO(StructureIO):
|
||||
|
||||
def __init__(self):
|
||||
"""Initialise."""
|
||||
pass
|
||||
|
||||
def save(self, filepath, select=_select):
|
||||
"""Save the structure to a file.
|
||||
|
@ -60,8 +60,6 @@ def matches(s):
|
||||
class NeXMLError(Exception):
|
||||
"""Exception raised when NeXML object construction cannot continue."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Public API
|
||||
|
@ -21,8 +21,6 @@ from Bio.Phylo import Newick
|
||||
class NewickError(Exception):
|
||||
"""Exception raised when Newick object construction cannot continue."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
tokens = [
|
||||
(r"\(", "open parens"),
|
||||
|
@ -37,11 +37,9 @@ class Paml:
|
||||
|
||||
def write_ctl_file(self):
|
||||
"""Write control file."""
|
||||
pass
|
||||
|
||||
def read_ctl_file(self):
|
||||
"""Read control file."""
|
||||
pass
|
||||
|
||||
def print_options(self):
|
||||
"""Print out all of the options and their current settings."""
|
||||
|
@ -31,8 +31,6 @@ from Bio.Phylo import BaseTree
|
||||
class PhyloXMLWarning(BiopythonWarning):
|
||||
"""Warning for non-compliance with the phyloXML specification."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def _check_str(text, testfunc):
|
||||
"""Check a string using testfunc, and warn if there's no match (PRIVATE)."""
|
||||
|
@ -45,8 +45,6 @@ class PhyloXMLError(Exception):
|
||||
specification.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Public API
|
||||
|
@ -53,8 +53,6 @@ class LowQualityBlastError(Exception):
|
||||
in this case.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class ShortQueryBlastError(Exception):
|
||||
"""Error caused by running a short query sequence through BLAST.
|
||||
@ -69,8 +67,6 @@ class ShortQueryBlastError(Exception):
|
||||
This exception is raised when that condition is detected.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class _Scanner:
|
||||
"""Scan BLAST output from blastall or blastpgp.
|
||||
|
@ -163,8 +163,6 @@ _re_location_category = re.compile(
|
||||
class LocationParserError(ValueError):
|
||||
"""Could not parse a feature location string."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class SeqFeature:
|
||||
"""Represent a Sequence Feature on an object.
|
||||
@ -2120,8 +2118,6 @@ class UncertainPosition(ExactPosition):
|
||||
XML format explicitly marked as uncertain. Does not apply to GenBank/EMBL.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UnknownPosition(Position):
|
||||
"""Specify a specific position which is unknown (has no position).
|
||||
|
@ -183,7 +183,6 @@ class SequenceWriter:
|
||||
|
||||
def write_header(self):
|
||||
"""Write the file header to the output file."""
|
||||
pass
|
||||
##################################################
|
||||
# You MUST implement this method in the subclass #
|
||||
# if the file format defines a file header. #
|
||||
@ -191,7 +190,6 @@ class SequenceWriter:
|
||||
|
||||
def write_footer(self):
|
||||
"""Write the file footer to the output file."""
|
||||
pass
|
||||
##################################################
|
||||
# You MUST implement this method in the subclass #
|
||||
# if the file format defines a file footer. #
|
||||
|
@ -145,7 +145,6 @@ def all_pairs(singles):
|
||||
|
||||
def main():
|
||||
"""Provision for command line testing."""
|
||||
pass
|
||||
|
||||
|
||||
def _test(*args, **keywds):
|
||||
|
@ -32,8 +32,6 @@ _OPTION_SCORES = "-m"
|
||||
class AlignmentColumnFullException(Exception):
|
||||
"""Manage exception in the alignment output."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class Alignment(list):
|
||||
"""Define a container for all alignment Columns, output from running psw."""
|
||||
|
@ -24,7 +24,6 @@ class Generic_dbutils:
|
||||
|
||||
def __init__(self):
|
||||
"""Create a Generic_dbutils object."""
|
||||
pass
|
||||
|
||||
def tname(self, table):
|
||||
"""Return the name of the table."""
|
||||
@ -53,7 +52,6 @@ class Generic_dbutils:
|
||||
def autocommit(self, conn, y=1):
|
||||
"""Set autocommit on the database connection."""
|
||||
# Let's hope it was not really needed
|
||||
pass
|
||||
|
||||
|
||||
class Sqlite_dbutils(Generic_dbutils):
|
||||
|
@ -140,8 +140,6 @@ def double_quote_repr(value): # TODO similar not to produce long horizontal lis
|
||||
class OverhangError(ValueError):
|
||||
"""Exception for dealing with overhang."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def regex(site):
|
||||
"""Construct a regular expression (string) from a DNA sequence.
|
||||
@ -327,7 +325,6 @@ class TypeCompiler:
|
||||
|
||||
def __init__(self):
|
||||
"""TypeCompiler() -> new TypeCompiler instance."""
|
||||
pass
|
||||
|
||||
def buildtype(self):
|
||||
"""Build new types that will be needed for constructing the enzymes."""
|
||||
|
@ -23,7 +23,6 @@ class xbb_translations:
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize the class."""
|
||||
pass
|
||||
|
||||
def frame1(self, seq, translation_table=1):
|
||||
"""Translate first reading frame."""
|
||||
|
@ -204,7 +204,6 @@ def create_database():
|
||||
# Seen this with PyPy 2.1 (and older) on Windows -
|
||||
# which suggests an open handle still exists?
|
||||
print(f"Could not remove {TESTDB!r}")
|
||||
pass
|
||||
# Now pick a new filename - just in case there is a stale handle
|
||||
# (which might be happening under Windows...)
|
||||
TESTDB = temp_db_filename()
|
||||
|
@ -130,7 +130,6 @@ class ComparativeTest(unittest.TestCase):
|
||||
def test_simple_scatter_plot(self):
|
||||
"""Test creation of a simple PNG scatter plot."""
|
||||
# Dummy method to show up via run_tests.py
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -54,7 +54,6 @@ ys = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]
|
||||
|
||||
def show_progress(iteration, loglikelihood):
|
||||
"""No action callback function, used when training the model."""
|
||||
pass
|
||||
|
||||
|
||||
class TestLogisticRegression(unittest.TestCase):
|
||||
|
@ -89,14 +89,10 @@ def SeqresTestGenerator(extension, parser):
|
||||
class TestPdbSeqres(SeqresTestGenerator("pdb", "pdb-seqres")):
|
||||
"""Test pdb-seqres SeqIO driver."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class TestCifSeqres(SeqresTestGenerator("cif", "cif-seqres")):
|
||||
"""Test cif-seqres SeqIO driver."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def AtomTestGenerator(extension, parser):
|
||||
"""Test factory for tests reading ATOM (or similar) records.
|
||||
|
@ -174,8 +174,6 @@ def extract_doctests(latex_filename):
|
||||
class TutorialDocTestHolder:
|
||||
"""Python doctests extracted from the Biopython Tutorial."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def check_deps(dependencies):
|
||||
"""Check 'lib:XXX' and 'internet' dependencies are met."""
|
||||
|
@ -4940,7 +4940,6 @@ class TestMEME(unittest.TestCase):
|
||||
|
||||
def test_meme_parser_rna(self):
|
||||
"""Test if Bio.motifs can parse MEME output files using RNA."""
|
||||
pass
|
||||
|
||||
|
||||
class TestMAST(unittest.TestCase):
|
||||
|
Reference in New Issue
Block a user