Skip to content

Commit

Permalink
Merge c38eb10 into 4c4b66c
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Oct 16, 2020
2 parents 4c4b66c + c38eb10 commit b02dd4d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -4,15 +4,15 @@ cache: pip

matrix:
include:
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38
- python: 3.5
- python: 3.9-dev
env: TOXENV=py39
- python: 3.8
env: TOXENV=qa,doc

addons:
Expand All @@ -23,4 +23,4 @@ addons:
install:
- pip install --upgrade --ignore-installed setuptools pip tox coveralls
script: tox -vv
after_success: if [ "$TOXENV" == "py36" ]; then coveralls; fi
after_success: if [ "$TOXENV" == "py38" ]; then coveralls; fi
6 changes: 3 additions & 3 deletions luma/led_matrix/device.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017-19 Richard Hull and contributors
# Copyright (c) 2017-2020 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down Expand Up @@ -70,7 +70,7 @@ def __init__(self, serial_interface=None, width=8, height=8, cascaded=None, rota

if width <= 0 or width % 8 != 0 or height <= 0 or height % 8 != 0:
raise luma.core.error.DeviceDisplayModeError(
"Unsupported display mode: {0} x {1}".format(width, height))
f"Unsupported display mode: {width} x {height}")

assert block_orientation in [0, 90, -90, 180]
self._correction_angle = block_orientation
Expand Down Expand Up @@ -255,7 +255,7 @@ def __init__(self, dma_interface=None, width=8, height=4, cascaded=None,

resp = ws.ws2811_init(self._leds)
if resp != 0:
raise RuntimeError('ws2811_init failed with code {0}'.format(resp))
raise RuntimeError(f'ws2811_init failed with code {resp}')

self.clear()
self.show()
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Expand Up @@ -34,9 +34,9 @@ def find_version(*file_paths):
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
test_deps = [
'mock;python_version<"3.3"',
'pytest<=4.5',
'pytest-cov'
'pytest-cov',
'pytest-timeout'
]

setup(
Expand Down Expand Up @@ -79,7 +79,7 @@ def find_version(*file_paths):
'test': test_deps
},
zip_safe=False,
python_requires='>=3.5, <4',
python_requires='>=3.6, <4',
classifiers=[
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
Expand All @@ -90,10 +90,10 @@ def find_version(*file_paths):
"Topic :: System :: Hardware",
"Topic :: System :: Hardware :: Hardware Drivers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: POSIX",
"Operating System :: Unix"
]
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers.py
Expand Up @@ -28,7 +28,7 @@ def assert_invalid_dimensions(deviceType, serial_interface, width, height):
"""
with pytest.raises(luma.core.error.DeviceDisplayModeError) as ex:
deviceType(serial_interface, width=width, height=height)
assert "Unsupported display mode: {} x {}".format(width, height) in str(ex.value)
assert f"Unsupported display mode: {width} x {height}" in str(ex.value)


def get_reference_file(fname):
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Expand Up @@ -2,14 +2,14 @@
# See LICENSE.rst for details.

[tox]
envlist = py{35,36,37,38},qa,doc
envlist = py{36,37,38,39},qa,doc
skip_missing_interpreters = True

[testenv]
commands =
coverage erase
python setup.py install
coverage run -m py.test -v -r wsx
coverage run -m py.test --timeout=10 -v -r wsx
coverage report
coverage html
deps = .[test]
Expand Down

0 comments on commit b02dd4d

Please sign in to comment.