From 439554fe5a1b5a46e79808809a0ab2c41bbc7da3 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Mon, 2 Oct 2023 09:36:36 -0400 Subject: [PATCH 1/2] python/tests/tst_importModule.py - fix list of moduleSymbols --- python/tests/tst_importModule.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/tests/tst_importModule.py b/python/tests/tst_importModule.py index 681126c9..45b8ca8e 100644 --- a/python/tests/tst_importModule.py +++ b/python/tests/tst_importModule.py @@ -24,8 +24,12 @@ def test_importModules(self): for t in inspect.getmembers(m): moduleSymbols.append(t[0]) - symbols = ['AbstractGrid', 'EndTimeRole', - 'Span', 'TreeViewRowController'] + symbols = ['AbstractGrid', 'AbstractRowController', 'Constraint', + 'ConstraintGraphicsItem', 'ConstraintModel', 'ConstraintProxy', + 'DateTimeGrid', 'DateTimeScaleFormatter', 'ForwardingProxyModel', + 'GraphicsScene', 'GraphicsView', 'ItemDataRole', 'ItemDelegate', + 'ItemType', 'Legend', 'ListViewRowController', 'ProxyModel', + 'Span', 'StyleOptionGanttItem', 'View'] for symbol in symbols: self.assertIn(symbol, moduleSymbols) From b2b041fc08a7455d7efcb73374f24b4c805f0c6c Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Tue, 24 Oct 2023 15:34:31 -0400 Subject: [PATCH 2/2] pre-commit autoupdate includes some codespell fixes --- .codespellrc | 5 +++-- .pre-commit-config.yaml | 15 ++++++++----- .../Cartesian/KDChartCartesianAxis.cpp | 2 +- .../Cartesian/KDChartStockDiagram_p.cpp | 2 +- src/KDChart/KDChartAbstractDiagram.h | 2 +- src/KDChart/KDChartRelativePosition.h | 2 +- src/KDGantt/kdganttabstractrowcontroller.cpp | 2 +- src/KDGantt/kdganttgraphicsitem.cpp | 22 +++++++++---------- 8 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.codespellrc b/.codespellrc index 7181874b..71b4330c 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,5 @@ [codespell] -skip = ./build-*,.git,*.kdx +skip = ./build-*,.git,*.kdx,*.pdf interactive = 3 -ignore-words-list = ba,currect,ro,siz +#ignore-words-list = ba,currect,ro,siz +ignore-regex = \b([a-z]+[A-Z0-9][a-z0-9]*|siz|implementor|re-use)\b diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0a16e9b5..d38bd5e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,12 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +ci: + autoupdate_schedule: monthly + exclude: ^(cmake/ECM/|cmake/KDAB/) repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -13,21 +16,21 @@ repos: args: [--allow-multiple-documents] - id: check-json - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v15.0.7 + rev: v17.0.3 hooks: - id: clang-format - repo: https://github.com/PyCQA/pylint - rev: v2.16.2 + rev: v3.0.1 hooks: - id: pylint exclude: ^(.cmake-format.py|conan/conanfile.py|scripts/genignore.py) - repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v2.0.1 + rev: v2.0.4 hooks: - id: autopep8 exclude: ^(.cmake-format.py|conan/conanfile.py) - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.2.6 hooks: - id: codespell - repo: https://github.com/cheshirekow/cmake-format-precommit @@ -45,6 +48,6 @@ repos: language: ruby files: \.(md|mdown|markdown)$ - repo: https://github.com/fsfe/reuse-tool - rev: v1.1.2 + rev: v2.1.0 hooks: - id: reuse diff --git a/src/KDChart/Cartesian/KDChartCartesianAxis.cpp b/src/KDChart/Cartesian/KDChartCartesianAxis.cpp index 18b1704a..2c5d7769 100644 --- a/src/KDChart/Cartesian/KDChartCartesianAxis.cpp +++ b/src/KDChart/Cartesian/KDChartCartesianAxis.cpp @@ -237,7 +237,7 @@ bool TickIterator::areAlmostEqual(qreal r1, qreal r2) const // which needs this function to perform a reasonable comparison. span = qFuzzyIsNull(m_dimension.start) ? 1 : qAbs(m_dimension.start); } - return qAbs(r2 - r1) < ( span )*1e-6; + return qAbs(r2 - r1) < (span) * 1e-6; } else { return qAbs(r2 - r1) < qMax(qAbs(r1), qAbs(r2)) * 0.01; } diff --git a/src/KDChart/Cartesian/KDChartStockDiagram_p.cpp b/src/KDChart/Cartesian/KDChartStockDiagram_p.cpp index aa2020f6..61825d3c 100644 --- a/src/KDChart/Cartesian/KDChartStockDiagram_p.cpp +++ b/src/KDChart/Cartesian/KDChartStockDiagram_p.cpp @@ -92,7 +92,7 @@ QPolygonF StockDiagram::Private::ThreeDPainter::drawTwoDLine(const QLineF &line, // The z coordinate to use (i.e., at what depth to draw the line) const qreal z = props.depth / 2.0; - // Projec the 2D points of the line in 3D + // Project the 2D points of the line in 3D const QPointF deepP1 = projectPoint(line.p1(), z, props.angle); const QPointF deepP2 = projectPoint(line.p2(), z, props.angle); diff --git a/src/KDChart/KDChartAbstractDiagram.h b/src/KDChart/KDChartAbstractDiagram.h index 82affaaf..97843028 100644 --- a/src/KDChart/KDChartAbstractDiagram.h +++ b/src/KDChart/KDChartAbstractDiagram.h @@ -86,7 +86,7 @@ class KDCHART_EXPORT AbstractDiagram : public QAbstractItemView /** * Called by the widget's sizeEvent. Adjust all internal structures, - * that are calculated, dependending on the size of the widget. + * that are calculated, depending on the size of the widget. * * @param area Size of the widget */ diff --git a/src/KDChart/KDChartRelativePosition.h b/src/KDChart/KDChartRelativePosition.h index f4b45e70..00532af6 100644 --- a/src/KDChart/KDChartRelativePosition.h +++ b/src/KDChart/KDChartRelativePosition.h @@ -174,7 +174,7 @@ class KDCHART_EXPORT RelativePosition const QPointF referencePoint(qreal *polarDegrees = nullptr) const; /** - * \brief Calculate a point, accordin to the reference area/position and the padding. + * \brief Calculate a point, according to the reference area/position and the padding. * * This method is called at drawing time: The returned point is used as anchor point. * Note that it is the task of the calling code to place the content, taking the alignment diff --git a/src/KDGantt/kdganttabstractrowcontroller.cpp b/src/KDGantt/kdganttabstractrowcontroller.cpp index 57e65753..1a43b26d 100644 --- a/src/KDGantt/kdganttabstractrowcontroller.cpp +++ b/src/KDGantt/kdganttabstractrowcontroller.cpp @@ -15,7 +15,7 @@ using namespace KDGantt; /*!\class KDGantt::AbstractRowController kdganttabstractrowcontroller.h KDGanttAbstractRowController * \ingroup KDGantt * \brief Abstract baseclass for row controllers. A row controller is used - * by the GraphicsView to nagivate the model and to determine the + * by the GraphicsView to navigate the model and to determine the * row geometries */ diff --git a/src/KDGantt/kdganttgraphicsitem.cpp b/src/KDGantt/kdganttgraphicsitem.cpp index 47e312a2..c6dee4df 100644 --- a/src/KDGantt/kdganttgraphicsitem.cpp +++ b/src/KDGantt/kdganttgraphicsitem.cpp @@ -267,18 +267,18 @@ void GraphicsItem::removeEndConstraint(ConstraintGraphicsItem *item) void GraphicsItem::updateConstraintItems() { - {// Workaround for multiple definition error with MSVC6 - Q_FOREACH (ConstraintGraphicsItem *item, m_startConstraints) { - QPointF s = startConnector(item->constraint().relationType()); - item->setStart(s); -} -} -{ // Workaround for multiple definition error with MSVC6 - Q_FOREACH (ConstraintGraphicsItem *item, m_endConstraints) { - QPointF e = endConnector(item->constraint().relationType()); - item->setEnd(e); + { // Workaround for multiple definition error with MSVC6 + Q_FOREACH (ConstraintGraphicsItem *item, m_startConstraints) { + QPointF s = startConnector(item->constraint().relationType()); + item->setStart(s); + } + } + { // Workaround for multiple definition error with MSVC6 + Q_FOREACH (ConstraintGraphicsItem *item, m_endConstraints) { + QPointF e = endConnector(item->constraint().relationType()); + item->setEnd(e); + } } -} } void GraphicsItem::updateItem(const Span &rowGeometry, const QPersistentModelIndex &idx)