From a39b4675630905e64169a10d23a3b3a1b3ca62c3 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sun, 12 Mar 2023 13:01:42 +0800 Subject: [PATCH] Fix typos (#147) * Fix typos and add codespell pre-commit hook * Update .pre-commit-config.yaml --------- Co-authored-by: Talley Lambert --- CHANGELOG.md | 2 +- README.md | 2 +- examples/icon_explorer.py | 2 +- src/superqt/fonticon/__init__.py | 4 ++-- src/superqt/fonticon/_qfont_icon.py | 2 +- src/superqt/sliders/_generic_slider.py | 2 +- src/superqt/utils/_code_syntax_highlight.py | 2 +- src/superqt/utils/_qthreading.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60253b5..495663f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -200,7 +200,7 @@ **Fixed bugs:** - Fix some small linting issues. [\#41](https://github.com/pyapp-kit/superqt/pull/41) ([tlambert03](https://github.com/tlambert03)) -- Use functools.wraps insterad of \_\_wraped\_\_ and manual proxing \_\_name\_\_ [\#29](https://github.com/pyapp-kit/superqt/pull/29) ([Czaki](https://github.com/Czaki)) +- Use functools.wraps instead of \_\_wraped\_\_ and manual proxing \_\_name\_\_ [\#29](https://github.com/pyapp-kit/superqt/pull/29) ([Czaki](https://github.com/Czaki)) - Propagate function name in `ensure_main_thread` and `ensure_object_thread` [\#28](https://github.com/pyapp-kit/superqt/pull/28) ([Czaki](https://github.com/Czaki)) **Tests & CI:** diff --git a/README.md b/README.md index 30bbf26..4d08442 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ See the [widgets documentation](https://pyapp-kit.github.io/superqt/widgets) for ## Utilities -superqt includes a number of utitlities for working with Qt, including: +superqt includes a number of utilities for working with Qt, including: - tools and decorators for working with threads in qt. - `superqt.fonticon` for generating icons from font files (such as [Material Design Icons](https://materialdesignicons.com/) and [Font Awesome](https://fontawesome.com/)) diff --git a/examples/icon_explorer.py b/examples/icon_explorer.py index f5d915e..4f44a89 100644 --- a/examples/icon_explorer.py +++ b/examples/icon_explorer.py @@ -219,7 +219,7 @@ class MainWindow(QtWidgets.QMainWindow): self.previewGroupBox.setLayout(layout) def createGlyphBox(self): - self.glyphGroupBox = QtWidgets.QGroupBox("Glpyhs") + self.glyphGroupBox = QtWidgets.QGroupBox("Glyphs") self.glyphGroupBox.setMinimumSize(480, 200) self.glyphTable = QtWidgets.QTableWidget() self.glyphTable.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) diff --git a/src/superqt/fonticon/__init__.py b/src/superqt/fonticon/__init__.py index 12105a1..39e47a1 100644 --- a/src/superqt/fonticon/__init__.py +++ b/src/superqt/fonticon/__init__.py @@ -47,7 +47,7 @@ def icon( ) -> QFontIcon: """Create a QIcon for `glyph_key`, with a number of optional settings. - The `glyph_key` (e.g. 'fa5s.smile') represents a Font-family & style, and a glpyh. + The `glyph_key` (e.g. 'fa5s.smile') represents a Font-family & style, and a glyph. In most cases, the key should be provided by a plugin in the environment, like: - [fonticon-fontawesome5](https://pypi.org/project/fonticon-fontawesome5/) ('fa5s' & @@ -89,7 +89,7 @@ def icon( `animation`, etc...) Missing keys in the state dicts will be taken from the default options, provided - by the paramters above. + by the parameters above. Returns ------- diff --git a/src/superqt/fonticon/_qfont_icon.py b/src/superqt/fonticon/_qfont_icon.py index 03f463f..8551b2e 100644 --- a/src/superqt/fonticon/_qfont_icon.py +++ b/src/superqt/fonticon/_qfont_icon.py @@ -231,7 +231,7 @@ class _QFontIconEngine(QIconEngine): # font font = QFont() - font.setFamily(family) # set sepeartely for Qt6 + font.setFamily(family) # set separately for Qt6 font.setPixelSize(round(rect.height() * opts.scale_factor)) if style: font.setStyleName(style) diff --git a/src/superqt/sliders/_generic_slider.py b/src/superqt/sliders/_generic_slider.py index d6dc481..e9b7e15 100644 --- a/src/superqt/sliders/_generic_slider.py +++ b/src/superqt/sliders/_generic_slider.py @@ -4,7 +4,7 @@ This module reimplements most of the logic from qslider.cpp in python: https://code.woboq.org/qt5/qtbase/src/widgets/widgets/qslider.cpp.html This probably looks like tremendous overkill at first (and it may be!), -since a it's possible to acheive a very reasonable "float slider" by +since a it's possible to achieve a very reasonable "float slider" by scaling input float values to some internal integer range for the QSlider, and converting back to float when getting `value()`. However, one still runs into overflow limitations due to the internal integer model. diff --git a/src/superqt/utils/_code_syntax_highlight.py b/src/superqt/utils/_code_syntax_highlight.py index 3cf7763..f4f1259 100644 --- a/src/superqt/utils/_code_syntax_highlight.py +++ b/src/superqt/utils/_code_syntax_highlight.py @@ -80,7 +80,7 @@ class CodeSyntaxHighlight(QtGui.QSyntaxHighlighter): # dirty, dirty hack # The core problem is that pygemnts by default use string streams, - # that will not handle QTextCharFormat, so wee need use `data` property to + # that will not handle QTextCharFormat, so we need use `data` property to # work around this. for i in range(len(text)): try: diff --git a/src/superqt/utils/_qthreading.py b/src/superqt/utils/_qthreading.py index b096680..f6e6b77 100644 --- a/src/superqt/utils/_qthreading.py +++ b/src/superqt/utils/_qthreading.py @@ -67,7 +67,7 @@ class WorkerBaseSignals(QObject): started = Signal() # emitted when the work is started finished = Signal() # emitted when the work is finished - _finished = Signal(object) # emitted when the work is finished ro delete + _finished = Signal(object) # emitted when the work is finished to delete returned = Signal(object) # emitted with return value errored = Signal(object) # emitted with error object on Exception warned = Signal(tuple) # emitted with showwarning args on warning