From f4e214ad17d42a0da7370ca4e17dfaf99a990050 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 11 May 2020 23:39:56 +0200 Subject: [PATCH] add spellchecker with first conf, fix some errors --- doc/conf.py | 6 ++++++ doc/spelling_wordlist.txt | 7 +++++++ doc/user/usage.rst | 10 +++++----- src/escpos/capabilities.py | 2 +- src/escpos/cli.py | 4 ++-- src/escpos/config.py | 2 +- src/escpos/escpos.py | 2 +- test/test_abstract_base_class.py | 4 ++-- 8 files changed, 25 insertions(+), 12 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index b83629e..db40f67 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -293,3 +293,9 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #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 diff --git a/doc/spelling_wordlist.txt b/doc/spelling_wordlist.txt index e69de29..e037ead 100644 --- a/doc/spelling_wordlist.txt +++ b/doc/spelling_wordlist.txt @@ -0,0 +1,7 @@ +Raspbian +ESC +POS +Escpos +Escpos +baudrate +lsusb \ No newline at end of file diff --git a/doc/user/usage.rst b/doc/user/usage.rst index 21537a8..947a521 100644 --- a/doc/user/usage.rst +++ b/doc/user/usage.rst @@ -48,9 +48,9 @@ to have and the second yields the "Output Endpoint" address. By default the "Interface" number is "0" and the "Output Endpoint" address is "0x01". If you have other values then you can define them on -your instance. So, assuming that we have another printer, CT-S2000, -manufactured by Citizen (with "Vendor ID" of 2730 and "Product ID" of 0fff) -where in\_ep is on 0x81 and out\_ep=0x02, then the printer definition should +your instance. So, assuming that we have another printer, CT-S2000, +manufactured by Citizen (with "Vendor ID" of 2730 and "Product ID" of 0fff) +where in\_ep is on 0x81 and out\_ep=0x02, then the printer definition should look like: **Generic USB Printer initialization** @@ -163,7 +163,7 @@ The printer section 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`. 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 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 any key-value that is in ``CHARCODE``. If something is wrong, an ``CharCodeError`` will be raised. diff --git a/src/escpos/capabilities.py b/src/escpos/capabilities.py index c4b6ab5..65c2666 100644 --- a/src/escpos/capabilities.py +++ b/src/escpos/capabilities.py @@ -58,7 +58,7 @@ BARCODE_B = 'barcodeB' class BaseProfile(object): - """This respresents a printer profile. + """This represents a printer profile. A printer profile knows about the number of columns, supported features, colors and more. diff --git a/src/escpos/cli.py b/src/escpos/cli.py index 1b0db9e..c9f9125 100644 --- a/src/escpos/cli.py +++ b/src/escpos/cli.py @@ -3,7 +3,7 @@ """ CLI 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. @@ -554,7 +554,7 @@ def main(): 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. :param printer: A printer from escpos.printer diff --git a/src/escpos/config.py b/src/escpos/config.py index e2dd789..b4cdb33 100644 --- a/src/escpos/config.py +++ b/src/escpos/config.py @@ -1,6 +1,6 @@ """ 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`. """ diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 24f6475..05a763d 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -398,7 +398,7 @@ class Escpos(object): *default*: A :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. :raises: :py:exc:`~escpos.exceptions.BarcodeSizeError`, diff --git a/test/test_abstract_base_class.py b/test/test_abstract_base_class.py index cc09ee1..5edc8a2 100644 --- a/test/test_abstract_base_class.py +++ b/test/test_abstract_base_class.py @@ -1,5 +1,5 @@ #!/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 `_ :organization: `python-escpos `_ @@ -16,7 +16,7 @@ from abc import ABCMeta @raises(TypeError) 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()