Skip to content

Commit 729cdc7

Browse files
committed
style: Fix flake8 errors and docstrings
Previous testing had ignored greentea source files when running flake8. As a result, a number of style issues needed to be resolved. Along with this, docstrings are updated, in google-style.
1 parent 4c1d3a8 commit 729cdc7

17 files changed

+895
-598
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,14 @@ Example:
129129

130130
```python
131131
def make_squares(key, value=0):
132-
"""! Return a dictionary and a list...
133-
@param value Value parameter with default value of zero (0)
134-
@return Retruns tuple of 'd' stuff and 'l' stuff
132+
"""Return a dictionary and a list.
133+
134+
Args:
135+
key: Key parameter.
136+
value: Value parameter with default value of zero (0).
137+
138+
Returns:
139+
Tuple of key:value dict and key, value list.
135140
"""
136141
d = {key: value}
137142
l = [key, value]

setup.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
"""
6-
This module defines the attributes of the
7-
PyPI package for the mbed SDK test suite
8-
"""
9-
5+
"""Package definition for PyPI."""
106
import os
117
from io import open
128
from setuptools import setup, find_packages
139

14-
DESCRIPTION = "Greentea test suite is a collection of tools that enable automated testing on mbed-enabled platforms"
10+
DESCRIPTION = (
11+
"Greentea test suite. A collection of tools that enable automated testing."
12+
)
1513
OWNER_NAMES = "Mbed team"
1614
OWNER_EMAILS = "[email protected]"
1715

1816
repository_dir = os.path.dirname(__file__)
1917

2018

2119
def read(fname):
22-
"""
23-
Utility function to cat in a file (used for the README)
24-
@param fname: the name of the file to read,
25-
relative to the directory containing this file
26-
@return: The string content of the opened file
20+
"""Read the string content of a file.
21+
22+
Args:
23+
name: the name of the file to read relative to this file's directory.
24+
25+
Returns:
26+
String content of the opened file.
2727
"""
2828
with open(os.path.join(repository_dir, fname), mode="r") as f:
2929
return f.read()

src/mbed_greentea/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5+
"""Main for the package."""
56
from mbed_greentea.greentea_cli import main
67

78
main()

0 commit comments

Comments
 (0)