From c38a539aae05cd4e0eaa93a3067addfaf8c7bd3d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 10 Dec 2023 20:40:26 +0100 Subject: [PATCH] Fix typos with codespell (#2478) --- CHANGES.rst | 14 +++++++------- debian/changelog | 2 +- docs/debugger.rst | 4 ++-- docs/design/line-endings.rst | 2 +- docs/design/settings-and-sessions.rst | 2 +- docs/first-steps.rst | 2 +- docs/modes.rst | 4 ++-- docs/release.rst | 2 +- docs/setup.rst | 2 +- docs/user-experience.rst | 2 +- make.py | 4 ++-- mu/debugger/runner.py | 2 +- mu/interface/dialogs.py | 2 +- mu/interface/editor.py | 4 ++-- mu/interface/main.py | 4 ++-- mu/interface/panes.py | 4 ++-- mu/interface/themes.py | 2 +- mu/logic.py | 6 +++--- mu/modes/api/adafruit.py | 6 +++--- mu/modes/api/esp.py | 2 +- mu/modes/api/flask.py | 4 ++-- mu/modes/api/lego.py | 14 +++++++------- mu/modes/api/microbit.py | 4 ++-- mu/modes/api/pi.py | 4 ++-- mu/modes/api/pyboard.py | 4 ++-- mu/modes/api/python3.py | 10 +++++----- mu/modes/api/shared.py | 4 ++-- mu/modes/debugger.py | 2 +- mu/modes/microbit.py | 2 +- tests/debugger/test_runner.py | 4 ++-- tests/interface/test_dialogs.py | 2 +- tests/interface/test_editor.py | 2 +- tests/interface/test_main.py | 2 +- tests/interface/test_panes.py | 10 +++++----- tests/test_logic.py | 2 +- tests/test_settings.py | 2 +- 36 files changed, 72 insertions(+), 72 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a93b58998..23422d1ae 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -204,7 +204,7 @@ provide bug reports or feedback via: https://github.com/mu-editor/mu/issues/new Mu. Thank you for your patience, bug reports and code patches. * There have been the usual minor bug fixes and clean ups from various regular contributors and some new ones too. Thank you for your careful and well - targetted changes. + targeted changes. * Carlos (@carlosperate) fixed some packaging problems relating to the iPython kernel bundled with Mu. * Martin (@dybber) fixed a couple of problems relating to the stopping of @@ -358,7 +358,7 @@ provide bug reports or feedback via: https://github.com/mu-editor/mu/issues/new this is ongoing so expect further improvements in upcoming releases. As always, many thanks for these efforts. * Tim addressed a `wheel`/`sdist` related problem that was causing odd side - effects with regard to dependancies. + effects with regard to dependencies. * A strange bug, where it was not possible to install third-party packages on first run of Mu, opened up a deep rabbit hole of investigation. In the end Tim was able to fix this AND address the source of a warning message from Qt @@ -469,7 +469,7 @@ reports or feedback via: https://github.com/mu-editor/mu/issues/new * **NEW FEATURE** A brand new web mode for creating simple dynamic web applications with the Flask web framework. Currently users are able to edit Python, HTML and CSS files, run a local server and view their website in - thier browser. We expect to add a deployment option thanks to PythonAnywhere + their browser. We expect to add a deployment option thanks to PythonAnywhere by the time alpha 3 is released. * **NEW FEATURE** A new Slovak translation of Mu thanks to Miroslav Biňas (GitHub user `bletvaska `_). @@ -532,7 +532,7 @@ reports or feedback via: https://github.com/mu-editor/mu/issues/new `Leroy Levin `_ for making this happen..! * Ensure that ``pip`` is updated while creating the Windows installers. Thanks to `Yu Wang `_ for making this change. -* Various minor updates and fixes to aid code readibility. +* Various minor updates and fixes to aid code readability. 1.1.0-alpha.1 ============= @@ -804,7 +804,7 @@ next release will be 1.1.0 with some new features. * Update the debugger so the process stops at the end of the run. * Ensure the current working directory for the REPL is set to mu_mode. * Add additional documentation about Raspberry Pi related API. -* Update micro:bit runtime to lates MicroPython beta. +* Update micro:bit runtime to latest MicroPython beta. * Make a start on developer documentation. 1.0.0.beta.11 @@ -822,7 +822,7 @@ next release will be 1.1.0 with some new features. * Fixed three code quality warnings found by https://lgtm.com/projects/g/mu-editor/mu/alerts/?mode=list * Updated API generation so the output is ordered (helps when diffing the generated files). * Updated Makefile to create Python packages/wheels and deploy to PyPI. -* Explicit versions for packages found within install_requires in setup.py. +* Explicit versions for packages found within install_requires in setup.py. * Minor documentation changes. 1.0.0.beta.9 @@ -875,7 +875,7 @@ next release will be 1.1.0 with some new features. * Change the default Python directory from ``~/python`` to ``~/mu_code``. This fixes issue #126. * Add instructions for installing PyQt5 and QScintilla on Mac OS. * Update to latest version of uFlash. -* Add highlighting of search mathes. +* Add highlighting of search matches. * Check if the script produced is > 8k. * Use a settings file local to the Mu executable if available. * Fix bug with highlighting code errors in Windows. diff --git a/debian/changelog b/debian/changelog index 45adf7573..17d5ae37d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,7 @@ mu (0.9.12-1) unstable; urgency=low * Change the default Python directory from ``~/python`` to ``~/mu_code``. This fixes issue #126. * Add instructions for installing PyQt5 and QScintilla on Mac OS. * Update to latest version of uFlash. - * Add highlighting of search mathes. + * Add highlighting of search matches. * Check if the script produced is > 8k. * Use a settings file local to the Mu executable if available. * Fix bug with highlighting code errors in Windows. diff --git a/docs/debugger.rst b/docs/debugger.rst index ff25b8c00..9da176e1c 100644 --- a/docs/debugger.rst +++ b/docs/debugger.rst @@ -14,7 +14,7 @@ standard Python, Mu does this in two ways: Adafruit board restarts the device and Circuit Python evaluates your code. -Both the Python runner and grapical debugger were created with the financial +Both the Python runner and graphical debugger were created with the financial support of the Raspberry Pi Foundation. If you are creating a new standard Python mode for Mu, you should *at least* @@ -98,7 +98,7 @@ is never blocked. The ``mu.debugger.client.Debugger`` class is used to react to incoming events from, and as an API for Mu to issue commands to the debug runner. It uses a -reference to a ``view`` object to update the user inteface as events are +reference to a ``view`` object to update the user interface as events are detected. Debug Runner diff --git a/docs/design/line-endings.rst b/docs/design/line-endings.rst index d80c418c2..8dc47b85c 100644 --- a/docs/design/line-endings.rst +++ b/docs/design/line-endings.rst @@ -31,7 +31,7 @@ newline manipulation to present to the editor control the characters originally present in the file. When the file is saved, the same characters are written out. -However this creates a quandary when programatically manipulating the editor +However this creates a quandary when programmatically manipulating the editor text: do we use the most widespread \n as a line-ending; or do we use the platform convention `os.linesep`; or do we use the convention used in the file itself, which may or may not follow the platform convention? diff --git a/docs/design/settings-and-sessions.rst b/docs/design/settings-and-sessions.rst index 92fce0128..e8c41de59 100644 --- a/docs/design/settings-and-sessions.rst +++ b/docs/design/settings-and-sessions.rst @@ -10,7 +10,7 @@ This currently uses JSON (as we have historically) but https://github.com/mu-edi is tracking the possibility of using TOML or some other format. Settings objects have defaults which are overridden by values loaded from file -or set programatically. When the settings are saved, only values overriding +or set programmatically. When the settings are saved, only values overriding the defaults are saved. The ``load`` method can be called several times for the same settings; values in diff --git a/docs/first-steps.rst b/docs/first-steps.rst index 3fefb3bcd..61f59fde5 100644 --- a/docs/first-steps.rst +++ b/docs/first-steps.rst @@ -34,7 +34,7 @@ expect certain pieces of information from you: Please try to be precise and provide as much information as possible. -For what are obvious reaons, I hope you can see why we're unable to respond to +For what are obvious reasons, I hope you can see why we're unable to respond to issues that say some variation of, "when I click this button, it breaks". ;-) Coding diff --git a/docs/modes.rst b/docs/modes.rst index 8113889da..2191c23d6 100644 --- a/docs/modes.rst +++ b/docs/modes.rst @@ -100,7 +100,7 @@ There are two ways to run your script in this mode: graphical way to inspect and watch your code execute. Because of the overhead needed to start the graphical debugger it takes longer -to start running your script. This is especially noticable on the Raspberry Pi. +to start running your script. This is especially noticeable on the Raspberry Pi. Python 2 isn't supported by Mu and never will be. @@ -152,7 +152,7 @@ a couple of relatively simple steps: * In ``mu.app.py`` import the new mode from ``mu.modes`` and add an instance of the mode's class to the dictionary returned by the ``setup_modes`` function. (All modes are instantiated with the available ``editor`` and ``view`` - objects that represnt the editor's logic and UI layer respectively.) + objects that represent the editor's logic and UI layer respectively.) Update the Class's Behaviour ++++++++++++++++++++++++++++ diff --git a/docs/release.rst b/docs/release.rst index e3e8e5eb0..a0ffbad10 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -87,7 +87,7 @@ cross platform nature of Mu is consistent): In", "Step Out" buttons. *Outcome: the conventional behaviour for each button should happen. "Stop" will stop the script. "Continue" will run to the next break or end of script. "Step Over" will move to the next valid line of - code. "Step In" will move into the called funtion. "Step Out" will move out + code. "Step In" will move into the called function. "Step Out" will move out of the current function. As all this happens, the input/output pane and object inspector should update as the code progresses.* * In Python mode, click on the "REPL" button. *Outcome: an iPython based REPL diff --git a/docs/setup.rst b/docs/setup.rst index 6a0c0ce76..c533fe3d0 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -100,7 +100,7 @@ In the setup.py file on the pyqt6 branch, you'll find the following lines:: "PyQt6-Charts==6.3.1" + ';"arm" not in platform_machine and "aarch" not in platform_machine', -Remove the lines for Rasberry Pi and leave only the following lines: +Remove the lines for Raspberry Pi and leave only the following lines: "PyQt6==6.3.1", "PyQt6-QScintilla==2.13.3", diff --git a/docs/user-experience.rst b/docs/user-experience.rst index 3ad59b7e3..5ce5527a2 100644 --- a/docs/user-experience.rst +++ b/docs/user-experience.rst @@ -207,7 +207,7 @@ she wants something simple and obvious. Next, she turns her attention to Idle - the editor that comes bundled with Python. It's good that Idle is free, has some syntax highlighting, auto-indents -Python code, is cross platform, leightweight and simple. However, there are no +Python code, is cross platform, lightweight and simple. However, there are no line numbers, error reporting is incomrehensible to beginners and, most importantly, there are two separate windows that often get lost or confused with each other (one for code, the other for a sort of REPL). diff --git a/make.py b/make.py index d1761ea71..4f72fe90c 100644 --- a/make.py +++ b/make.py @@ -210,7 +210,7 @@ def clean(): _rmtree(".pytest_cache") _rmtree("lib") _rmtree(".git/avatar/") # Created with `make video` - _rmtree("venv-pup") # Created wth `make macos/win64` + _rmtree("venv-pup") # Created with `make macos/win64` # TODO: recursive __pycache__ directories _rmfiles(".", ".coverage") _rmfiles(".", "*.egg-info") @@ -337,7 +337,7 @@ def translate_done(lang=""): @export def translate_test(lang=""): - """Run translate_done and lauch Mu in the given LANG.""" + """Run translate_done and launch Mu in the given LANG.""" result = translate_done(lang) if result != 0: raise RuntimeError("Failed compiling the mu.po file.") diff --git a/mu/debugger/runner.py b/mu/debugger/runner.py index fe0ae076b..6a6fcc031 100644 --- a/mu/debugger/runner.py +++ b/mu/debugger/runner.py @@ -453,7 +453,7 @@ def do_quit(self): def do_close(self): """ - Respond to a closed socket (not a user commend, but needs handling). + Respond to a closed socket (not a user command, but needs handling). """ self.client = None self.command_thread.join() diff --git a/mu/interface/dialogs.py b/mu/interface/dialogs.py index 3a8346087..783bc46b4 100644 --- a/mu/interface/dialogs.py +++ b/mu/interface/dialogs.py @@ -163,7 +163,7 @@ def setup(self, envars): _( "The environment variables shown below will be " "set each time you run a Python 3 script.\n\n" - "Each separate enviroment variable should be on a " + "Each separate environment variable should be on a " "new line and of the form:\nNAME=VALUE" ) ) diff --git a/mu/interface/editor.py b/mu/interface/editor.py index fb2303cce..0eac8b590 100644 --- a/mu/interface/editor.py +++ b/mu/interface/editor.py @@ -85,7 +85,7 @@ class EditorPane(QsciScintilla): Represents the text editor. """ - # Signal fired when a script or hex is droped on this editor. + # Signal fired when a script or hex is dropped on this editor. open_file = pyqtSignal(str) # Signal fired when a context menu is requested. context_menu = pyqtSignal() @@ -144,7 +144,7 @@ def dropEvent(self, event): """ # Does the drag event have any urls? - # Files are transfered as a url (by path not value) + # Files are transferred as a url (by path not value) if event.mimeData().hasUrls(): # Qt doesn't seem to have an 'open' action, # this seems the most appropriate diff --git a/mu/interface/main.py b/mu/interface/main.py index b2811b2de..c9cc69edf 100644 --- a/mu/interface/main.py +++ b/mu/interface/main.py @@ -292,7 +292,7 @@ def close(): # any QWidget not just buttons self.tabBar().setTabButton(tab_id, QTabBar.RightSide, container) - # Return the index of the new page just like the reall addTab + # Return the index of the new page just like the real addTab return tab_id def change_tab(self, tab_id): @@ -757,7 +757,7 @@ def add_python3_runner( new process. If envars is given, these will become part of the environment context - of the new chlid process. + of the new child process. If python_args is given, these will be passed as arguments to the Python runtime used to launch the child process. diff --git a/mu/interface/panes.py b/mu/interface/panes.py index 11890eb24..567fc843f 100644 --- a/mu/interface/panes.py +++ b/mu/interface/panes.py @@ -1359,7 +1359,7 @@ def set_start_of_current_line(self): Set the flag to indicate the start of the current line (used before waiting for input). - This flag is used to discard the preceeding text in the text entry + This flag is used to discard the preceding text in the text entry field when Mu parses new input from the user (i.e. any text beyond the self.start_of_current_line). """ @@ -1588,7 +1588,7 @@ def __init__(self, parent=None): self.min_y = -1000 self.flooded = False # Flag to indicate if data flooding is happening. - # Holds deques for each slot of incoming data (assumes 1 to start with) + # Holds dequeues for each slot of incoming data (assumes 1 to start with) self.data = [deque([0] * self.lookback)] # Holds line series for each slot of incoming data (assumes 1 to start # with). diff --git a/mu/interface/themes.py b/mu/interface/themes.py index 0b6e1f899..5308854ed 100644 --- a/mu/interface/themes.py +++ b/mu/interface/themes.py @@ -64,7 +64,7 @@ def get_database(cls): """ Create a font database and load the MU builtin fonts into it. This is a cached classmethod so the font files aren't re-loaded - every time a font is refereced + every time a font is referenced """ if cls._DATABASE is None: cls._DATABASE = QFontDatabase() diff --git a/mu/logic.py b/mu/logic.py index dc3d25ba9..d4566fb04 100644 --- a/mu/logic.py +++ b/mu/logic.py @@ -509,7 +509,7 @@ def __init__(self): def unexpectedError(self, filename, message): """ - Called if an unexpected error occured while trying to process the file + Called if an unexpected error occurred while trying to process the file called filename. The message parameter contains a description of the problem. """ @@ -691,7 +691,7 @@ def rowCount(self, parent): def data(self, index, role): """ Reimplements QAbstractListModel.data(): returns data for the - specified index and role. In this case only implmented for + specified index and role. In this case only implemented for ToolTipRole and DisplayRole """ device = self._devices[index.row()] @@ -1211,7 +1211,7 @@ def load_cli(self, paths): def _abspath(self, paths): """ - Safely convert an arrary of paths to their absolute forms and remove + Safely convert an array of paths to their absolute forms and remove duplicate items. """ result = [] diff --git a/mu/modes/api/adafruit.py b/mu/modes/api/adafruit.py index 927575327..7197b45f8 100644 --- a/mu/modes/api/adafruit.py +++ b/mu/modes/api/adafruit.py @@ -437,10 +437,10 @@ _("os.stat(path) \nGet the status of a file or directory.\n"), _("os.stat(path) \nGet the status of a file or directory.\n"), _( - "os.statvfs(path) \nGet the status of a fileystem.\nReturns a tuple with the filesystem information in the following order:\n\n\nf_bsize -- file system block size\nf_frsize -- fragment size\nf_blocks -- size of fs in f_frsize units\nf_bfree -- number of free blocks\nf_bavail -- number of free blocks for unpriviliged users\nf_files -- number of inodes\nf_ffree -- number of free inodes\nf_favail -- number of free inodes for unpriviliged users\nf_flag -- mount flags\nf_namemax -- maximum filename length\n\n\nParameters related to inodes: f_files, f_ffree, f_avail\nand the f_flags parameter may return 0 as they can be unavailable\nin a port-specific implementation.\n" + "os.statvfs(path) \nGet the status of a filesystem.\nReturns a tuple with the filesystem information in the following order:\n\n\nf_bsize -- file system block size\nf_frsize -- fragment size\nf_blocks -- size of fs in f_frsize units\nf_bfree -- number of free blocks\nf_bavail -- number of free blocks for unprivileged users\nf_files -- number of inodes\nf_ffree -- number of free inodes\nf_favail -- number of free inodes for unprivileged users\nf_flag -- mount flags\nf_namemax -- maximum filename length\n\n\nParameters related to inodes: f_files, f_ffree, f_avail\nand the f_flags parameter may return 0 as they can be unavailable\nin a port-specific implementation.\n" ), _( - "os.statvfs(path) \nGet the status of a fileystem.\nReturns a tuple with the filesystem information in the following order:\n\n\nf_bsize -- file system block size\nf_frsize -- fragment size\nf_blocks -- size of fs in f_frsize units\nf_bfree -- number of free blocks\nf_bavail -- number of free blocks for unpriviliged users\nf_files -- number of inodes\nf_ffree -- number of free inodes\nf_favail -- number of free inodes for unpriviliged users\nf_flag -- mount flags\nf_namemax -- maximum filename length\n\n\nParameters related to inodes: f_files, f_ffree, f_avail\nand the f_flags parameter may return 0 as they can be unavailable\nin a port-specific implementation.\n" + "os.statvfs(path) \nGet the status of a filesystem.\nReturns a tuple with the filesystem information in the following order:\n\n\nf_bsize -- file system block size\nf_frsize -- fragment size\nf_blocks -- size of fs in f_frsize units\nf_bfree -- number of free blocks\nf_bavail -- number of free blocks for unprivileged users\nf_files -- number of inodes\nf_ffree -- number of free inodes\nf_favail -- number of free inodes for unprivileged users\nf_flag -- mount flags\nf_namemax -- maximum filename length\n\n\nParameters related to inodes: f_files, f_ffree, f_avail\nand the f_flags parameter may return 0 as they can be unavailable\nin a port-specific implementation.\n" ), _("os.sync() \nSync all filesystems.\n"), _("os.sync() \nSync all filesystems.\n"), @@ -548,7 +548,7 @@ "random.uniform(a, b) \nReturns a random float between a and b. It may or may not be inclusive\ndepending on float rounding.\n" ), _( - "rotaryio.IncrementalEncoder(pin_a, pin_b) \nCreate an IncrementalEncoder object associated with the given pins. It tracks the positional\nstate of an incremental rotary encoder (also known as a quadrature encoder.) Position is\nrelative to the position when the object is contructed.\n\n\nParameters:\npin_a (Pin) -- First pin to read pulses from.\npin_b (Pin) -- Second pin to read pulses from." + "rotaryio.IncrementalEncoder(pin_a, pin_b) \nCreate an IncrementalEncoder object associated with the given pins. It tracks the positional\nstate of an incremental rotary encoder (also known as a quadrature encoder.) Position is\nrelative to the position when the object is constructed.\n\n\nParameters:\npin_a (Pin) -- First pin to read pulses from.\npin_b (Pin) -- Second pin to read pulses from." ), _( "rotaryio.IncrementalEncoder.deinit() \nDeinitializes the IncrementalEncoder and releases any hardware resources for reuse.\n" diff --git a/mu/modes/api/esp.py b/mu/modes/api/esp.py index 610eb4341..aa0021b69 100644 --- a/mu/modes/api/esp.py +++ b/mu/modes/api/esp.py @@ -200,7 +200,7 @@ Create a list representing a strip of 'n' neopixels controlled from the specified pin (e.g. machine.Pin(0)). Use the resulting object to change each pixel by position (starting from 0). Individual pixels -are given RGB (red, green, blue) values between 0-255 as a tupel. For +are given RGB (red, green, blue) values between 0-255 as a tuple. For example, (255, 255, 255) is white: np = neopixel.NeoPixel(machine.Pin(0), 8)\nnp[0] = (255, 0, 128) diff --git a/mu/modes/api/flask.py b/mu/modes/api/flask.py index 50af0559f..39dd83446 100644 --- a/mu/modes/api/flask.py +++ b/mu/modes/api/flask.py @@ -1067,10 +1067,10 @@ "FlaskClient.session_transaction(*args, **kwargs) \nWhen used in combination with a with statement this opens a\nsession transaction. This can be used to modify the session that\nthe test client uses. Once the with block is left the session is\nstored back.\nwith client.session_transaction() as session:\n session['value'] = 42\n\n\nInternally this is implemented by going through a temporary test\nrequest context and since session handling could depend on\nrequest variables this function accepts the same arguments as\ntest_request_context() which are directly\npassed through.\n" ), _( - "FlaskGroup(add_default_commands=True, create_app=None, add_version_option=True, load_dotenv=True, **extra) \nSpecial subclass of the AppGroup group that supports\nloading more commands from the configured Flask app. Normally a\ndeveloper does not have to interface with this class but there are\nsome very advanced use cases for which it makes sense to create an\ninstance of this.\n\nFor information as of why this is useful see Custom Scripts.\n\n\nParameters:\nadd_default_commands -- if this is True then the default run and\nshell commands wil be added.\nadd_version_option -- adds the --version option.\ncreate_app -- an optional callback that is passed the script info and\nreturns the loaded app.\nload_dotenv -- Load the nearest .env and .flaskenv\nfiles to set environment variables. Will also change the working\ndirectory to the directory containing the first file found." + "FlaskGroup(add_default_commands=True, create_app=None, add_version_option=True, load_dotenv=True, **extra) \nSpecial subclass of the AppGroup group that supports\nloading more commands from the configured Flask app. Normally a\ndeveloper does not have to interface with this class but there are\nsome very advanced use cases for which it makes sense to create an\ninstance of this.\n\nFor information as of why this is useful see Custom Scripts.\n\n\nParameters:\nadd_default_commands -- if this is True then the default run and\nshell commands will be added.\nadd_version_option -- adds the --version option.\ncreate_app -- an optional callback that is passed the script info and\nreturns the loaded app.\nload_dotenv -- Load the nearest .env and .flaskenv\nfiles to set environment variables. Will also change the working\ndirectory to the directory containing the first file found." ), _( - "FlaskGroup(add_default_commands=True, create_app=None, add_version_option=True, load_dotenv=True, **extra) \nSpecial subclass of the AppGroup group that supports\nloading more commands from the configured Flask app. Normally a\ndeveloper does not have to interface with this class but there are\nsome very advanced use cases for which it makes sense to create an\ninstance of this.\n\nFor information as of why this is useful see Custom Scripts.\n\n\nParameters:\nadd_default_commands -- if this is True then the default run and\nshell commands wil be added.\nadd_version_option -- adds the --version option.\ncreate_app -- an optional callback that is passed the script info and\nreturns the loaded app.\nload_dotenv -- Load the nearest .env and .flaskenv\nfiles to set environment variables. Will also change the working\ndirectory to the directory containing the first file found." + "FlaskGroup(add_default_commands=True, create_app=None, add_version_option=True, load_dotenv=True, **extra) \nSpecial subclass of the AppGroup group that supports\nloading more commands from the configured Flask app. Normally a\ndeveloper does not have to interface with this class but there are\nsome very advanced use cases for which it makes sense to create an\ninstance of this.\n\nFor information as of why this is useful see Custom Scripts.\n\n\nParameters:\nadd_default_commands -- if this is True then the default run and\nshell commands will be added.\nadd_version_option -- adds the --version option.\ncreate_app -- an optional callback that is passed the script info and\nreturns the loaded app.\nload_dotenv -- Load the nearest .env and .flaskenv\nfiles to set environment variables. Will also change the working\ndirectory to the directory containing the first file found." ), _( "FlaskGroup.get_command(ctx, name) \nGiven a context and a command name, this returns a\nCommand object if it exists or returns None.\n" diff --git a/mu/modes/api/lego.py b/mu/modes/api/lego.py index 29de0bfeb..51d26704a 100644 --- a/mu/modes/api/lego.py +++ b/mu/modes/api/lego.py @@ -29,10 +29,10 @@ "battery.current() \nReturn the battery current consumption in mA. This is the current flowing from the battery.\n" ), _( - "battery.info() \nReturns a dict with the Battery subsystem information. Avoid calling\nthis function every time you need a specifc item. It’s better to save\nthe result in a local variable and then reference the dict elements as\nneeded:\n\nerror_state - A list of currently active errors incl. 0 (flipper.BATTERY_NO_ERROR) if no errors are active. Possible error are:\n\n\nbattery.BATTERY_NO_ERROR = 0\nbattery.BATTERY_HUB_TEMPERATURE_CRITICAL_OUT_OF_RANGE = -1\nbattery.BATTERY_TEMPERATURE_OUT_OF_RANGE = -2\nbattery.BATTERY_TEMPERATURE_SENSOR_FAIL = -3\nbattery.BATTERY_BAD_BATTERY = -4\nbattery.BATTERY_VOLTAGE_TOO_LOW = -5\n\n\n\ncharger_state - The state of the charter circuit:\n\n\nbattery.DISCHARGING = 0\nbattery.CHARGING_ONGOING = 1\nbattery.CHARGING_COMPLETED = 2\nbattery.FAIL = -1\n\n\n\ncharge_voltage - The battery volgate in mV\n\ncharge_voltage_filtered - The battery volgate (filtered) in mV\n\ntemperature - The battery temperature in degree Celcius.\n\ncharge_current - The battery charging current in mA (the current flowing into the battery)\n\n\nNote\nThe returned value is not calibrated.\n\n\n\nbattery_capacity_left - The battery capacity left in percent of full capacity\n\n\n" + "battery.info() \nReturns a dict with the Battery subsystem information. Avoid calling\nthis function every time you need a specific item. It’s better to save\nthe result in a local variable and then reference the dict elements as\nneeded:\n\nerror_state - A list of currently active errors incl. 0 (flipper.BATTERY_NO_ERROR) if no errors are active. Possible error are:\n\n\nbattery.BATTERY_NO_ERROR = 0\nbattery.BATTERY_HUB_TEMPERATURE_CRITICAL_OUT_OF_RANGE = -1\nbattery.BATTERY_TEMPERATURE_OUT_OF_RANGE = -2\nbattery.BATTERY_TEMPERATURE_SENSOR_FAIL = -3\nbattery.BATTERY_BAD_BATTERY = -4\nbattery.BATTERY_VOLTAGE_TOO_LOW = -5\n\n\n\ncharger_state - The state of the charter circuit:\n\n\nbattery.DISCHARGING = 0\nbattery.CHARGING_ONGOING = 1\nbattery.CHARGING_COMPLETED = 2\nbattery.FAIL = -1\n\n\n\ncharge_voltage - The battery volgate in mV\n\ncharge_voltage_filtered - The battery volgate (filtered) in mV\n\ntemperature - The battery temperature in degree Celsius.\n\ncharge_current - The battery charging current in mA (the current flowing into the battery)\n\n\nNote\nThe returned value is not calibrated.\n\n\n\nbattery_capacity_left - The battery capacity left in percent of full capacity\n\n\n" ), _( - "battery.temperature() \nReturn the battery temperature in degree Celcius.\n" + "battery.temperature() \nReturn the battery temperature in degree Celsius.\n" ), _("battery.voltage() \nReturn the battery voltage in millivolts.\n"), _("hub.BT_VCP() \nCreate a new BT_VCP object.\n\n"), @@ -95,7 +95,7 @@ "hub.MotorPair.secondary() \nReturns the motor object that was the parameter in the pair() operation.\n" ), _( - "hub.MotorPair.unpair() \nUndo a pair of two motors. After call of this method the object\nis invalid.\nThis method will return True if the uppair was successful. Otherwize False\nis returned (if a timeout has happend).\n" + "hub.MotorPair.unpair() \nUndo a pair of two motors. After call of this method the object\nis invalid.\nThis method will return True if the uppair was successful. Otherwise False\nis returned (if a timeout has happened).\n" ), _("hub.Sound() \nRepresents a sound generator.\n\n"), _( @@ -109,7 +109,7 @@ "hub.Sound.on() \nTurns on the internal amplifier chip. Default at power-up.\n" ), _( - "hub.Sound.play(filename, 12000-20000) \nPlay a sound file at the current volume. The filename must be specified, if\nthe file does not exist no sound is played.\nThe sound file must be raw 8 bit data at 16 kHz, and the second optional\nparameter specifies the playback speed. Currently the range is 12-20 kHz\nbut we may chnage that to +/- 10 or some other reasonable value.\n" + "hub.Sound.play(filename, 12000-20000) \nPlay a sound file at the current volume. The filename must be specified, if\nthe file does not exist no sound is played.\nThe sound file must be raw 8 bit data at 16 kHz, and the second optional\nparameter specifies the playback speed. Currently the range is 12-20 kHz\nbut we may change that to +/- 10 or some other reasonable value.\n" ), _( "hub.Sound.volume(0-10) \nGet or set the volume of the sound system\n\nWith no argument, return 0-10 depending on the current volume\nWith volume given, set the volume of the sound system\n\n" @@ -127,7 +127,7 @@ "port.X.device() \nRepresents the set of methods that can be called on a device plugged\ninto any of the 6 ports on the Hub.\n\n" ), _( - "port.X.device.get() \nReturns a list of value(s) that the currently active device mode makes\navailable. A device can be in single or combi-mode. In either case\nthe return value is a list of one or more values representing the\ndata described in the corresponing mode command.\nThere are 3 different formats available:\n\n\n0 = Raw\n1 = Pct\n2 = SI\n\n\n" + "port.X.device.get() \nReturns a list of value(s) that the currently active device mode makes\navailable. A device can be in single or combi-mode. In either case\nthe return value is a list of one or more values representing the\ndata described in the corresponding mode command.\nThere are 3 different formats available:\n\n\n0 = Raw\n1 = Pct\n2 = SI\n\n\n" ), _( "port.X.device.mode() \nPuts the device in the specified mode(s) depending on the specified \nmode value(s).\nIf the mode specifier is an integer, then the device is put into that mode.\nThe data returned by get() is one or more values corresponding to the\nnumber of datasets available in that mode. For example, a color sensor in\nindex color mode returns exactly one value, but in RGB mode a list of three\nvalues is returned.\nIf the mode specifier is a list, then we are asking for the device to be put\ninto combi-mode. The get() function now returns exactly the values corresponding\nto the requested modes and the datasets within that mode.\n\nNote\nThe mode specifier must be a list of 2-element tuples. If one of the list\nelements is not a 2-element tuple then it is ignored without error or warning.\n\nIf the mode specifier is an integer and it is followed by an argument that contains\na byte array - this array will be sent to the device as an output mode write\n" @@ -136,7 +136,7 @@ "port.X.device.pwm(value) \nKeyword arguments:\n\nvalue [-100 - 100] Applies a PWM signal to the power pins of the port.\n\nUseful for controlling directly. The polarity of the PWM signal matches the\nsign of the value.\nA value of zero stops the PWM signal and leaves the port driver in\nthe floating state.\n" ), _( - "port.X.info() \nReturns a dictionary describing the capabilities of the device connected\nto the port. If a port has nothing plugged in, then the result is a\ndictionary with only a type key with a value of None.\nA port with a PoweredUp compatible device plugged in returns a dictionary\nlike this:\n\nfw_version : Firmware version as a 32 bit unsigned integer\nhw_version : Hardware version as a 32 bit unsigned integer\ntype : PoweredUp device type as an integer\ncombi_modes : A list of legal combi-modes as 16 bit unsigend integers\nspeed : The maximum baud rate of the device (0 for simple IDs)\nmodes : A list of dictionaries representing available modes\n\nEach modes list item dictionary has the following keys:\n\nname : The name of the mode as a string\ncapability : The 48 capability bits as a binary string of 6 characters\nsymbol : The SI ymbol name of the data returned by the device in SI format\nraw : The min and max range of raw data expressed as a 2 element tuple\npct : The min and max range of % range data expressed as a 2 element tuple\nsi : The min and max range of si data expressed as a 2 element tuple\nmap_out : The output mapping bits as an 8 bit value\nmap_in : The infou mapping bits as an 8 bit value\nformat : A dictionary representing the format data for this mode\n\nEach format dictionary has the following keys:\n\ndatasets : The number of data values that this mode returns\nfigures : The number of digits in the data value\ndecimals : The number of digits after the implied decimal point\ntype : The type of return data (signed 8, 16, 32 or float)\n\n" + "port.X.info() \nReturns a dictionary describing the capabilities of the device connected\nto the port. If a port has nothing plugged in, then the result is a\ndictionary with only a type key with a value of None.\nA port with a PoweredUp compatible device plugged in returns a dictionary\nlike this:\n\nfw_version : Firmware version as a 32 bit unsigned integer\nhw_version : Hardware version as a 32 bit unsigned integer\ntype : PoweredUp device type as an integer\ncombi_modes : A list of legal combi-modes as 16 bit unsigned integers\nspeed : The maximum baud rate of the device (0 for simple IDs)\nmodes : A list of dictionaries representing available modes\n\nEach modes list item dictionary has the following keys:\n\nname : The name of the mode as a string\ncapability : The 48 capability bits as a binary string of 6 characters\nsymbol : The SI symbol name of the data returned by the device in SI format\nraw : The min and max range of raw data expressed as a 2 element tuple\npct : The min and max range of % range data expressed as a 2 element tuple\nsi : The min and max range of si data expressed as a 2 element tuple\nmap_out : The output mapping bits as an 8 bit value\nmap_in : The infou mapping bits as an 8 bit value\nformat : A dictionary representing the format data for this mode\n\nEach format dictionary has the following keys:\n\ndatasets : The number of data values that this mode returns\nfigures : The number of digits in the data value\ndecimals : The number of digits after the implied decimal point\ntype : The type of return data (signed 8, 16, 32 or float)\n\n" ), _("port.X.mode(mode) \nSet the mode of the port.\n"), _( @@ -167,7 +167,7 @@ "port.X.motor.mode(value) \nPuts the device in the specified mode.\n\nNote\nSee the detailed explanation in the port.X.device section\n\n" ), _( - "port.X.motor.pair(motor) \nCreate a object. The motor parameter must be motor object\nand cannot be the motor object that the pair() method is called on.\nIf the object cannot be created due to a timeout False is returned.\nIt the object could not be created due to another fault None is retuned.\nSee the MotorPair API for methods that can be applied to a motor pair.\n" + "port.X.motor.pair(motor) \nCreate a object. The motor parameter must be motor object\nand cannot be the motor object that the pair() method is called on.\nIf the object cannot be created due to a timeout False is returned.\nIt the object could not be created due to another fault None is returned.\nSee the MotorPair API for methods that can be applied to a motor pair.\n" ), _( "port.X.motor.pid() \nWith no parameters returns a tuple with the current used P, I and D values\nif the values have been set using this function or motor.default(). If not\nset the values returned is 0 (zero) and is invalid.\n\nNote\nAt the moment it is not possible to readout the default PID values used\nin the low-level drivers. To do this it is required to implement additional\nsub-commands in the LPF2 protocol.\n\n" diff --git a/mu/modes/api/microbit.py b/mu/modes/api/microbit.py index 646faaa39..f89a04418 100644 --- a/mu/modes/api/microbit.py +++ b/mu/modes/api/microbit.py @@ -69,7 +69,7 @@ "microbit.running_time() \nReturn running_time() in milliseconds since micro:bit's last reset." ), _( - "microbit.temperature() \nReturn micro:bit's temperature in degrees Celcius." + "microbit.temperature() \nReturn micro:bit's temperature in degrees Celsius." ), # Accelerometer 3D orientation _( @@ -357,7 +357,7 @@ "microbit.i2c.read(address, n, repeat=False) \nUse read(address, n) to read 'n' bytes from the device with the 7-bit address.\nIf repeat is True, no stop bit will be sent." ), _( - "microbit.i2c.write(adress, buffer, repeat=False) \nUse write(address, buffer) to write to the 'buffer' of the device at the 7-bit 'address'.\nIf repeat is True, no stop bit will be sent." + "microbit.i2c.write(address, buffer, repeat=False) \nUse write(address, buffer) to write to the 'buffer' of the device at the 7-bit 'address'.\nIf repeat is True, no stop bit will be sent." ), _( "microbit.i2c.init(frequency, scl, sda) \nUse init(frequency, scl, sda) to set the bus frequency and pins." diff --git a/mu/modes/api/pi.py b/mu/modes/api/pi.py index eb41f99b9..63d47256e 100644 --- a/mu/modes/api/pi.py +++ b/mu/modes/api/pi.py @@ -341,13 +341,13 @@ "picamera.CircularIO(size) \nA thread-safe stream which uses a ring buffer for storage.\n\nCircularIO provides an in-memory stream similar to the :class:`io.BytesIO`\nclass. However, unlike :class:`io.BytesIO` its underlying storage is a\n`ring buffer`_ with a fixed maximum size. Once the maximum size is reached,\nwriting effectively loops round to the beginning to the ring and starts\noverwriting the oldest content.\n\nThe *size* parameter specifies the maximum size of the stream in bytes. The\n:meth:`read`, :meth:`tell`, and :meth:`seek` methods all operate\nequivalently to those in :class:`io.BytesIO` whilst :meth:`write` only\ndiffers in the wrapping behaviour described above. A :meth:`read1` method\nis also provided for efficient reading of the underlying ring buffer in\nwrite-sized chunks (or less).\n\nA re-entrant threading lock guards all operations, and is accessible for\nexternal use via the :attr:`lock` attribute.\n\nThe performance of the class is geared toward faster writing than reading\non the assumption that writing will be the common operation and reading the\nrare operation (a reasonable assumption for the camera use-case, but not\nnecessarily for more general usage).\n\n.. _ring buffer: https://en.wikipedia.org/wiki/Circular_buffer" ), _( - 'picamera.Color(*args, **kwargs) \nThe Color class is a tuple which represents a color as red, green, and\nblue components.\n\nThe class has a flexible constructor which allows you to create an instance\nfrom a variety of color systems including `RGB`_, `Y\'UV`_, `Y\'IQ`_, `HLS`_,\nand `HSV`_. There are also explicit constructors for each of these systems\nto allow you to force the use of a system in your code. For example, an\ninstance of :class:`Color` can be constructed in any of the following\nways::\n\n >>> Color(\'#f00\')\n \n >>> Color(\'green\')\n \n >>> Color(0, 0, 1)\n \n >>> Color(hue=0, saturation=1, value=0.5)\n \n >>> Color(y=0.4, u=-0.05, v=0.615)\n \n\nThe specific forms that the default constructor will accept are enumerated\nbelow:\n\n.. tabularcolumns:: |p{40mm}|p{100mm}|\n\n+------------------------------+------------------------------------------+\n| Style | Description |\n+==============================+==========================================+\n| Single positional parameter | Equivalent to calling |\n| | :meth:`Color.from_string`. |\n+------------------------------+------------------------------------------+\n| Three positional parameters | Equivalent to calling |\n| | :meth:`Color.from_rgb` if all three |\n| | parameters are between 0.0 and 1.0, or |\n| | :meth:`Color.from_rgb_bytes` otherwise. |\n+------------------------------+ |\n| Three named parameters: | |\n| *r*, *g*, *b* | |\n+------------------------------+ |\n| Three named parameters: | |\n| *red*, *green*, *blue* | |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *y*, *u*, *v* | :meth:`Color.from_yuv` if *y* is between |\n| | 0.0 and 1.0, *u* is between -0.436 and |\n| | 0.436, and *v* is between -0.615 and |\n| | 0.615, or :meth:`Color.from_yuv_bytes` |\n| | otherwise. |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *y*, *i*, *q* | :meth:`Color.from_yiq`. |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *h*, *l*, *s* | :meth:`Color.from_hls`. |\n+------------------------------+ |\n| Three named parameters: | |\n| *hue*, *lightness*, | |\n| *saturation* | |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *h*, *s*, *v* | :meth:`Color.from_hsv` |\n+------------------------------+ |\n| Three named parameters: | |\n| *hue*, *saturation*, *value* | |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *x*, *y*, *z* | :meth:`Color.from_cie_xyz` |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *l*, *a*, *b* | :meth:`Color.from_cie_lab` |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *l*, *u*, *v* | :meth:`Color.from_cie_luv` |\n+------------------------------+------------------------------------------+\n\nIf the constructor parameters do not conform to any of the variants in the\ntable above, a :exc:`ValueError` will be thrown.\n\nInternally, the color is *always* represented as 3 float values\ncorresponding to the red, green, and blue components of the color. These\nvalues take a value from 0.0 to 1.0 (least to full intensity). The class\nprovides several attributes which can be used to convert one color system\ninto another::\n\n >>> Color(\'#f00\').hls\n (0.0, 0.5, 1.0)\n >>> Color.from_string(\'green\').hue\n Hue(deg=120.0)\n >>> Color.from_rgb_bytes(0, 0, 255).yuv\n (0.114, 0.435912, -0.099978)\n\nAs :class:`Color` derives from tuple, instances are immutable. While this\nprovides the advantage that they can be used as keys in a dict, it does\nmean that colors themselves cannot be directly manipulated (e.g. by\nreducing the red component).\n\nHowever, several auxilliary classes in the module provide the ability to\nperform simple transformations of colors via operators which produce a new\n:class:`Color` instance. For example::\n\n >>> Color(\'red\') - Red(0.5)\n \n >>> Color(\'green\') + Red(0.5)\n \n >>> Color.from_hls(0.5, 0.5, 1.0)\n \n >>> Color.from_hls(0.5, 0.5, 1.0) * Lightness(0.8)\n \n >>> (Color.from_hls(0.5, 0.5, 1.0) * Lightness(0.8)).hls\n (0.5, 0.4, 1.0)\n\nFrom the last example above one can see that even attributes not directly\nstored by the color (such as lightness) can be manipulated in this fashion.\nIn this case a :class:`Color` instance is constructed from HLS (hue,\nlightness, saturation) values with a lightness of 0.5. This is multiplied\nby a :class:`Lightness` instance with a value of 0.8 which constructs a new\n:class:`Color` with the same hue and saturation, but a lightness of 0.5 *\n0.8 = 0.4.\n\nIf an instance is converted to a string (with :func:`str`) it will return a\nstring containing the 7-character HTML code for the color (e.g. "#ff0000"\nfor red). As can be seen in the examples above, a similar representation is\nreturned for :func:`repr`.\n\n.. _RGB: https://en.wikipedia.org/wiki/RGB_color_space\n.. _Y\'UV: https://en.wikipedia.org/wiki/YUV\n.. _Y\'IQ: https://en.wikipedia.org/wiki/YIQ\n.. _HLS: https://en.wikipedia.org/wiki/HSL_and_HSV\n.. _HSV: https://en.wikipedia.org/wiki/HSL_and_HSV' + 'picamera.Color(*args, **kwargs) \nThe Color class is a tuple which represents a color as red, green, and\nblue components.\n\nThe class has a flexible constructor which allows you to create an instance\nfrom a variety of color systems including `RGB`_, `Y\'UV`_, `Y\'IQ`_, `HLS`_,\nand `HSV`_. There are also explicit constructors for each of these systems\nto allow you to force the use of a system in your code. For example, an\ninstance of :class:`Color` can be constructed in any of the following\nways::\n\n >>> Color(\'#f00\')\n \n >>> Color(\'green\')\n \n >>> Color(0, 0, 1)\n \n >>> Color(hue=0, saturation=1, value=0.5)\n \n >>> Color(y=0.4, u=-0.05, v=0.615)\n \n\nThe specific forms that the default constructor will accept are enumerated\nbelow:\n\n.. tabularcolumns:: |p{40mm}|p{100mm}|\n\n+------------------------------+------------------------------------------+\n| Style | Description |\n+==============================+==========================================+\n| Single positional parameter | Equivalent to calling |\n| | :meth:`Color.from_string`. |\n+------------------------------+------------------------------------------+\n| Three positional parameters | Equivalent to calling |\n| | :meth:`Color.from_rgb` if all three |\n| | parameters are between 0.0 and 1.0, or |\n| | :meth:`Color.from_rgb_bytes` otherwise. |\n+------------------------------+ |\n| Three named parameters: | |\n| *r*, *g*, *b* | |\n+------------------------------+ |\n| Three named parameters: | |\n| *red*, *green*, *blue* | |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *y*, *u*, *v* | :meth:`Color.from_yuv` if *y* is between |\n| | 0.0 and 1.0, *u* is between -0.436 and |\n| | 0.436, and *v* is between -0.615 and |\n| | 0.615, or :meth:`Color.from_yuv_bytes` |\n| | otherwise. |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *y*, *i*, *q* | :meth:`Color.from_yiq`. |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *h*, *l*, *s* | :meth:`Color.from_hls`. |\n+------------------------------+ |\n| Three named parameters: | |\n| *hue*, *lightness*, | |\n| *saturation* | |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *h*, *s*, *v* | :meth:`Color.from_hsv` |\n+------------------------------+ |\n| Three named parameters: | |\n| *hue*, *saturation*, *value* | |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *x*, *y*, *z* | :meth:`Color.from_cie_xyz` |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *l*, *a*, *b* | :meth:`Color.from_cie_lab` |\n+------------------------------+------------------------------------------+\n| Three named parameters: | Equivalent to calling |\n| *l*, *u*, *v* | :meth:`Color.from_cie_luv` |\n+------------------------------+------------------------------------------+\n\nIf the constructor parameters do not conform to any of the variants in the\ntable above, a :exc:`ValueError` will be thrown.\n\nInternally, the color is *always* represented as 3 float values\ncorresponding to the red, green, and blue components of the color. These\nvalues take a value from 0.0 to 1.0 (least to full intensity). The class\nprovides several attributes which can be used to convert one color system\ninto another::\n\n >>> Color(\'#f00\').hls\n (0.0, 0.5, 1.0)\n >>> Color.from_string(\'green\').hue\n Hue(deg=120.0)\n >>> Color.from_rgb_bytes(0, 0, 255).yuv\n (0.114, 0.435912, -0.099978)\n\nAs :class:`Color` derives from tuple, instances are immutable. While this\nprovides the advantage that they can be used as keys in a dict, it does\nmean that colors themselves cannot be directly manipulated (e.g. by\nreducing the red component).\n\nHowever, several auxiliary classes in the module provide the ability to\nperform simple transformations of colors via operators which produce a new\n:class:`Color` instance. For example::\n\n >>> Color(\'red\') - Red(0.5)\n \n >>> Color(\'green\') + Red(0.5)\n \n >>> Color.from_hls(0.5, 0.5, 1.0)\n \n >>> Color.from_hls(0.5, 0.5, 1.0) * Lightness(0.8)\n \n >>> (Color.from_hls(0.5, 0.5, 1.0) * Lightness(0.8)).hls\n (0.5, 0.4, 1.0)\n\nFrom the last example above one can see that even attributes not directly\nstored by the color (such as lightness) can be manipulated in this fashion.\nIn this case a :class:`Color` instance is constructed from HLS (hue,\nlightness, saturation) values with a lightness of 0.5. This is multiplied\nby a :class:`Lightness` instance with a value of 0.8 which constructs a new\n:class:`Color` with the same hue and saturation, but a lightness of 0.5 *\n0.8 = 0.4.\n\nIf an instance is converted to a string (with :func:`str`) it will return a\nstring containing the 7-character HTML code for the color (e.g. "#ff0000"\nfor red). As can be seen in the examples above, a similar representation is\nreturned for :func:`repr`.\n\n.. _RGB: https://en.wikipedia.org/wiki/RGB_color_space\n.. _Y\'UV: https://en.wikipedia.org/wiki/YUV\n.. _Y\'IQ: https://en.wikipedia.org/wiki/YIQ\n.. _HLS: https://en.wikipedia.org/wiki/HSL_and_HSV\n.. _HSV: https://en.wikipedia.org/wiki/HSL_and_HSV' ), _( 'picamera.Green() \nRepresents the green component of a :class:`Color` for use in\ntransformations. Instances of this class can be constructed directly with\na float value, or by querying the :attr:`Color.green` attribute. Addition,\nsubtraction, and multiplication are supported with :class:`Color`\ninstances. For example::\n\n >>> Color(0, 0, 0) + Green(0.1)\n \n >>> Color.from_yuv(1, -0.4, -0.6) - Green(1)\n \n >>> (Green(0.5) * Color(\'white\')).rgb\n (Red(1.0), Green(0.5), Blue(1.0))' ), _( - "picamera.Hue(n=None, deg=None, rad=None) \nRepresents the hue of a :class:`Color` for use in transformations.\nInstances of this class can be constructed directly with a float value in\nthe range [0.0, 1.0) representing an angle around the `HSL hue wheel`_. As\nthis is a circular mapping, 0.0 and 1.0 effectively mean the same thing,\ni.e. out of range values will be normalized into the range [0.0, 1.0).\n\nThe class can also be constructed with the keyword arguments ``deg`` or\n``rad`` if you wish to specify the hue value in degrees or radians instead,\nrespectively. Instances can also be constructed by querying the\n:attr:`Color.hue` attribute.\n\nAddition, subtraction, and multiplication are supported with :class:`Color`\ninstances. For example::\n\n >>> Color(1, 0, 0).hls\n (0.0, 0.5, 1.0)\n >>> (Color(1, 0, 0) + Hue(deg=180)).hls\n (0.5, 0.5, 1.0)\n\nNote that whilst multiplication by a :class:`Hue` doesn't make much sense,\nit is still supported. However, the circular nature of a hue value can lead\nto suprising effects. In particular, since 1.0 is equivalent to 0.0 the\nfollowing may be observed::\n\n >>> (Hue(1.0) * Color.from_hls(0.5, 0.5, 1.0)).hls\n (0.0, 0.5, 1.0)\n\n.. _HSL hue wheel: https://en.wikipedia.org/wiki/Hue" + "picamera.Hue(n=None, deg=None, rad=None) \nRepresents the hue of a :class:`Color` for use in transformations.\nInstances of this class can be constructed directly with a float value in\nthe range [0.0, 1.0) representing an angle around the `HSL hue wheel`_. As\nthis is a circular mapping, 0.0 and 1.0 effectively mean the same thing,\ni.e. out of range values will be normalized into the range [0.0, 1.0).\n\nThe class can also be constructed with the keyword arguments ``deg`` or\n``rad`` if you wish to specify the hue value in degrees or radians instead,\nrespectively. Instances can also be constructed by querying the\n:attr:`Color.hue` attribute.\n\nAddition, subtraction, and multiplication are supported with :class:`Color`\ninstances. For example::\n\n >>> Color(1, 0, 0).hls\n (0.0, 0.5, 1.0)\n >>> (Color(1, 0, 0) + Hue(deg=180)).hls\n (0.5, 0.5, 1.0)\n\nNote that whilst multiplication by a :class:`Hue` doesn't make much sense,\nit is still supported. However, the circular nature of a hue value can lead\nto surprising effects. In particular, since 1.0 is equivalent to 0.0 the\nfollowing may be observed::\n\n >>> (Hue(1.0) * Color.from_hls(0.5, 0.5, 1.0)).hls\n (0.0, 0.5, 1.0)\n\n.. _HSL hue wheel: https://en.wikipedia.org/wiki/Hue" ), _( 'picamera.Lightness() \nRepresents the lightness of a :class:`Color` for use in transformations.\nInstances of this class can be constructed directly with a float value, or\nby querying the :attr:`Color.lightness` attribute. Addition, subtraction,\nand multiplication are supported with :class:`Color` instances. For\nexample::\n\n >>> Color(0, 0, 0) + Lightness(0.1)\n \n >>> Color.from_rgb_bytes(0x80, 0x80, 0) - Lightness(0.2)\n \n >>> Lightness(0.9) * Color(\'wheat\')\n ' diff --git a/mu/modes/api/pyboard.py b/mu/modes/api/pyboard.py index a5cabfd6c..458f882d1 100644 --- a/mu/modes/api/pyboard.py +++ b/mu/modes/api/pyboard.py @@ -46,7 +46,7 @@ ), _("pyb.bootloader() \nActivate the bootloader without BOOT* pins.\n"), _( - "pyb.fault_debug(valus) \nEnable or disable hard-fault debugging.\nA hard-fault is when there is a fatal error in the underlying system, like an\ninvalid memory access.\n\nParameters:\nvalue (bool) -- \n\nFalse: board will automatically reset if there is a hard fault\nTrue: when the board has a hard fault, it will print the registers and the stack\n\ttrace, and then cycle the LEDs indefinitely\n" + "pyb.fault_debug(value) \nEnable or disable hard-fault debugging.\nA hard-fault is when there is a fatal error in the underlying system, like an\ninvalid memory access.\n\nParameters:\nvalue (bool) -- \n\nFalse: board will automatically reset if there is a hard fault\nTrue: when the board has a hard fault, it will print the registers and the stack\n\ttrace, and then cycle the LEDs indefinitely\n" ), _( "pyb.disable_irq() \nDisable interrupt requests.\n\nReturns: Previous IRQ state.\n\nReturn type: bool\n" @@ -157,7 +157,7 @@ "pyb.DAC.write(value) \nDirect access to the DAC output. The minimum value is 0. The maximum value is 2**bits-1.\n\nParameters: value (int) -- the value to write to the DAC\n" ), _( - "pyb.DAC.write_timed(data, freq, *, mode=DAC.NORMAL) \nInitiates a burst of RAM to DAC using a DMA transfer. The input data is treated\nas an array of bytes in 8-bit mode, and an array of unsigned half-words\n(array typecode ‘H’) in 12-bit mode.\n\nParameters:\ndata (array) -- data to be written to the DAC.\nfreq (int or Timer) -- frequency or Timer to determin how often to trigger DAC sample\nmode (constant) -- can be DAC.NORMAL or DAC.CIRCULAR." + "pyb.DAC.write_timed(data, freq, *, mode=DAC.NORMAL) \nInitiates a burst of RAM to DAC using a DMA transfer. The input data is treated\nas an array of bytes in 8-bit mode, and an array of unsigned half-words\n(array typecode ‘H’) in 12-bit mode.\n\nParameters:\ndata (array) -- data to be written to the DAC.\nfreq (int or Timer) -- frequency or Timer to determine how often to trigger DAC sample\nmode (constant) -- can be DAC.NORMAL or DAC.CIRCULAR." ), _( "pyb.ExtInt(pin, mode, pull, callback) \nCreate an ExtInt object.\n\nParameters:\npin (pyb.Pin) -- the pin on which to enable the interrupt.\nmode (constant) can be one of: ExtInt.IRQ_RISING - trigger on a rising edge;\nExtInt.IRQ_FALLING - trigger on a falling edge; ExtInt.IRQ_RISING_FALLING - trigger\non a rising or falling edge.\npull (constant) -- can be one of: - pyb.Pin.PULL_NONE - no pull up or down\nresistors; pyb.Pin.PULL_UP - enable the pull-up resistor;\npyb.Pin.PULL_DOWN - enable the pull-down resistor.\ncallback (function) -- the function to call when the interrupt triggers. The\ncallback function must accept exactly 1 argument, which is the line that triggered the interrupt.\n" diff --git a/mu/modes/api/python3.py b/mu/modes/api/python3.py index 01a924ed8..a03503e69 100644 --- a/mu/modes/api/python3.py +++ b/mu/modes/api/python3.py @@ -752,7 +752,7 @@ ), _("os.putenv(name, value, /) \nChange or add an environment variable."), _( - "os.pwrite(fd, buffer, offset, /) \nWrite bytes to a file descriptor starting at a particular offset.\n\nWrite buffer to fd, starting at offset bytes from the beginning of\nthe file. Returns the number of bytes writte. Does not change the\ncurrent file offset." + "os.pwrite(fd, buffer, offset, /) \nWrite bytes to a file descriptor starting at a particular offset.\n\nWrite buffer to fd, starting at offset bytes from the beginning of\nthe file. Returns the number of bytes written. Does not change the\ncurrent file offset." ), _( "os.read(fd, length, /) \nRead from a file descriptor. Returns a bytes object." @@ -1419,7 +1419,7 @@ "turtle.clone() \nCreate and return a clone of the \n\nNo argument.\n\nCreate and return a clone of the turtle with same position, heading\nand turtle properties.\n\nExample (for a Turtle instance named mick):\nmick = Turtle()\njoe = mick.clone()" ), _( - "turtle.color(*args) \nReturn or set the pencolor and fillcolor.\n\nArguments:\nSeveral input formats are allowed.\nThey use 0, 1, 2, or 3 arguments as follows:\n\ncolor()\n Return the current pencolor and the current fillcolor\n as a pair of color specification strings as are returned\n by pencolor and fillcolor.\ncolor(colorstring), color((r,g,b)), color(r,g,b)\n inputs as in pencolor, set both, fillcolor and pencolor,\n to the given value.\ncolor(colorstring1, colorstring2),\ncolor((r1,g1,b1), (r2,g2,b2))\n equivalent to pencolor(colorstring1) and fillcolor(colorstring2)\n and analogously, if the other input format is used.\n\nIf turtleshape is a polygon, outline and interior of that polygon\nis drawn with the newly set colors.\nFor mor info see: pencolor, fillcolor\n\nExample:\n>>> color('red', 'green')\n>>> color()\n('red', 'green')\n>>> colormode(255)\n>>> color((40, 80, 120), (160, 200, 240))\n>>> color()\n('#285078', '#a0c8f0')" + "turtle.color(*args) \nReturn or set the pencolor and fillcolor.\n\nArguments:\nSeveral input formats are allowed.\nThey use 0, 1, 2, or 3 arguments as follows:\n\ncolor()\n Return the current pencolor and the current fillcolor\n as a pair of color specification strings as are returned\n by pencolor and fillcolor.\ncolor(colorstring), color((r,g,b)), color(r,g,b)\n inputs as in pencolor, set both, fillcolor and pencolor,\n to the given value.\ncolor(colorstring1, colorstring2),\ncolor((r1,g1,b1), (r2,g2,b2))\n equivalent to pencolor(colorstring1) and fillcolor(colorstring2)\n and analogously, if the other input format is used.\n\nIf turtleshape is a polygon, outline and interior of that polygon\nis drawn with the newly set colors.\nFor more info see: pencolor, fillcolor\n\nExample:\n>>> color('red', 'green')\n>>> color()\n('red', 'green')\n>>> colormode(255)\n>>> color((40, 80, 120), (160, 200, 240))\n>>> color()\n('#285078', '#a0c8f0')" ), _( "turtle.colormode(cmode=None) \nReturn the colormode or set it to 1.0 or 255.\n\nOptional argument:\ncmode -- one of the values 1.0 or 255\n\nr, g, b values of colortriples have to be in range 0..cmode.\n\nExample:\n>>> colormode()\n1.0\n>>> colormode(255)\n>>> pencolor(240,160,80)" @@ -1431,7 +1431,7 @@ "turtle.deepcopy(x, memo=None, _nil=[]) \nDeep copy operation on arbitrary Python objects.\n\nSee the module's __doc__ string for more info." ), _( - "turtle.degrees(fullcircle=360.0) \nSet angle measurement units to degrees.\n\nOptional argument:\nfullcircle - a number\n\nSet angle measurement units, i. e. set number\nof 'degrees' for a full circle. Dafault value is\n360 degrees.\n\nExample:\n>>> left(90)\n>>> heading()\n90\n\nChange angle measurement unit to grad (also known as gon,\ngrade, or gradian and equals 1/100-th of the right angle.)\n>>> degrees(400.0)\n>>> heading()\n100" + "turtle.degrees(fullcircle=360.0) \nSet angle measurement units to degrees.\n\nOptional argument:\nfullcircle - a number\n\nSet angle measurement units, i. e. set number\nof 'degrees' for a full circle. Default value is\n360 degrees.\n\nExample:\n>>> left(90)\n>>> heading()\n90\n\nChange angle measurement unit to grad (also known as gon,\ngrade, or gradian and equals 1/100-th of the right angle.)\n>>> degrees(400.0)\n>>> heading()\n100" ), _( "turtle.delay(delay=None) \nReturn or set the drawing delay in milliseconds.\n\nOptional argument:\ndelay -- positive integer\n\nExample:\n>>> delay(15)\n>>> delay()\n15" @@ -1540,7 +1540,7 @@ "turtle.mode(mode=None) \nSet turtle-mode ('standard', 'logo' or 'world') and perform reset.\n\nOptional argument:\nmode -- one of the strings 'standard', 'logo' or 'world'\n\nMode 'standard' is compatible with turtle.py.\nMode 'logo' is compatible with most Logo-Turtle-Graphics.\nMode 'world' uses userdefined 'worldcoordinates'. *Attention*: in\nthis mode angles appear distorted if x/y unit-ratio doesn't equal 1.\nIf mode is not given, return the current mode.\n\n Mode Initial turtle heading positive angles\n ------------|-------------------------|-------------------\n 'standard' to the right (east) counterclockwise\n 'logo' upward (north) clockwise\n\nExamples:\n>>> mode('logo') # resets turtle heading to north\n>>> mode()\n'logo'" ), _( - 'turtle.numinput(title, prompt, default=None, minval=None, maxval=None) \nPop up a dialog window for input of a number.\n\nArguments: title is the title of the dialog window,\nprompt is a text mostly describing what numerical information to input.\ndefault: default value\nminval: minimum value for imput\nmaxval: maximum value for input\n\nThe number input must be in the range minval .. maxval if these are\ngiven. If not, a hint is issued and the dialog remains open for\ncorrection. Return the number input.\nIf the dialog is canceled, return None.\n\nExample:\n>>> numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000)' + 'turtle.numinput(title, prompt, default=None, minval=None, maxval=None) \nPop up a dialog window for input of a number.\n\nArguments: title is the title of the dialog window,\nprompt is a text mostly describing what numerical information to input.\ndefault: default value\nminval: minimum value for input\nmaxval: maximum value for input\n\nThe number input must be in the range minval .. maxval if these are\ngiven. If not, a hint is issued and the dialog remains open for\ncorrection. Return the number input.\nIf the dialog is canceled, return None.\n\nExample:\n>>> numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000)' ), _( "turtle.onclick(fun, btn=1, add=None) \nBind fun to mouse-click event on this turtle on canvas.\n\nArguments:\nfun -- a function with two arguments, to which will be assigned\n the coordinates of the clicked point on the canvas.\nnum -- number of the mouse-button defaults to 1 (left mouse button).\nadd -- True or False. If True, new binding will be added, otherwise\n it will replace a former binding.\n\nExample for the anonymous turtle, i. e. the procedural way:\n\n>>> def turn(x, y):\n... left(360)\n...\n>>> onclick(turn) # Now clicking into the turtle will turn it.\n>>> onclick(None) # event-binding will be removed" @@ -1742,7 +1742,7 @@ 'turtle.write(arg, move=False, align=\'left\', font=\'Arial\', 8, \'normal\') \nWrite text at the current turtle position.\n\nArguments:\narg -- info, which is to be written to the TurtleScreen\nmove (optional) -- True/False\nalign (optional) -- one of the strings "left", "center" or right"\nfont (optional) -- a triple (fontname, fontsize, fonttype)\n\nWrite text - the string representation of arg - at the current\nturtle position according to align ("left", "center" or right")\nand with the given font.\nIf move is True, the pen is moved to the bottom-right corner\nof the text. By default, move is False.\n\nExample:\n>>> write(\'Home = \', True, align="center")\n>>> write((0,0), True)' ), _( - "turtle.write_docstringdict(filename='turtle_docstringdict') \nCreate and write docstring-dictionary to file.\n\nOptional argument:\nfilename -- a string, used as filename\n default value is turtle_docstringdict\n\nHas to be called explicitly, (not used by the turtle-graphics classes)\nThe docstring dictionary will be written to the Python script .py\nIt is intended to serve as a template for translation of the docstrings\ninto different languages." + "turtle.write_docstringdict(filename='turtle_docstringdict') \nCreate and write docstring-dictionary to file.\n\nOptional argument:\nfilename -- a string, used as filename\n default value is turtle_docstringdict\n\nHas to be called explicitly, (not used by the turtle-graphics classes)\nThe docstring dictionary will be written to the Python script .py\nIt is intended to serve as a template for translation of the docstrings\ninto different languages." ), _( "turtle.xcor() \nReturn the turtle's x coordinate.\n\nNo arguments.\n\nExample:\n>>> reset()\n>>> left(60)\n>>> forward(100)\n>>> print xcor()\n50.0" diff --git a/mu/modes/api/shared.py b/mu/modes/api/shared.py index 34872ee60..2d0367ab0 100644 --- a/mu/modes/api/shared.py +++ b/mu/modes/api/shared.py @@ -57,7 +57,7 @@ "format(*args, **kwargs) \nPerform a string formatting operation. The string on which this method is called\ncan contain literal text or replacement fields delimited by braces {}. Each\nreplacement field contains either the numeric index of a positional argument,\nor the name of a keyword argument.\nReturns a copy of the string where each replacement field is replaced with the\nstring value of the corresponding argument." ), _( - "replace(old, new) \nReturn a copy of the string with all othe occurrences of 'old' replaced with 'new'." + "replace(old, new) \nReturn a copy of the string with all other occurrences of 'old' replaced with 'new'." ), _( "count(sub, start, end) \nReturn the number of non-overlapping occurrences of substring 'sub'.\nOptional arguments 'start' and 'end' specify the slice of the string to use. " @@ -118,7 +118,7 @@ ), _("dict(): \nCreate a new dictionary object."), _( - "dir(object) \nReturn a list of names in the scope of 'object'. If no object is supplied,\nreturns a ist of names in the current local scope." + "dir(object) \nReturn a list of names in the scope of 'object'. If no object is supplied,\nreturns a list of names in the current local scope." ), _( "divmod(a, b) \nTake two (non complex) numbers and return a pair of numbers consisting of the quotient and remainder. For example, divmod(5, 4) results in (1, 1). That is, what's is 5 divided by 4? It's 1 remainder 1." diff --git a/mu/modes/debugger.py b/mu/modes/debugger.py index f4465debe..46413d806 100644 --- a/mu/modes/debugger.py +++ b/mu/modes/debugger.py @@ -408,7 +408,7 @@ def debug_on_breakpoint_clear(self, breakpoint): def debug_on_restart(self): """ - Handle when the debugger restarts. Currenty an unimplemented extra + Handle when the debugger restarts. Currently an unimplemented extra feature. """ pass diff --git a/mu/modes/microbit.py b/mu/modes/microbit.py index 42515d6b5..b29961e3a 100644 --- a/mu/modes/microbit.py +++ b/mu/modes/microbit.py @@ -1,5 +1,5 @@ """ -The mode for working with the BBC micro:bit. Contains most of the origial +The mode for working with the BBC micro:bit. Contains most of the original functionality from Mu when it was only a micro:bit related editor. Copyright (c) 2015-2021 Nicholas H.Tollervey and others (see the AUTHORS file). diff --git a/tests/debugger/test_runner.py b/tests/debugger/test_runner.py index 8304e2015..e5d32409a 100644 --- a/tests/debugger/test_runner.py +++ b/tests/debugger/test_runner.py @@ -154,7 +154,7 @@ def test_Debugger_output_stack_normal(): def test_Debugger_output_stack_exception(): """ - Ensure that outputting the stack uses the currect frame in an exception + Ensure that outputting the stack uses the current frame in an exception condition (in addition to BDB and the runner, there are two further frames that should be ignored). """ @@ -807,7 +807,7 @@ def test_Debugger_do_continue_no_breakpoints_continue_flag_set(): def test_Debugger_do_quit(): """ - Sets _user_requested_quit to True, calles set_quit and returns True. + Sets _user_requested_quit to True, calls set_quit and returns True. """ mock_socket = mock.MagicMock() db = mu.debugger.runner.Debugger(mock_socket, "localhost", 9999) diff --git a/tests/interface/test_dialogs.py b/tests/interface/test_dialogs.py index 973a34414..5b0115af4 100644 --- a/tests/interface/test_dialogs.py +++ b/tests/interface/test_dialogs.py @@ -717,7 +717,7 @@ def test_PackageDialog_remove_package_end_state(): ) def test_PackageDialog_end_state(): """ - Ensure the expected end-state is correctly cofigured (for when all tasks + Ensure the expected end-state is correctly configured (for when all tasks relating to third party packages have finished). """ pd = mu.interface.dialogs.PackageDialog() diff --git a/tests/interface/test_editor.py b/tests/interface/test_editor.py index 1ff6ba2d4..4c9486230 100644 --- a/tests/interface/test_editor.py +++ b/tests/interface/test_editor.py @@ -680,7 +680,7 @@ def test_EditorPane_highlight_selected_matches_cursor_remains(): def test_EditorPane_selection_change_listener(): """ - Enusure that is there is a change to the selected text then controll is + Enusure that is there is a change to the selected text then control is passed to highlight_selected_matches. """ ep = mu.interface.editor.EditorPane(None, "baz") diff --git a/tests/interface/test_main.py b/tests/interface/test_main.py index d80e97b11..51e42e127 100644 --- a/tests/interface/test_main.py +++ b/tests/interface/test_main.py @@ -2031,7 +2031,7 @@ def test_Window_open_file_event(): def test_Window_connect_find_replace(): """ - Ensure a shortcut is created with teh expected shortcut and handler + Ensure a shortcut is created with the expected shortcut and handler function. """ window = mu.interface.main.Window() diff --git a/tests/interface/test_panes.py b/tests/interface/test_panes.py index d74e75c5f..1818c86aa 100644 --- a/tests/interface/test_panes.py +++ b/tests/interface/test_panes.py @@ -1986,7 +1986,7 @@ def test_FileSystemPane_set_font_size(): def test_FileSystemPane_open_file(): """ - FileSystemPane should propogate the open_file signal + FileSystemPane should propagate the open_file signal """ fsp = mu.interface.panes.FileSystemPane("homepath") fsp.open_file = mock.MagicMock() @@ -2017,7 +2017,7 @@ def test_JupyterREPLPane_append_plain_text(): def test_JupyterREPLPane_set_font_size(): """ - Check the new point size is succesfully applied. + Check the new point size is successfully applied. """ jw = mu.interface.panes.JupyterREPLPane() jw.set_font_size(16) @@ -2123,7 +2123,7 @@ def test_PythonProcessPane_start_process(): def test_PythonProcessPane_start_process_command_args(): """ - Ensure that the new process is passed the expected comand line args. + Ensure that the new process is passed the expected command line args. """ mock_process = mock.MagicMock() mock_process_class = mock.MagicMock(return_value=mock_process) @@ -2986,7 +2986,7 @@ def test_PythonProcessPane_read_from_stdout_with_stdout_buffer(): Ensure incoming bytes from sub-process's stdout are processed correctly if there was a split between reads in a multi-byte character (such as "𠜎"). - The buffer is pre-pended to the current read, thus resulting in bytes that + The buffer is prepended to the current read, thus resulting in bytes that can be successfully represented in a UTF based string. """ msg = "Hello 𠜎 world".encode("utf-8") @@ -3012,7 +3012,7 @@ def test_PythonProcessPane_read_from_stdout_with_unicode_error(): there was a split between reads in a multi-byte character (such as "𠜎"). If the read bytes end with a split of a multi-byte character, ensure they - are put into the self.stdout_buffer so they can be pre-pended to the next + are put into the self.stdout_buffer so they can be prepended to the next bytes read from the child process. """ msg = "Hello 𠜎 world".encode("utf-8") diff --git a/tests/test_logic.py b/tests/test_logic.py index a57c2a0c1..8cbabd8aa 100644 --- a/tests/test_logic.py +++ b/tests/test_logic.py @@ -1500,7 +1500,7 @@ def test_load_sets_current_path(): """ When a path has been selected for loading by the OS's file selector, ensure that the directory containing the selected file is set as the - self.current_path for re-use later on. + self.current_path for reuse later on. """ view = mock.MagicMock() view.get_load_path = mock.MagicMock( diff --git a/tests/test_settings.py b/tests/test_settings.py index a5595b4bc..eefdcfbcb 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -88,7 +88,7 @@ def test_delitem_is_not_changed(): def test_update(): - """Items can by added en bloc by update""" + """Items can by added en block by update""" k1, v1 = rstring(), rstring() s = mu.settings.SettingsBase(**{k1: v1}) k2, v2 = rstring(), rstring()