Skip to content

Commit 5bc47fc

Browse files
committed
more docs touch ups
1 parent ec0d8e0 commit 5bc47fc

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

docs/source/developer.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ magic numbers you will also need to set the ``binary`` attr to True.
8181
8282
8383
Formats will contain metadata in a separate header file can be defined using
84-
the ``WithSeparateHeader`` mixin.
84+
the :class:`.WithSeparateHeader` mixin.
8585

8686
.. code-block:: python
8787
@@ -113,10 +113,10 @@ return a dictionary containing metadata for the file-set.
113113
'0001'
114114
115115
116-
Similar to ``WithSeparateHeader``, ``WithSideCars`` can be used to define a format that
116+
Similar to :class:`.WithSeparateHeader`, :class:`.WithSideCars` can be used to define a format that
117117
contains some metadata within the main file, and additional metadata in a separate
118-
"side-car" file. It can be used the same as ``WithSeparateHeader``, however, the
119-
type of the primary file that reads the metadata from the binary file with ``read_metadata``
118+
"side-car" file. It can be used the same as :class:`.WithSeparateHeader`, however, the
119+
type of the primary file that reads the metadata from the binary file with ``read_metadata()``
120120
must also be defined in ``primary_type``
121121

122122

@@ -137,7 +137,7 @@ for your format. This is simply done by adding a new property to the class using
137137

138138
Take for example the `GIS shapefile structure <https://www.earthdatascience.org/courses/earth-analytics/spatial-data-r/shapefile-structure/>`_,
139139
it is a file-set consisting of 3 to 6 files differentiated by their extensions. To
140-
implement this class we use the ``@property`` decorator. We inherit from the ``WithAdjacentFiles``
140+
implement this class we use the ``@property`` decorator. We inherit from the :class:`.WithAdjacentFiles`
141141
mixin so that neighbouring files (i.e. files with the same stem but different extension)
142142
are included when the class is instantiated with just the primary ".shp" file.
143143

@@ -219,7 +219,7 @@ Properties that appear in ``fspaths`` attribute of the object are considered to
219219
even when the ``trim`` argument is set to True.
220220

221221
After the required properties have been deeper checks can be by using the ``check``
222-
decorator. Take the ``fileformats.image.Tiff`` class
222+
decorator. Take the :class:`fileformats.image.Tiff` class
223223

224224
.. code-block:: python
225225
@@ -248,10 +248,9 @@ decorator. Take the ``fileformats.image.Tiff`` class
248248
)
249249
return endianness
250250
251-
The ``Tiff`` format class needs to check two different magic numbers, one for big endian
251+
The :class:`.Tiff` format class needs to check two different magic numbers, one for big endian
252252
files and another one for little endian files. Therefore we can't just use the
253-
``WithMagicNumber`` mixin and have to roll our own, ``endianness`` is decorated with
254-
``fileformats.core.mark.check``.
253+
:class:`.WithMagicNumber` mixin and have to roll our own.
255254

256255

257256
Extra methods

docs/source/typing.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ be classified as containing a PNG image
2727
False
2828
2929
.. warning::
30-
At the time of writing currently classifiers are not supported by Mypy and other
30+
Classifiers are currently not supported by Mypy and other
3131
static type checkers (only dynamic type-checking in Pydra_) because they use a
3232
custom `__subclasshook__` method to implement the subclassing behaviour and overload
33-
the `__class_getitem__` method, which isn't recommended in the official docs. It is
34-
hoped that it will be possible to implement a custom Mypy plugin in the future to
35-
support this feature.
33+
the `__class_getitem__` method. It is hoped that it will be possible to implement
34+
a custom Mypy plugin in the future to support this feature.
3635

3736
The types of classes that can be used to classify varies from type to type. For archive
3837
types like :class:`.Zip`, :class:`.Gzip`, take another file format type, others specific

0 commit comments

Comments
 (0)