add spellchecker with first conf, fix some errors

This commit is contained in:
Patrick Kanzler 2020-05-11 23:39:56 +02:00
parent 9e406efc86
commit f4e214ad17
8 changed files with 25 additions and 12 deletions

View File

@ -293,3 +293,9 @@ texinfo_documents = [
# If true, do not generate a @detailmenu in the "Top" node's menu. # If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False #texinfo_no_detailmenu = False
# spellchecker
spelling_ignore_pypi_package_names = True
spelling_ignore_wiki_words = True
spelling_ignore_python_builtins = True
spelling_ignore_importable_modules = True

View File

@ -0,0 +1,7 @@
Raspbian
ESC
POS
Escpos
Escpos
baudrate
lsusb

View File

@ -163,7 +163,7 @@ The printer section
The ``printer`` configuration section defines a default printer to create. The ``printer`` configuration section defines a default printer to create.
The only required paramter is ``type``. The value of this has to be one of the The only required parameter is ``type``. The value of this has to be one of the
printers defined in :doc:`/user/printers`. printers defined in :doc:`/user/printers`.
The rest of the given parameters will be passed on to the initialization of the printer class. The rest of the given parameters will be passed on to the initialization of the printer class.
@ -199,7 +199,7 @@ Python-escpos is designed to accept unicode.
For normal usage you can simply pass your text to the printers ``text()``-function. It will automatically guess For normal usage you can simply pass your text to the printers ``text()``-function. It will automatically guess
the right codepage and then send the encoded data to the printer. If this feature does not work, please try to the right codepage and then send the encoded data to the printer. If this feature does not work, please try to
isolate the error and then create an issue on the Github project page. isolate the error and then create an issue on the GitHub project page.
If you want or need to you can manually set the codepage. For this please use the ``charcode()``-function. You can set If you want or need to you can manually set the codepage. For this please use the ``charcode()``-function. You can set
any key-value that is in ``CHARCODE``. If something is wrong, an ``CharCodeError`` will be raised. any key-value that is in ``CHARCODE``. If something is wrong, an ``CharCodeError`` will be raised.

View File

@ -58,7 +58,7 @@ BARCODE_B = 'barcodeB'
class BaseProfile(object): class BaseProfile(object):
"""This respresents a printer profile. """This represents a printer profile.
A printer profile knows about the number of columns, supported A printer profile knows about the number of columns, supported
features, colors and more. features, colors and more.

View File

@ -3,7 +3,7 @@
""" CLI """ CLI
This module acts as a command line interface for python-escpos. It mirrors This module acts as a command line interface for python-escpos. It mirrors
closely the available ESCPOS commands while adding a couple extra ones for convience. closely the available ESCPOS commands while adding a couple extra ones for convenience.
It requires you to have a configuration file. See documentation for details. It requires you to have a configuration file. See documentation for details.
@ -554,7 +554,7 @@ def main():
def demo(printer, **kwargs): def demo(printer, **kwargs):
""" """
Prints specificed demos. Called when CLI is passed `demo`. This function Prints demos. Called when CLI is passed `demo`. This function
uses the DEMO_FUNCTIONS dictionary. uses the DEMO_FUNCTIONS dictionary.
:param printer: A printer from escpos.printer :param printer: A printer from escpos.printer

View File

@ -1,6 +1,6 @@
""" ESC/POS configuration manager. """ ESC/POS configuration manager.
This module contains the implentations of abstract base class :py:class:`Config`. This module contains the implementations of abstract base class :py:class:`Config`.
""" """

View File

@ -398,7 +398,7 @@ class Escpos(object):
*default*: A *default*: A
:param check: If this parameter is True, the barcode format will be checked to ensure it meets the bc :param check: If this parameter is True, the barcode format will be checked to ensure it meets the bc
requirements as defigned in the esc/pos documentation. See :py:meth:`.check_barcode()` requirements as definged in the ESC/POS documentation. See :py:meth:`.check_barcode()`
for more information. *default*: True. for more information. *default*: True.
:raises: :py:exc:`~escpos.exceptions.BarcodeSizeError`, :raises: :py:exc:`~escpos.exceptions.BarcodeSizeError`,

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
"""verifies that the metaclass abc is properly used by Escpos """verifies that the metaclass abc is properly used by ESC/POS
:author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_ :author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_
:organization: `python-escpos <https://github.com/python-escpos>`_ :organization: `python-escpos <https://github.com/python-escpos>`_
@ -16,7 +16,7 @@ from abc import ABCMeta
@raises(TypeError) @raises(TypeError)
def test_abstract_base_class_raises(): def test_abstract_base_class_raises():
"""test whether the abstract base class raises an exception for Escpos""" """test whether the abstract base class raises an exception for ESC/POS"""
escpos.Escpos() # This call should raise TypeError because of abstractmethod _raw() escpos.Escpos() # This call should raise TypeError because of abstractmethod _raw()