module: support Python 3 only
This commit is contained in:
parent
2cf9c87a8d
commit
4281334385
|
@ -2,7 +2,6 @@
|
||||||
os: linux
|
os: linux
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
|
||||||
- "3.4"
|
- "3.4"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
- "3.7"
|
- "3.7"
|
||||||
|
|
|
@ -11,7 +11,7 @@ license = "MIT"
|
||||||
homepage = "https://dev.mycrobase.de/gitea/cn/python-veml6070"
|
homepage = "https://dev.mycrobase.de/gitea/cn/python-veml6070"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^2.7 || ^3.4"
|
python = "^3.4"
|
||||||
smbus2 = "*"
|
smbus2 = "*"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
|
@ -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
|
# 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):
|
def __init__(self, initial_read=None):
|
||||||
self._log = []
|
self._log = []
|
||||||
self.initial_read = initial_read or {}
|
self.initial_read = initial_read or {}
|
||||||
|
|
|
@ -31,7 +31,7 @@ NORMALIZED_REFRESHTIME = 0.1
|
||||||
NORMALIZED_UVA_SENSITIVITY = 0.05
|
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):
|
def __init__(self, i2c_bus=1, sensor_address=ADDR_L, rset=RSET_270K, integration_time=INTEGRATIONTIME_1T):
|
||||||
self.bus = smbus.SMBus(i2c_bus)
|
self.bus = smbus.SMBus(i2c_bus)
|
||||||
self.sendor_address = sensor_address
|
self.sendor_address = sensor_address
|
||||||
|
|
Loading…
Reference in New Issue