Skip to content

Commit b07ae25

Browse files
committed
Update code to remove abstract base class
1 parent 476fb22 commit b07ae25

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sparkfun_qwiicas3935.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
# SPDX-FileCopyrightText: Copyright (c) 2021 Gaston Williams
3+
#
4+
# SPDX-License-Identifier: MIT
15
# The MIT License (MIT)
26
#
37
# Copyright (c) 2019 Gaston Williams
@@ -52,11 +56,11 @@
5256
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
5357
"""
5458

59+
# imports__version__ = "0.0.0-auto.0"
5560
__version__ = "0.0.0-auto.0"
5661
__repo__ = "https://github.com/fourstix/Sparkfun_CircuitPython_QwiicAS3935.git"
5762

5863
# imports
59-
from abc import ABC, abstractmethod
6064
from time import sleep
6165
from micropython import const
6266

@@ -106,7 +110,7 @@
106110
_DIV_MASK = const(0x3F)
107111

108112
# abstract base class
109-
class Sparkfun_QwiicAS3935(ABC):
113+
class Sparkfun_QwiicAS3935:
110114
"""Abstract base class for Sparkfun AS3935 Lightning Detector.
111115
Use the appropriate driver subclass Sprarkfun_QwiicAS3935_I2C() for I2C
112116
or Sparkfun_QwiicAS3935_SPI() for SPI."""
@@ -511,15 +515,12 @@ def tune_cap(self, value):
511515
self._write_register_bits(_FREQ_DISP_IRQ, _CAP_MASK, reg_value, 0)
512516

513517
# abstract methods
514-
@abstractmethod
515518
def _read_register(self, register):
516519
pass
517520

518-
@abstractmethod
519521
def _read_byte(self, register):
520522
pass
521523

522-
@abstractmethod
523524
def _write_register(self, register, value):
524525
pass
525526

0 commit comments

Comments
 (0)