Skip to content

Commit 6878338

Browse files
committed
linting cleanup
1 parent b4948e4 commit 6878338

File tree

9 files changed

+50
-62
lines changed

9 files changed

+50
-62
lines changed

actions/acl_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from lib import action
2-
31
import json
42

3+
from lib import action
4+
55

66
class ConsulAclListAction(action.ConsulBaseAction):
77
def run(self):

actions/catalog_node.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22

33

44
class ConsulCatalogNodeAction(action.ConsulBaseAction):
5-
def run(
6-
self,
7-
node,
8-
index=None,
9-
wait=None,
10-
consistency=None,
11-
dc=None,
12-
token=None
13-
):
14-
return (True, self.consul.catalog.node(
5+
def run(self,
156
node,
16-
index=index,
17-
wait=wait,
18-
consistency=consistency,
19-
dc=dc,
20-
token=token
21-
))
7+
index=None,
8+
wait=None,
9+
consistency=None,
10+
dc=None,
11+
token=None):
12+
13+
return (True,
14+
self.consul.catalog.node(node,
15+
index=index,
16+
wait=wait,
17+
consistency=consistency,
18+
dc=dc,
19+
token=token))

actions/catalog_nodes.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33

44
class ConsulCatalogNodesAction(action.ConsulBaseAction):
5-
def run(
6-
self,
7-
index=None,
8-
wait=None,
9-
consistency=None,
10-
dc=None,
11-
near=None,
12-
token=None
13-
):
5+
def run(self,
6+
index=None,
7+
wait=None,
8+
consistency=None,
9+
dc=None,
10+
near=None,
11+
token=None):
1412

1513
return (True, self.consul.catalog.nodes(
1614
index=index,

actions/catalog_service.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33

44
class ConsulCatalogServiceAction(action.ConsulBaseAction):
5-
def run(
6-
self,
7-
service,
8-
index=None,
9-
wait=None,
10-
tag=None,
11-
consistency=None,
12-
dc=None,
13-
near=None,
14-
token=None
15-
):
5+
def run(self,
6+
service,
7+
index=None,
8+
wait=None,
9+
tag=None,
10+
consistency=None,
11+
dc=None,
12+
near=None,
13+
token=None):
1614

1715
return (True, self.consul.catalog.service(
1816
service=service,

actions/catalog_services.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33

44
class ConsulCatalogServicesAction(action.ConsulBaseAction):
5-
def run(
6-
self,
7-
index=None,
8-
wait=None,
9-
consistency=None,
10-
dc=None,
11-
token=None
12-
):
5+
def run(self,
6+
index=None,
7+
wait=None,
8+
consistency=None,
9+
dc=None,
10+
token=None):
1311

1412
return (True, self.consul.catalog.services(
1513
index=index,

actions/event_fire.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33

44
class ConsulEventFireAction(action.ConsulBaseAction):
5-
def run(
6-
self,
7-
name,
8-
body="",
9-
node=None,
10-
service=None,
11-
tag=None):
5+
def run(self,
6+
name,
7+
body="",
8+
node=None,
9+
service=None,
10+
tag=None):
1211

1312
if len(body) > 100:
1413
self.logger.warn("Event body being fired exceeds the recommended 100 byte limit!")

actions/event_list.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33

44
class ConsulEventListAction(action.ConsulBaseAction):
5-
def run(
6-
self,
7-
name=None,
8-
index=None,
9-
wait=None
10-
):
5+
def run(self,
6+
name=None,
7+
index=None,
8+
wait=None):
119

1210
if name == "":
1311
name = None

actions/kv_get.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from lib import action
2-
import json
32

43

54
class ConsulKVGetAction(action.ConsulBaseAction):
@@ -27,7 +26,7 @@ def run(self,
2726

2827
if from_json and not keys:
2928
if isinstance(res, dict):
30-
res["Value"] = self.from_json(res["Value"])
29+
res["Value"] = self.from_json(res["Value"])
3130
if isinstance(res, list):
3231
for item in res:
3332
item["Value"] = self.from_json(item["Value"])

actions/lib/action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import json
12
from st2common import log as logging
23
from st2common.runners.base_action import Action
34

45
# http://python-consul.readthedocs.org/en/latest/#
56
import consul
6-
import json
77

88

99
class ConsulBaseAction(Action):

0 commit comments

Comments
 (0)