Fix typos (#147)

* Fix typos and add codespell pre-commit hook

* Update .pre-commit-config.yaml

---------

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
This commit is contained in:
Kian-Meng Ang
2023-03-12 13:01:42 +08:00
committed by GitHub
parent 6ce87d44a6
commit a39b467563
8 changed files with 9 additions and 9 deletions

View File

@@ -200,7 +200,7 @@
**Fixed bugs:** **Fixed bugs:**
- Fix some small linting issues. [\#41](https://github.com/pyapp-kit/superqt/pull/41) ([tlambert03](https://github.com/tlambert03)) - 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)) - 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:** **Tests & CI:**

View File

@@ -39,7 +39,7 @@ See the [widgets documentation](https://pyapp-kit.github.io/superqt/widgets) for
## Utilities ## 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. - 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/)) - `superqt.fonticon` for generating icons from font files (such as [Material Design Icons](https://materialdesignicons.com/) and [Font Awesome](https://fontawesome.com/))

View File

@@ -219,7 +219,7 @@ class MainWindow(QtWidgets.QMainWindow):
self.previewGroupBox.setLayout(layout) self.previewGroupBox.setLayout(layout)
def createGlyphBox(self): def createGlyphBox(self):
self.glyphGroupBox = QtWidgets.QGroupBox("Glpyhs") self.glyphGroupBox = QtWidgets.QGroupBox("Glyphs")
self.glyphGroupBox.setMinimumSize(480, 200) self.glyphGroupBox.setMinimumSize(480, 200)
self.glyphTable = QtWidgets.QTableWidget() self.glyphTable = QtWidgets.QTableWidget()
self.glyphTable.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) self.glyphTable.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)

View File

@@ -47,7 +47,7 @@ def icon(
) -> QFontIcon: ) -> QFontIcon:
"""Create a QIcon for `glyph_key`, with a number of optional settings. """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: In most cases, the key should be provided by a plugin in the environment, like:
- [fonticon-fontawesome5](https://pypi.org/project/fonticon-fontawesome5/) ('fa5s' & - [fonticon-fontawesome5](https://pypi.org/project/fonticon-fontawesome5/) ('fa5s' &
@@ -89,7 +89,7 @@ def icon(
`animation`, etc...) `animation`, etc...)
Missing keys in the state dicts will be taken from the default options, provided Missing keys in the state dicts will be taken from the default options, provided
by the paramters above. by the parameters above.
Returns Returns
------- -------

View File

@@ -231,7 +231,7 @@ class _QFontIconEngine(QIconEngine):
# font # font
font = QFont() font = QFont()
font.setFamily(family) # set sepeartely for Qt6 font.setFamily(family) # set separately for Qt6
font.setPixelSize(round(rect.height() * opts.scale_factor)) font.setPixelSize(round(rect.height() * opts.scale_factor))
if style: if style:
font.setStyleName(style) font.setStyleName(style)

View File

@@ -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 https://code.woboq.org/qt5/qtbase/src/widgets/widgets/qslider.cpp.html
This probably looks like tremendous overkill at first (and it may be!), 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, scaling input float values to some internal integer range for the QSlider,
and converting back to float when getting `value()`. However, one still and converting back to float when getting `value()`. However, one still
runs into overflow limitations due to the internal integer model. runs into overflow limitations due to the internal integer model.

View File

@@ -80,7 +80,7 @@ class CodeSyntaxHighlight(QtGui.QSyntaxHighlighter):
# dirty, dirty hack # dirty, dirty hack
# The core problem is that pygemnts by default use string streams, # 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. # work around this.
for i in range(len(text)): for i in range(len(text)):
try: try:

View File

@@ -67,7 +67,7 @@ class WorkerBaseSignals(QObject):
started = Signal() # emitted when the work is started started = Signal() # emitted when the work is started
finished = Signal() # emitted when the work is finished 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 returned = Signal(object) # emitted with return value
errored = Signal(object) # emitted with error object on Exception errored = Signal(object) # emitted with error object on Exception
warned = Signal(tuple) # emitted with showwarning args on warning warned = Signal(tuple) # emitted with showwarning args on warning