Skip to content

Commit e0e6788

Browse files
committed
Fix codespell
1 parent 343c807 commit e0e6788

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

hdmf_docutils/doctools/render.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,22 @@ def update_stats(obj, parent_name):
141141
type_def_key = obj.def_key()
142142
type_inc_key = obj.inc_key()
143143
if obj.get(type_def_key, None) is not None:
144-
nd = obj[type_def_key]
144+
ndt = obj[type_def_key]
145145
else:
146-
nd = obj.get(type_inc_key, None)
146+
ndt = obj.get(type_inc_key, None)
147147
specstats.add_group(name=obj_name,
148-
data_type=nd)
148+
data_type=ndt)
149149
elif isinstance(obj, DatasetSpec):
150150
type_def_key = obj.def_key()
151151
type_inc_key = obj.inc_key()
152152
if obj.get(type_def_key, None) is not None:
153-
nd = obj[type_def_key]
153+
ndt = obj[type_def_key]
154154
else:
155-
nd = obj.get(type_inc_key, None)
155+
ndt = obj.get(type_inc_key, None)
156156
specstats.add_dataset(name=obj_name,
157157
shape=obj.shape,
158158
dtype=obj['type'] if hasattr(obj, 'type') else None,
159-
data_type=nd)
159+
data_type=ndt)
160160
elif isinstance(obj, AttributeSpec):
161161
specstats.add_attribute(name=obj_name,
162162
value=obj.value)

hdmf_docutils/doctools/renderrst.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def render_type_hierarchy(spec_catalog,
451451
should be created.
452452
:type target_doc: RSTDocument or Non
453453
:param section_label: String with the label for the section (or None if no label should be added)
454-
:param subsection_title: String with the title for the secton (or None if no section should be added)
454+
:param subsection_title: String with the title for the section (or None if no section should be added)
455455
456456
:returns: Tuple with: 1) RSTDocument with the type hierarchy,
457457
2) OrderedDict with the type hierarchy itself as generated by SpecCatalog.get_full_hierarchy()
@@ -558,7 +558,7 @@ def render_specification_properties(spec, newline='\n', ignore_props=None, prepe
558558
spec_prop_list.append('**Quantity:** %s' % SpecToRST.quantity_to_string(spec['quantity']))
559559
if spec.get('linkable', None) is not None and 'linkable' not in ignore_keys:
560560
spec_prop_list.append('**Linkable:** %s' % str(spec['linkable']))
561-
# Add attribute spec properites
561+
# Add attribute spec properties
562562
if isinstance(spec, AttributeSpec):
563563
if 'primitive_type' not in ignore_keys:
564564
spec_prop_list.append('**Primitive Type:** %s' % SpecToRST.spec_basetype_name(spec))
@@ -668,7 +668,7 @@ def render_spec_table(spec,
668668
# Create the description for the object
669669
spec_doc = SpecToRST.clean_schema_doc_string(doc_str=spec.doc,
670670
add_prefix=rst_table.newline + rst_table.newline)
671-
# Create the list of additional object properties to be added as a list ot the doc
671+
# Create the list of additional object properties to be added as a list to the doc
672672
spec_doc += SpecToRST.render_specification_properties(spec=spec,
673673
newline=rst_table.newline,
674674
ignore_props=['primitive_type'])

hdmf_docutils/generate_format_docs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def render_data_type_section(section,
246246
label=LabelHelper.get_src_section_label(rt,
247247
spec_generate_src_file, spec_show_yaml_src)))
248248

249-
# Render the propoerties of the spec as part of the overview
249+
# Render the properties of the spec as part of the overview
250250
type_desc_doc.add_text(SpecToRST.render_specification_properties(rt_spec,
251251
type_desc_doc.newline,
252252
ignore_props=ignore_props,
@@ -427,7 +427,7 @@ def main():
427427
spec_dir = spec_input_spec_dir
428428
# Set the names of the main output files
429429
doc_filename = os.path.join(file_dir, spec_output_doc_filename) # Name of the file with main documentation
430-
# Name fo the file where the YAML sources are rendered
430+
# Name of the file where the YAML sources are rendered
431431
srcdoc_filename = os.path.join(file_dir, spec_output_src_filename) if spec_generate_src_file else None
432432
master_filename = os.path.join(file_dir, spec_output_master_filename)
433433
type_hierarchy_doc_filename = os.path.join(file_dir, spec_output_doc_type_hierarchy_filename)

hdmf_docutils/init_sphinx_extension_doc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def setup(app):
418418
}
419419
"""
420420

421-
# Add the input options ot the settings
421+
# Add the input options to the settings
422422
custom_autodoc_settings = \
423423
"""# -*- coding: utf-8 -*-
424424
# Configuration file for generating sources for the format documentation from the YAML specification files
@@ -794,7 +794,7 @@ def define_cl_args():
794794
parser.add_argument('--resolve_type_inc', dest='resolve_type_inc', action='store', type=bool_type, required=False, default=False,
795795
help="Always resolve type includes to show the full spec of an object including inherited components?")
796796
parser.add_argument('--latex_clearpage_after_type', dest='latex_clearpage_after_type', action='store', type=bool_type, required=False, default=True,
797-
help="Add clearpage command in latex after each neurodata_type to esnure figures always appear in the right section at the cost of adding empty space between sections.")
797+
help="Add clearpage command in latex after each neurodata_type to ensure figures always appear in the right section at the cost of adding empty space between sections.")
798798
parser.add_argument('--table_depth_char', dest='table_depth_char', action='store', type=str, required=False, default='.',
799799
help="Char to be used to indent entries in description tables to indicate the depth of the object.")
800800
parser.add_argument('--abbrv_main_obj_in_table', dest='abbrv_main_obj_in_table', action='store', type=bool_type, required=False, default=True,
@@ -806,7 +806,7 @@ def define_cl_args():
806806
parser.add_argument('--generate_src_file', dest='generate_src_file', action='store', type=bool_type, required=False, default=True,
807807
help="Generate separate reStructuredText files for the YAML sources rather than including them in the description files?")
808808
parser.add_argument('--show_hierarchy_plots', dest='show_hierarchy_plots', action='store', type=bool_type, required=False, default=True,
809-
help="Generate and show plots of the hierarchy for each tyep/neurodata_type?")
809+
help="Generate and show plots of the hierarchy for each type/neurodata_type?")
810810
parser.add_argument('--show_yaml_src', dest='show_yaml_src', action='store', type=bool_type, required=False, default=True,
811811
help="Show the source specification as YAML.")
812812
parser.add_argument('--custom_description', dest='custom_description', action='store', type=str, required=False, default=None,

0 commit comments

Comments
 (0)