Skip to content

Commit 11b63a1

Browse files
committed
Move to pylama
Closes #205 Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
1 parent 383b6f3 commit 11b63a1

File tree

13 files changed

+22
-13
lines changed

13 files changed

+22
-13
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
pip install -r requirements.txt -r requirements-dev.txt
2121
- name: Checking the code syntax
2222
run: |
23-
pycodestyle --first chaoslib
23+
pylama chaoslib
2424
- name: Run tests
2525
run: |
2626
pip install -e .

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
### Changed
88

99
- Moved from setup.py to declarative setup.cfg [#204][204]
10+
- Moved to pylama from pycodestyle [#205][205]
1011

1112
[204]: https://github.com/chaostoolkit/chaostoolkit-lib/issues/204
13+
[205]: https://github.com/chaostoolkit/chaostoolkit-lib/issues/205
1214

1315
## [1.17.0][] - 2021-02-15
1416

chaoslib/activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"run_activities"]
2424

2525

26-
def ensure_activity_is_valid(activity: Activity):
26+
def ensure_activity_is_valid(activity: Activity): # noqa: C901
2727
"""
2828
Goes through the activity and checks certain of its properties and raise
2929
:exc:`InvalidActivity` whenever one does not respect the expectations.

chaoslib/caching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def wrapped(experiment: Experiment, settings: Settings = None,
5353
experiment_vars: Dict[str, Any] = None,
5454
strategy: Strategy = Strategy.DEFAULT,
5555
schedule: Schedule = None,
56-
event_handlers: List['RunEventHandler'] = None):
56+
event_handlers: List['RunEventHandler'] = None): #noqa: E0602
5757
try:
5858
if experiment:
5959
cache_activities(experiment)

chaoslib/control/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def reset_global_controls():
282282
global_controls.clear()
283283

284284

285-
def get_context_controls(level: str, experiment: Experiment = None,
285+
def get_context_controls(level: str, experiment: Experiment = None, #noqa: C901
286286
context: Union[Activity, Experiment] = None) \
287287
-> List[Control]:
288288
"""

chaoslib/discovery/discover.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def discover_probes(extension_mod_name: str) -> DiscoveredActivities:
8282
return discover_activities(extension_mod_name, "probe")
8383

8484

85-
def discover_activities(extension_mod_name: str,
85+
def discover_activities(extension_mod_name: str, #noqa: C901
8686
activity_type: str) -> DiscoveredActivities:
8787
"""
8888
Discover exported activities from the given extension module name.
@@ -141,7 +141,7 @@ def discover_activities(extension_mod_name: str,
141141
return activities
142142

143143

144-
def portable_type_name(python_type: Any) -> str:
144+
def portable_type_name(python_type: Any) -> str: # noqa: C901
145145
"""
146146
Return a fairly portable name for a Python type. The idea is to make it
147147
easy for consumer to read without caring for actual Python types
@@ -185,7 +185,7 @@ def portable_type_name(python_type: Any) -> str:
185185
return "object"
186186

187187

188-
def portable_type_name_to_python_type(name: str) -> Any:
188+
def portable_type_name_to_python_type(name: str) -> Any: # noqa: C901
189189
"""
190190
Return the Python type associated to the given portable name.
191191
"""

chaoslib/hypothesis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def _(tolerance: list, value: Any, configuration: Configuration = None,
278278

279279

280280
@within_tolerance.register(dict)
281-
def _(tolerance: dict, value: Any, configuration: Configuration = None,
281+
def _(tolerance: dict, value: Any, configuration: Configuration = None, #noqa: C901
282282
secrets: Secrets = None) -> bool:
283283
tolerance_type = tolerance.get("type")
284284

chaoslib/notification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ValidateFlowEvent(FlowEvent):
4343
ValidateCompleted = "validate-completed"
4444

4545

46-
def notify(settings: Settings, event: FlowEvent, payload: Any = None,
46+
def notify(settings: Settings, event: FlowEvent, payload: Any = None, #noqa: C901
4747
error: Any = None):
4848
"""
4949
Go through all the notification channels declared in the settings and

chaoslib/provider/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def run_python_activity(activity: Activity, configuration: Configuration,
6060
sys.exc_info()[2])
6161

6262

63-
def validate_python_activity(activity: Activity):
63+
def validate_python_activity(activity: Activity): # noqa: C901
6464
"""
6565
Validate a Python activity.
6666

chaoslib/secret.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def load_secrets_from_env(secrets_info: Dict[str, Dict[str, str]],
144144
return secrets
145145

146146

147-
def load_secrets_from_vault(secrets_info: Dict[str, Dict[str, str]],
147+
def load_secrets_from_vault(secrets_info: Dict[str, Dict[str, str]], # noqa: C901
148148
configuration: Configuration = None,
149149
extra_vars: Dict[str, Any] = None) -> Secrets:
150150
"""

0 commit comments

Comments
 (0)