From 42813343851c8e0521ebe556c42725389a6d0161 Mon Sep 17 00:00:00 2001 From: cn Date: Wed, 18 Dec 2019 19:57:23 +0100 Subject: [PATCH] module: support Python 3 only --- .travis.yml | 1 - pyproject.toml | 2 +- tests/veml6070_test.py | 2 +- veml6070/veml6070.py | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index feaf9ec..ef922eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ os: linux language: python python: -- "2.7" - "3.4" - "3.5" - "3.7" diff --git a/pyproject.toml b/pyproject.toml index e4bcb7d..b19dcdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ license = "MIT" homepage = "https://dev.mycrobase.de/gitea/cn/python-veml6070" [tool.poetry.dependencies] -python = "^2.7 || ^3.4" +python = "^3.4" smbus2 = "*" [tool.poetry.dev-dependencies] diff --git a/tests/veml6070_test.py b/tests/veml6070_test.py index 96a1d9f..f661db7 100644 --- a/tests/veml6070_test.py +++ b/tests/veml6070_test.py @@ -14,7 +14,7 @@ import veml6070 # pylint: disable=wrong-import-position # inspired by https://github.com/adafruit/Adafruit_Python_GPIO/blob/master/Adafruit_GPIO/I2C.py -class MockSMBus(object): # pylint: disable=bad-option-value,useless-object-inheritance +class MockSMBus(): def __init__(self, initial_read=None): self._log = [] self.initial_read = initial_read or {} diff --git a/veml6070/veml6070.py b/veml6070/veml6070.py index 06885b9..5a94aa6 100644 --- a/veml6070/veml6070.py +++ b/veml6070/veml6070.py @@ -31,7 +31,7 @@ NORMALIZED_REFRESHTIME = 0.1 NORMALIZED_UVA_SENSITIVITY = 0.05 -class Veml6070(object): # pylint: disable=bad-option-value,useless-object-inheritance +class Veml6070(): def __init__(self, i2c_bus=1, sensor_address=ADDR_L, rset=RSET_270K, integration_time=INTEGRATIONTIME_1T): self.bus = smbus.SMBus(i2c_bus) self.sendor_address = sensor_address