twister: refactor for pylint checking

refact to code sgement for better coding style

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
1 file changed