Skip to content

Commit ca7a51f

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 9a5c479 commit ca7a51f

File tree

13 files changed

+751
-519
lines changed

13 files changed

+751
-519
lines changed

setup.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
6-
"""
7-
This module defines the attributes of the
8-
PyPI package for the Greentea CLI and host-tests runner (htrun)
9-
"""
10-
5+
"""PyPI Package definition for Greentea CLI and host-tests runner (htrun)."""
116
import os
127
from io import open
138
from distutils.core import setup
149
from setuptools import find_packages
1510

16-
DESCRIPTION = "The Greentea CLI and host-tests runner (htrun) is a collection of tools that enable automated testing on Mbed enabled platforms"
11+
DESCRIPTION = (
12+
"The Greentea CLI and host-tests runner (htrun) is a collection of tools "
13+
"that enable automated testing on Mbed enabled platforms."
14+
)
1715
OWNER_NAMES = "Mbed team"
1816
OWNER_EMAILS = "[email protected]"
1917

2018
repository_dir = os.path.dirname(__file__)
2119

2220

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

src/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 greentea.greentea_cli import main
67

78
main()

0 commit comments

Comments
 (0)