Skip to content

Commit 869c8ff

Browse files
committed
2 parents 1686009 + 3dc4096 commit 869c8ff

File tree

13 files changed

+30
-11
lines changed

13 files changed

+30
-11
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,11 @@ jobs:
3434
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
3535
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
3636
python -m pip install --upgrade pip
37-
python -m pip install flake8 pytest
37+
python -m pip install ruff pytest
3838
pip install PyQt5
3939
pip install .
40-
- name: Lint with flake8
41-
run: |
42-
# stop the build if there are Python syntax errors or undefined names
43-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
44-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
45-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
40+
- name: Lint with Ruff
41+
run: ruff check --output-format=github guidata
4642
- name: Test with pytest
4743
run: |
4844
pytest

guidata/widgets/arrayeditor/editorwidget.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# pylint: disable=R0911
1313
# pylint: disable=R0201
1414

15+
# ruff: noqa
16+
1517
"""Array editor widget"""
1618

1719
from __future__ import annotations

guidata/widgets/codeeditor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Licensed under the terms of the MIT License
55
# (see spyder/__init__.py for details)
66

7+
# ruff: noqa
8+
79
"""
810
guidata.widgets.codeeditor
911
==========================

guidata/widgets/collectionseditor.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# (see spyder/__init__.py for details)
77
# ----------------------------------------------------------------------------
88

9+
# ruff: noqa
10+
911
"""
1012
guidata.widgets.collectionseditor
1113
=================================
@@ -27,7 +29,6 @@
2729
# pylint: disable=R0911
2830
# pylint: disable=R0201
2931

30-
3132
import datetime
3233
import io
3334
import re
@@ -1001,9 +1002,9 @@ def refresh_plot_entries(self, index):
10011002
condition_imshow = condition_plot and self.get_array_ndim(key) == 2
10021003
condition_imshow = condition_imshow or self.is_image(key)
10031004
else:
1004-
is_array = (
1005-
condition_plot
1006-
) = condition_imshow = is_list = condition_hist = False
1005+
is_array = condition_plot = condition_imshow = is_list = condition_hist = (
1006+
False
1007+
)
10071008
self.plot_action.setVisible(condition_plot or is_list)
10081009
self.hist_action.setVisible(condition_hist or is_list)
10091010
self.imshow_action.setVisible(condition_imshow)

guidata/widgets/console/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Licensed under the terms of the MIT License
55
# (see spyder/__init__.py for details)
66

7+
# ruff: noqa
8+
79
"""QPlainTextEdit base class"""
810

911
# pylint: disable=C0103

guidata/widgets/console/dochelpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# (see spyder_kernels/__init__.py for details)
77
# -----------------------------------------------------------------------------
88

9+
# ruff: noqa
10+
911
"""Utilities and wrappers around inspect module"""
1012

1113
import builtins

guidata/widgets/console/internalshell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Licensed under the terms of the MIT License
55
# (see spyder/__init__.py for details)
66

7+
# ruff: noqa
8+
79
"""Internal shell widget : PythonShellWidget + Interpreter"""
810

911
# pylint: disable=C0103

guidata/widgets/console/interpreter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Licensed under the terms of the MIT License
55
# (see spyder/__init__.py for details)
66

7+
# ruff: noqa
8+
79
"""Shell Interpreter"""
810

911
import atexit

guidata/widgets/dataframeeditor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# (BSD 3-clause; see NOTICE.txt in the Spyder root directory for details).
99
# -----------------------------------------------------------------------------
1010

11+
# ruff: noqa
12+
1113
"""
1214
guidata.widgets.dataframeeditor
1315
===============================

guidata/widgets/importwizard.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Licensed under the terms of the MIT License
55
# (see spyder/__init__.py for details)
66

7+
# ruff: noqa
8+
79
"""
810
Text data Importing Wizard based on Qt
911
"""

0 commit comments

Comments
 (0)