[thci] bug fixes and clean up the code style (#3817)

This commit squashes the approved updates, mainly include
1) bug fix or enhancement
   - make pollperiod take effect
   - fix the issue in finding the address of the specific address
     (case-sensitive issue introduced in #3639)
   - make `__sendCommand` more robust for possible extra serial output

3) Update along with master code and other minor updates
   - the command used to find specific address (#3856)
   - the IP6Prefix string len (from 20 to 19)
   - correct typos

2) Code Style
   - use single quotes for code
   - update to use `print ()` and format `%`
   - format via with `black` tool locally
     `python3 -m black -l 79 -S tools/harness-thci -t py27`
   - add travis python check example for THCI with `flake8` tool

notes: require OT code with #3856 (get specific address) and #3862 (`joiner id`)
This commit is contained in:
Rongli Sun
2019-06-17 09:03:55 -07:00
committed by Jonathan Hui
parent 932cd78f04
commit 73ffd2a9dc
6 changed files with 2088 additions and 1239 deletions
+16
View File
@@ -0,0 +1,16 @@
[flake8]
# it's not a bug that we aren't using all of hacking, ignore:
# E203: White space before ':' (see #python#black#315).
# W503: Line break occurred before a binary operator (see #python#black#README.md).
ignore = E203, W503
# relax the length limitation for now.
max-line-length = 119
max-doc-length = 119
# Print the source code generating the error/warning in question.
show_source = True
show-source = True
# print the total number of errors.
count = True