Update get_data to us get_some_data sub functions. (#27)

This commit is contained in:
UpstreamData
2023-01-26 22:18:03 -07:00
committed by GitHub
parent 67b3e2f312
commit 2d4c063dfa
147 changed files with 3639 additions and 2658 deletions

View File

@@ -17,12 +17,8 @@ from pyasic.miners._types import M20, M20V10 # noqa - Ignore access to _module
class BTMinerM20(BTMiner, M20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM20V10(BTMiner, M20V10):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -21,18 +21,12 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
class BTMinerM20S(BTMiner, M20S):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM20SV10(BTMiner, M20SV10):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM20SV20(BTMiner, M20SV20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -17,6 +17,4 @@ from pyasic.miners._types import M20SPlus # noqa - Ignore access to _module
class BTMinerM20SPlus(BTMiner, M20SPlus):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -17,6 +17,4 @@ from pyasic.miners._types import M21 # noqa - Ignore access to _module
class BTMinerM21(BTMiner, M21):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -21,18 +21,12 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
class BTMinerM21S(BTMiner, M21S):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM21SV20(BTMiner, M21SV20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM21SV60(BTMiner, M21SV60):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -17,6 +17,4 @@ from pyasic.miners._types import M21SPlus # noqa - Ignore access to _module
class BTMinerM21SPlus(BTMiner, M21SPlus):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -19,34 +19,29 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
M30SVE10,
M30SVE20,
M30SVG20,
M30SVG10,
)
class BTMinerM30S(BTMiner, M30S):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SVE10(BTMiner, M30SVE10):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SVG10(BTMiner, M30SVG10):
pass
class BTMinerM30SVG20(BTMiner, M30SVG20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SVE20(BTMiner, M30SVE20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SV50(BTMiner, M30SV50):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -19,34 +19,30 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
M30SPlusVF20,
M30SPlusVG60,
M30SPlusVG40,
M30SPlusVH60,
M30SPlusVH30
)
class BTMinerM30SPlus(BTMiner, M30SPlus):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusVF20(BTMiner, M30SPlusVF20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusVE40(BTMiner, M30SPlusVE40):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusVG40(BTMiner, M30SPlusVG40):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusVG60(BTMiner, M30SPlusVG60):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusVH30(BTMiner, M30SPlusVH30):
pass
class BTMinerM30SPlusVH60(BTMiner, M30SPlusVH60):
pass

View File

@@ -22,24 +22,16 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
class BTMinerM30SPlusPlus(BTMiner, M30SPlusPlus):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusPlusVG30(BTMiner, M30SPlusPlusVG30):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusPlusVG40(BTMiner, M30SPlusPlusVG40):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM30SPlusPlusVH60(BTMiner, M30SPlusPlusVH60):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -13,33 +13,30 @@
# limitations under the License.
from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module
from pyasic.miners._types import M31S, M31SV10, M31SV20, M31SV60, M31SV70 # noqa - Ignore access to _module
from pyasic.miners._types import (
M31S,
M31SV10,
M31SV20,
M31SV60,
M31SV70,
) # noqa - Ignore access to _module
class BTMinerM31S(BTMiner, M31S):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SV20(BTMiner, M31SV20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SV10(BTMiner, M31SV10):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SV60(BTMiner, M31SV60):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SV70(BTMiner, M31SV70):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -25,42 +25,28 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
class BTMinerM31SPlus(BTMiner, M31SPlus):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SPlusVE20(BTMiner, M31SPlusVE20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SPlusV30(BTMiner, M31SPlusV30):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SPlusV40(BTMiner, M31SPlusV40):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SPlusV60(BTMiner, M31SPlusV60):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SPlusV80(BTMiner, M31SPlusV80):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM31SPlusV90(BTMiner, M31SPlusV90):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -17,12 +17,8 @@ from pyasic.miners._types import M32, M32V20 # noqa - Ignore access to _module
class BTMinerM32(BTMiner, M32):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM32V20(BTMiner, M32V20):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -17,6 +17,4 @@ from pyasic.miners._types import M32S # noqa - Ignore access to _module
class BTMinerM32S(BTMiner, M32S):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -20,12 +20,8 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
class BTMinerM34SPlus(BTMiner, M34SPlus):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM34SPlusVE10(BTMiner, M34SPlusVE10):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass

View File

@@ -18,6 +18,7 @@ from .M30S import (
BTMinerM30SVE10,
BTMinerM30SVE20,
BTMinerM30SVG20,
BTMinerM30SVG10,
)
from .M30S_Plus import (
BTMinerM30SPlus,
@@ -25,6 +26,8 @@ from .M30S_Plus import (
BTMinerM30SPlusVF20,
BTMinerM30SPlusVG40,
BTMinerM30SPlusVG60,
BTMinerM30SPlusVH30,
BTMinerM30SPlusVH60
)
from .M30S_Plus_Plus import (
BTMinerM30SPlusPlus,
@@ -32,7 +35,13 @@ from .M30S_Plus_Plus import (
BTMinerM30SPlusPlusVG40,
BTMinerM30SPlusPlusVH60,
)
from .M31S import BTMinerM31S, BTMinerM31SV10, BTMinerM31SV20, BTMinerM31SV60, BTMinerM31SV70
from .M31S import (
BTMinerM31S,
BTMinerM31SV10,
BTMinerM31SV20,
BTMinerM31SV60,
BTMinerM31SV70,
)
from .M31S_Plus import (
BTMinerM31SPlus,
BTMinerM31SPlusV30,

View File

@@ -17,12 +17,8 @@ from pyasic.miners._types import M50, M50VH50 # noqa - Ignore access to _module
class BTMinerM50(BTMiner, M50):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass
class BTMinerM50VH50(BTMiner, M50VH50):
def __init__(self, ip: str, api_ver: str = "1.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
pass