tools: move string description after import modules

pull/9736/head
Martin Kojtal 2019-02-19 10:38:53 +00:00
parent 62b5b4644d
commit 195965fd5e
7 changed files with 19 additions and 16 deletions

View File

@ -16,7 +16,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
"""Just a template for subclassing"""
import os
from abc import abstractmethod, ABCMeta
import logging
@ -30,6 +29,7 @@ from tools.targets import TARGET_MAP
from tools.utils import mkdir
from tools.resources import FileType
"""Just a template for subclassing"""
class TargetNotSupportedException(Exception):
"""Indicates that an IDE does not support a particular MCU"""

View File

@ -16,9 +16,6 @@ See the License for the specific language governing permissions and
limitations
"""
""" The CLI entry point for exporting projects from the mbed tools to any of the
supported IDEs or project structures.
"""
from __future__ import print_function, absolute_import
from builtins import str
@ -57,6 +54,10 @@ from tools.utils import NotSupportedException
from tools.options import extract_profile, list_profiles, extract_mcus
from tools.notifier.term import TerminalNotifier
""" The CLI entry point for exporting projects from the mbed tools to any of the
supported IDEs or project structures.
"""
EXPORTER_ALIASES = {
u'gcc_arm': u'make_gcc_arm',
u'uvision': u'uvision5',

View File

@ -16,8 +16,6 @@ See the License for the specific language governing permissions and
limitations
"""
""" import and bulid a bunch of example programs """
from argparse import ArgumentParser
import os
from os.path import dirname, abspath, basename
@ -26,6 +24,8 @@ import sys
import subprocess
import json
""" import and bulid a bunch of example programs """
ROOT = abspath(dirname(dirname(dirname(dirname(__file__)))))
sys.path.insert(0, ROOT)

View File

@ -15,6 +15,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations
"""
import os
from os.path import dirname, abspath, basename
import os.path
import sys
import subprocess
from shutil import rmtree
""" Import and bulid a bunch of example programs
@ -22,12 +28,6 @@ limitations
the update.py modules.
"""
import os
from os.path import dirname, abspath, basename
import os.path
import sys
import subprocess
from shutil import rmtree
ROOT = abspath(dirname(dirname(dirname(dirname(__file__)))))
sys.path.insert(0, ROOT)

View File

@ -16,12 +16,12 @@ See the License for the specific language governing permissions and
limitations
"""
"""A test that all code scores above a 9.25 in pylint"""
import subprocess
import re
import os.path
"""A test that all code scores above a 9.25 in pylint"""
SCORE_REGEXP = re.compile(
r'^Your\ code\ has\ been\ rated\ at\ (\-?[0-9\.]+)/10')

View File

@ -16,7 +16,6 @@ See the License for the specific language governing permissions and
limitations
"""
"""Tests for the toolchain sub-system"""
import sys
import os
from string import printable
@ -25,6 +24,8 @@ from mock import MagicMock, patch
from hypothesis import given, settings, HealthCheck
from hypothesis.strategies import text, lists, fixed_dictionaries, booleans
"""Tests for the toolchain sub-system"""
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..",
".."))
sys.path.insert(0, ROOT)

View File

@ -16,7 +16,6 @@ See the License for the specific language governing permissions and
limitations
"""
"""Tests for the arm toolchain supported checks"""
import sys
import os
from string import printable
@ -25,6 +24,8 @@ from mock import MagicMock, patch
from hypothesis import given, settings
from hypothesis.strategies import text, lists, sampled_from
"""Tests for the arm toolchain supported checks"""
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..",
".."))
sys.path.insert(0, ROOT)