From 6bac5ca1ade84fb546a067e51d79054e65614382 Mon Sep 17 00:00:00 2001 From: K Lauer Date: Fri, 21 Jul 2023 10:11:14 -0700 Subject: [PATCH] TST/FIX: no graphics object on CI --- conda-recipe/meta.yaml | 6 ------ qtpynodeeditor/node_painter.py | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index d83c399..f256472 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -14,8 +14,6 @@ build: noarch: python script: {{ PYTHON }} -m pip install . -vv - - requirements: build: - python >=3.6 @@ -26,8 +24,6 @@ requirements: - pyqt >=5 - qtpy - - test: imports: - qtpynodeeditor @@ -36,8 +32,6 @@ test: - pytest-qt - pytest-cov - - about: home: https://github.com/klauer/qtpynodeeditor license: BSD 3-clause diff --git a/qtpynodeeditor/node_painter.py b/qtpynodeeditor/node_painter.py index fe1f774..f68343f 100644 --- a/qtpynodeeditor/node_painter.py +++ b/qtpynodeeditor/node_painter.py @@ -49,6 +49,11 @@ def paint(painter: QPainter, node: 'Node', scene: 'FlowScene', geom = node.geometry state = node.state graphics_object = node.graphics_object + + if graphics_object is None: + # On CI, we might not have a graphics object + return + geom.recalculate_size(painter.font()) model = node.model