Skip to content

Commit a925eaa

Browse files
isort
1 parent e911667 commit a925eaa

File tree

31 files changed

+62
-49
lines changed

31 files changed

+62
-49
lines changed

tasks/capture/tcpdump.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
import signal
12
import subprocess
23
import time
3-
import signal
44
from typing import List, Optional
55

66
from netunicorn.base import (
7-
Task,
8-
TaskDispatcher,
9-
Result,
10-
Success,
7+
Architecture,
118
Failure,
129
Node,
13-
Architecture,
10+
Result,
11+
Success,
12+
Task,
13+
TaskDispatcher,
1414
)
1515
from netunicorn.library.tasks.tasks_utils import subprocess_run
1616

tasks/capture/tshark.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from typing import List, Optional
44

55
from netunicorn.base import (
6-
Task,
7-
TaskDispatcher,
8-
Result,
9-
Success,
6+
Architecture,
107
Failure,
118
Node,
12-
Architecture,
9+
Result,
10+
Success,
11+
Task,
12+
TaskDispatcher,
1313
)
1414
from netunicorn.library.tasks.tasks_utils import subprocess_run
1515

tasks/flags.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from typing import Literal, Optional
21
import warnings
2+
from typing import Literal, Optional
33
from urllib.parse import quote_plus
44

55
from netunicorn.base import Task
@@ -27,9 +27,10 @@ def __init__(self, flag_name: str, flag_values: FlagValues, *args, **kwargs):
2727
super().__init__(*args, **kwargs)
2828

2929
def run(self) -> None:
30-
import requests as req
3130
import os
3231

32+
import requests as req
33+
3334
gateway = os.environ["NETUNICORN_GATEWAY_ENDPOINT"]
3435
experiment_id = os.environ["NETUNICORN_EXPERIMENT_ID"]
3536

@@ -45,9 +46,10 @@ def __init__(self, flag_name: str, *args, **kwargs):
4546
super().__init__(*args, **kwargs)
4647

4748
def run(self) -> FlagValues:
48-
import requests as req
4949
import os
5050

51+
import requests as req
52+
5153
gateway = os.environ["NETUNICORN_GATEWAY_ENDPOINT"]
5254
experiment_id = os.environ["NETUNICORN_EXPERIMENT_ID"]
5355

@@ -75,10 +77,11 @@ def __init__(
7577
super().__init__(*args, **kwargs)
7678

7779
def run(self) -> FlagValues:
78-
import requests as req
7980
import os
8081
import time
8182

83+
import requests as req
84+
8285
gateway = os.environ["NETUNICORN_GATEWAY_ENDPOINT"]
8386
experiment_id = os.environ["NETUNICORN_EXPERIMENT_ID"]
8487

@@ -118,9 +121,10 @@ def __init__(
118121
super().__init__(*args, **kwargs)
119122

120123
def run(self) -> None:
121-
import requests as req
122124
import os
123125

126+
import requests as req
127+
124128
gateway = os.environ["NETUNICORN_GATEWAY_ENDPOINT"]
125129
experiment_id = os.environ["NETUNICORN_EXPERIMENT_ID"]
126130

tasks/letsencrypt/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from netunicorn.base.task import Task
2+
23
from .tasks import validate_dns_01, validate_http_01
34

45

tasks/letsencrypt/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import requests
2-
from returns.result import Success, Failure, Result
2+
from returns.result import Failure, Result, Success
33

44

55
def validate_http_01(domain: str, token_name: str, token_data: str) -> Result[None, str]:

tasks/measurements/cloudflare/speedtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from dataclasses import dataclass
66
from typing import Optional
77

8-
from netunicorn.base import Result, Task, TaskDispatcher, Node, Architecture, Success
8+
from netunicorn.base import Architecture, Node, Result, Success, Task, TaskDispatcher
99

1010

1111
@dataclass

tasks/measurements/iperf3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import time
33
from typing import Optional
44

5-
from netunicorn.base import Task, Success, Failure
5+
from netunicorn.base import Failure, Success, Task
66
from netunicorn.library.tasks.tasks_utils import subprocess_run
77

88

tasks/measurements/ndt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Optional
22

3-
from netunicorn.base import Node, Architecture, Task, TaskDispatcher
3+
from netunicorn.base import Architecture, Node, Task, TaskDispatcher
44
from netunicorn.library.tasks.tasks_utils import subprocess_run
55

66
__all__ = [

tasks/network_attacks/arp/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from netunicorn.base.task import Task
2+
23
from .spoof import main
34

45

tasks/network_attacks/arp/spoof.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import time
22

33
from scapy.all import sendp
4-
from scapy.layers.l2 import Ether, ARP
4+
from scapy.layers.l2 import ARP, Ether
55

66

77
def main(

0 commit comments

Comments
 (0)