Skip to content

Commit

Permalink
Merge pull request #482 from nucleic/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
MatthieuDartiailh committed Mar 11, 2022
2 parents 48e9f9f + 8cd2452 commit ebcfec8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
26 changes: 13 additions & 13 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ branches:
only:
- main

image:
- Visual Studio 2022

environment:
matrix:

Expand All @@ -26,17 +29,18 @@ environment:
# 32-bit versions, PyQt and PySide2, latest

- NAME: "32-bit, Latest "
PYTHON: "C:\\Python38"
PYTHON: "C:\\Python39"
PYTHON_VERSION: "3.9"
PYTHON_ARCH: "32"
PYQT_VERSION: "5"
QT_BINDING: "pyqt"
QT_VERSION: "5"

- NAME: "PySide2"
PYTHON: "C:\\Python38"
PYTHON: "C:\\Python39"
PYTHON_VERSION: "3.9"
PYTHON_ARCH: "32"
PYQT_VERSION: "None"
QT_API: "pyside2"
QT_BINDING: "pyside2"
QT_VERSION: "5"


install:
Expand Down Expand Up @@ -78,17 +82,11 @@ install:
- "python -c \"import struct; print('Architecture is win'+str(struct.calcsize('P') * 8))\""
- pip --version

# Install bytecode
- pip install bytecode

# At the time of writing, the setup.py says Enaml depends on a dev version
# of Atom which is not on PyPI. Install straight from GitHub.
- pip install git+https://github.com/nucleic/cppy@main
- pip install git+https://github.com/nucleic/atom@main
- pip install git+https://github.com/nucleic/kiwi@main

- if %PYQT_VERSION%==5 pip install pyqt5
- ps: if ($env:QT_API -eq "pyside2") {pip install pyside2}
- if "%QSCINTILLA%"=="Yes" pip install QScintilla

# We should be able to install the test dependencies via setup.py, but in the meantime, do it manually:
Expand All @@ -97,10 +95,12 @@ install:
build_script:

- cd %APPVEYOR_BUILD_DIR%
- pip install -e .
- if "%QT_BINDING%"=="pyqt" pip install -e .[qt5-pyqt]
- if "%QT_BINDING%"=="pyside2" pip install -e .[qt5-pyside]
- pip list

test_script:

# Run the project tests
- cd %APPVEYOR_BUILD_DIR%
- pytest tests --cov enaml --cov-report xml
- pytest tests -rs --cov enaml --cov-report xml
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10.0']
python-version: ['3.8', '3.9', '3.10']
qt-binding: [pyqt5, pyside2]
exclude:
- os: ubuntu-latest
python-version: '3.10.0'
python-version: '3.10'
qt-binding: pyside2
- os: windows-latest
python-version: '3.10.0'
python-version: '3.10'
qt-binding: pyside2
- os: macos-latest
python-version: '3.10.0'
python-version: '3.10'
qt-binding: pyside2
fail-fast: false
steps:
Expand All @@ -56,7 +56,6 @@ jobs:
python -m pip install --upgrade pip
pip install ply
pip install git+https://github.com/MatthieuDartiailh/bytecode@main
pip install git+https://github.com/nucleic/cppy@main
pip install git+https://github.com/nucleic/atom@main
pip install git+https://github.com/nucleic/kiwi@main
- name: Install Qt bindings
Expand Down
4 changes: 2 additions & 2 deletions enaml/qt/qt_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def init_widget(self):
#--------------------------------------------------------------------------
# Private API
#--------------------------------------------------------------------------
def _validate_and_apply(self):
def _verify_and_apply(self):
""" Validate and apply the text in the control.
"""
Expand Down Expand Up @@ -153,7 +153,7 @@ def on_submit_text(self):
"""
self._guard |= TEXT_GUARD
try:
self._validate_and_apply()
self._verify_and_apply()
finally:
self._guard &= ~TEXT_GUARD

Expand Down
8 changes: 2 additions & 6 deletions enaml/widgets/dual_slider.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
# Copyright (c) 2013-2022, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
Expand Down Expand Up @@ -93,10 +93,6 @@ class DualSlider(Control):
#: orientation becomes horizontal).
orientation = d_(Enum('horizontal', 'vertical'))

#: If True, the value is updated while sliding. Otherwise, it is
#: only updated when the slider is released. Defaults to True.
#tracking = d_(Bool(True))

#: Whether or not to automatically adjust the 'hug_width' and
#: 'hug_height' values based on the value of 'orientation'.
auto_hug = Bool(True)
Expand All @@ -108,7 +104,7 @@ class DualSlider(Control):
# Observers
#--------------------------------------------------------------------------
@observe('minimum', 'maximum', 'low_value', 'high_value', 'tick_position',
'tick_interval', 'orientation', 'tracking')
'tick_interval', 'orientation')
def _update_proxy(self, change):
""" An observer which sends state change to the proxy.
Expand Down

0 comments on commit ebcfec8

Please sign in to comment.