format: add isort to pre-commit and sort imports.

This commit is contained in:
UpstreamData
2022-11-10 14:15:45 -07:00
parent 228daecbbf
commit f3b25027ad
82 changed files with 226 additions and 258 deletions

View File

@@ -13,9 +13,10 @@
# limitations under the License.
import unittest
from tests.miners_tests import MinersTest, MinerFactoryTest
from tests.network_tests import NetworkTest
from tests.config_tests import ConfigTest
from tests.miners_tests import MinerFactoryTest, MinersTest
from tests.network_tests import NetworkTest
if __name__ == "__main__":
# `coverage run --source pyasic -m unittest discover` will give code coverage data

View File

@@ -13,14 +13,15 @@
# limitations under the License.
import unittest
from pyasic.config import MinerConfig, _PoolGroup, _Pool # noqa
from tests.test_data import (
bosminer_api_pools,
bosminer_config_pools,
x19_api_pools,
x19_web_pools,
bosminer_config_pools,
)
from pyasic.config import MinerConfig, _Pool, _PoolGroup # noqa
class ConfigTest(unittest.TestCase):
def setUp(self) -> None:

View File

@@ -11,18 +11,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
from pyasic.miners.miner_factory import MINER_CLASSES
from pyasic.miners.base import BaseMiner
from pyasic.miners._backends import CGMiner
from pyasic.miners.miner_factory import MinerFactory
from pyasic.miners.miner_listener import MinerListener
import asyncio
import inspect
import sys
import unittest
from pyasic.miners._backends import CGMiner
from pyasic.miners.base import BaseMiner
from pyasic.miners.miner_factory import MINER_CLASSES, MinerFactory
from pyasic.miners.miner_listener import MinerListener
class MinersTest(unittest.TestCase):

View File

@@ -15,8 +15,8 @@
import ipaddress
import unittest
from pyasic.network.net_range import MinerNetworkRange
from pyasic.network import MinerNetwork
from pyasic.network.net_range import MinerNetworkRange
class NetworkTest(unittest.TestCase):