Standardize class init docstrings (#3529)

Standardize class initialization comment throughout project
This commit is contained in:
Alex Morehead
2021-04-17 04:13:59 -05:00
committed by GitHub
parent 0e25f49742
commit 3742a17f8b
23 changed files with 31 additions and 31 deletions

View File

@ -61,7 +61,7 @@ class Record:
"""
def __init__(self):
"""Initialize class."""
"""Initialize the class."""
self.version = None
self.GridCornerUL = None
self.GridCornerUR = None

View File

@ -107,7 +107,7 @@ class MauveWriter(SequentialAlignmentWriter):
"""Mauve/XMFA alignment writer."""
def __init__(self, *args, **kwargs):
"""Initialize."""
"""Initialize the class."""
super().__init__(*args, **kwargs)
self._wrote_header = False
self._wrote_first = False

View File

@ -100,7 +100,7 @@ class ApplicationError(subprocess.CalledProcessError):
"""
def __init__(self, returncode, cmd, stdout="", stderr=""):
"""Initialize."""
"""Initialize the class."""
self.returncode = returncode
self.cmd = cmd
self.stdout = stdout

View File

@ -260,7 +260,7 @@ class DataHandlerMeta(type):
"""A metaclass is needed until Python supports @classproperty."""
def __init__(cls, *args, **kwargs):
"""Initialize."""
"""Initialize the class."""
cls._directory = None
@property

View File

@ -168,7 +168,7 @@ class Record:
SEQUENCE_FORMAT = "%" + str(GB_SEQUENCE_INDENT) + "s"
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.accession = []
self.base_counts = ""
self.comment = ""
@ -512,7 +512,7 @@ class Reference:
"""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.number = ""
self.bases = ""
self.authors = ""
@ -617,7 +617,7 @@ class Feature:
"""
def __init__(self, key="", location=""):
"""Initialize."""
"""Initialize the class."""
self.key = key
self.location = location
self.qualifiers = []
@ -647,7 +647,7 @@ class Qualifier:
"""
def __init__(self, key="", value=""):
"""Initialize."""
"""Initialize the class."""
self.key = key
self.value = value

View File

@ -60,7 +60,7 @@ class InsdcScanner:
SEQUENCE_HEADERS = ["XXX"] # with right hand side spaces removed
def __init__(self, debug=0):
"""Initialize."""
"""Initialize the class."""
assert len(self.RECORD_START) == self.HEADER_WIDTH
for marker in self.SEQUENCE_HEADERS:
assert marker == marker.rstrip()

View File

@ -106,7 +106,7 @@ class Organism(_ChromosomeComponent):
"""
def __init__(self, output_format="pdf"):
"""Initialize."""
"""Initialize the class."""
_ChromosomeComponent.__init__(self)
# customizable attributes

View File

@ -44,7 +44,7 @@ class ComparativeScatterPlot:
"""
def __init__(self, output_format="pdf"):
"""Initialize."""
"""Initialize the class."""
# customizable attributes
self.number_of_columns = 1
self.page_size = letter

View File

@ -37,7 +37,7 @@ class DistributionPage:
"""
def __init__(self, output_format="pdf"):
"""Initialize."""
"""Initialize the class."""
self.distributions = []
# customizable attributes
@ -250,7 +250,7 @@ class LineDistribution:
"""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
pass
def draw(self, cur_drawing, start_x, start_y, end_x, end_y):

View File

@ -120,7 +120,7 @@ class KGMLCanvas:
show_reaction_entries=True,
margins=(0.02, 0.02),
):
"""Initialize."""
"""Initialize the class."""
self.pathway = pathway
self.show_maps = show_maps
self.show_orthologs = show_orthologs

View File

@ -322,5 +322,5 @@ class LogDPAlgorithms(AbstractDPAlgorithms):
"""
def __init__(self, markov_model, sequence):
"""Initialize."""
"""Initialize the class."""
raise NotImplementedError("Haven't coded this yet...")

View File

@ -50,7 +50,7 @@ class AbstractTrainer:
"""Provide generic functionality needed in all trainers."""
def __init__(self, markov_model):
"""Initialize."""
"""Initialize the class."""
self._markov_model = markov_model
def log_likelihood(self, probabilities):
@ -355,7 +355,7 @@ class KnownStateTrainer(AbstractTrainer):
"""
def __init__(self, markov_model):
"""Initialize."""
"""Initialize the class."""
AbstractTrainer.__init__(self, markov_model)
def train(self, training_seqs):

View File

@ -30,7 +30,7 @@ class LogisticRegression:
"""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.beta = []

View File

@ -25,7 +25,7 @@ class _AbstractHSExposure(AbstractPropertyMap):
"""
def __init__(self, model, radius, offset, hse_up_key, hse_down_key, angle_key=None):
"""Initialize.
"""Initialize class.
:param model: model
:type model: L{Model}
@ -140,7 +140,7 @@ class HSExposureCA(_AbstractHSExposure):
"""
def __init__(self, model, radius=12, offset=0):
"""Initialse class.
"""Initialize class.
:param model: the model that contains the residues
:type model: L{Model}
@ -275,7 +275,7 @@ class ExposureCN(AbstractPropertyMap):
"""Residue exposure as number of CA atoms around its CA atom."""
def __init__(self, model, radius=12.0, offset=0):
"""Initialize.
"""Initialize class.
A residue's exposure is defined as the number of CA atoms around
that residue's CA atom. A dictionary is returned that uses a L{Residue}

View File

@ -850,7 +850,7 @@ class BlastParser(AbstractParser):
"""Parses BLAST data into a Record.Blast object."""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self._scanner = _Scanner()
self._consumer = _BlastConsumer()
@ -864,7 +864,7 @@ class PSIBlastParser(AbstractParser):
"""Parses BLAST data into a Record.PSIBlast object."""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self._scanner = _Scanner()
self._consumer = _PSIBlastConsumer()

View File

@ -42,7 +42,7 @@ class kNN:
"""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.classes = set()
self.xs = []
self.ys = []

View File

@ -15,7 +15,7 @@ class Record(list):
"""AlignACE record (subclass of Python list)."""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.parameters = None

View File

@ -109,7 +109,7 @@ class Record(list):
"""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.version = ""
self.datafile = ""
self.command = ""

View File

@ -81,7 +81,7 @@ class Record(list):
"""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
self.version = None
def __str__(self):

View File

@ -22,7 +22,7 @@ class xbb_translations:
"""A class for doing translations."""
def __init__(self):
"""Initialize."""
"""Initialize the class."""
pass
def frame1(self, seq, translation_table=1):

View File

@ -57,7 +57,7 @@ class PathwayData:
"""Convenience structure for testing pathway data."""
def __init__(self, name, element_counts, show_pathway_image=False):
"""Initialize."""
"""Initialize the class."""
self.infilename = os.path.join("KEGG", "ko%s.xml" % name)
self.outfilename = os.path.join("KEGG", "ko%s.kgml" % name)
self.element_counts = element_counts

View File

@ -26,7 +26,7 @@ class PathwayData:
pathway_image,
show_pathway_image=False,
):
"""Initialize."""
"""Initialize the class."""
self.infilename = infilename
self.outfilename = outfilename
self.element_counts = element_counts

View File

@ -163,7 +163,7 @@ class ForwardOnlyHandle:
"""Mimic a network handle without seek and tell methods etc."""
def __init__(self, handle):
"""Initialize."""
"""Initialize the class."""
self._handle = handle
def __iter__(self):