Skip to content

Commit

Permalink
Change: typos corrected documentation improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersulyok committed Jan 6, 2024
1 parent 39bc35b commit 4c1ef5b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The project implemented the following GitHub workflows:
- executes `pylint`
- generates coverage data and upload it to [codecov.io](https://codecov.io/)

2. **Publish Python distribution packages to PypI** (`publish.yml`). A published release triggers this action:
2. **Publish Python distribution packages to PyPI** (`publish.yml`). A published release triggers this action:
- build distribution package on Python `3.10`
- upload the new package to PyPI

Expand Down
2 changes: 1 addition & 1 deletion bin/create_python_env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# create_python_env.sh (C) 2024, Peter Sulyok
# This script will install a new virtual Python environment with dependencies.
# This script will create a new virtual Python environment and will install all dependencies.
#

# Check the first command-line parameter.
Expand Down
8 changes: 4 additions & 4 deletions src/diskinfo/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class Disk:
directory
* a `by-path` name of the disk (e.g. `"pci-0000:00:17.0-ata-3"`) located in `/dev/disk/by-path/` directory
Based on the specified input parameter the disk will be indentified and its attributes will be collected and
Based on the specified input parameter the disk will be identified and its attributes will be collected and
stored. A :py:obj:`ValueError` exception will be raised in case of missing or invalid disk identifier.
Operators (``<``, ``>`` and ``==``) are also implemented for this class to compare different class instances,
they use the disk name for comparision.
they use the disk name for comparison.
.. note::
During the class initialization the disk will not be physically accessed.
Expand All @@ -45,7 +45,7 @@ class Disk:
RuntimeError: in case of any system error
Example:
This exampe shows how to create a :class:`~diskinfo.Disk` class then how to get its path and serial number::
This example shows how to create a :class:`~diskinfo.Disk` class then how to get its path and serial number::
>>> from diskinfo import Disk
>>> d=Disk("sda")
Expand Down Expand Up @@ -573,7 +573,7 @@ def get_temperature(self) -> float:
float: disk temperature in C degree
Raises:
RuntimeError: if HWMON file cannot be found for this disk (typically drivetemp module is not loaded)
RuntimeError: if HWMON file cannot be found for this disk (typically ``drivetemp`` module is not loaded)
Example:
An example about the use of this function::
Expand Down
10 changes: 5 additions & 5 deletions src/diskinfo/diskinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DiskInfo:
set of :class:`~diskinfo.DiskType` values.
Operator ``in`` is also implemented for this class. Caller can check if a :class:`~diskinfo.Disk` class instance
can be found on the list of the dicovered disks.
can be found on the list of the discovered disks.
Example:
A code example about the basic use of the class and the use of the ``in`` operator.
Expand Down Expand Up @@ -46,8 +46,8 @@ def __init__(self):
self.__disk_list.append(new_disk)

def get_disk_number(self, included: set = None, excluded: set = None) -> int:
"""Returns the number of the disks. The caller can specify inclusive and exclusice filters for disk types.
If no filters are specified then the default behaviour is to include all disk types and to exclude nothing.
"""Returns the number of the disks. The caller can specify inclusive and exclusive filters for disk types.
If no filters are specified then the default behavior is to include all disk types and to exclude nothing.
Args:
included (set): filter set for included disk types
Expand Down Expand Up @@ -91,8 +91,8 @@ def get_disk_number(self, included: set = None, excluded: set = None) -> int:

def get_disk_list(self, included: set = None, excluded: set = None, sorting: bool = False,
rev_order: bool = False) -> List[Disk]:
"""Returns the list of identified disks. The caller can specify inclusive and exclusice filters for disk types.
If no filters are specified the default behaviour is to include all disk types and to exclude nothing.
"""Returns the list of identified disks. The caller can specify inclusive and exclusive filters for disk types.
If no filters are specified the default behavior is to include all disk types and to exclude nothing.
The list can be sorted based on the disk `name` in alphabetical order. Caller can also request sorting
in reverse order.
Expand Down

0 comments on commit 4c1ef5b

Please sign in to comment.