From 66e4ca88a41dccdf6bc537929ea2bd3beb2001a3 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 14 May 2019 23:10:49 +0200 Subject: Optimizing imports. --- src/ee/kicad/bom/io.py | 1 + src/ee/kicad/bom_tool/__init__.py | 4 +++- src/ee/kicad/export_gerber.py | 7 +++++-- src/ee/kicad/make_bom.py | 2 +- src/ee/kicad/model.py | 3 +-- src/ee/kicad/read_schematic.py | 4 ++-- src/ee/kicad/to_bom.py | 1 + 7 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/ee/kicad') diff --git a/src/ee/kicad/bom/io.py b/src/ee/kicad/bom/io.py index d7c0367..afba5da 100644 --- a/src/ee/kicad/bom/io.py +++ b/src/ee/kicad/bom/io.py @@ -1,4 +1,5 @@ import xml.etree.ElementTree as ElementTree + from ee.kicad.bom import * diff --git a/src/ee/kicad/bom_tool/__init__.py b/src/ee/kicad/bom_tool/__init__.py index 3e28eaf..6a546a0 100644 --- a/src/ee/kicad/bom_tool/__init__.py +++ b/src/ee/kicad/bom_tool/__init__.py @@ -1,8 +1,10 @@ -from ee.kicad.bom import * import functools import itertools + import pandas as pd +from ee.kicad.bom import * + def _none_if_empty(l): return l if l is not None and len(l) > 0 else None diff --git a/src/ee/kicad/export_gerber.py b/src/ee/kicad/export_gerber.py index fb3247f..45c88c0 100755 --- a/src/ee/kicad/export_gerber.py +++ b/src/ee/kicad/export_gerber.py @@ -1,10 +1,13 @@ #!/usr/bin/env python2 from __future__ import print_function -import sys -import os + import argparse +import os +import sys + from pcbnew import * + def layer_name_parser(s): parts = s.split('=') if len(parts) != 2: diff --git a/src/ee/kicad/make_bom.py b/src/ee/kicad/make_bom.py index 8d5e6cf..dcdf96b 100644 --- a/src/ee/kicad/make_bom.py +++ b/src/ee/kicad/make_bom.py @@ -1,5 +1,5 @@ -import re import pydoc +import re from pathlib import Path from typing import Optional, List, Callable, Mapping from xml.dom import minidom diff --git a/src/ee/kicad/model.py b/src/ee/kicad/model.py index 116d2ac..295a40a 100644 --- a/src/ee/kicad/model.py +++ b/src/ee/kicad/model.py @@ -1,7 +1,6 @@ import re -from typing import List, Set - from functools import total_ordering +from typing import List, Set from ee import EeException diff --git a/src/ee/kicad/read_schematic.py b/src/ee/kicad/read_schematic.py index b5b4a1b..d45b9cf 100644 --- a/src/ee/kicad/read_schematic.py +++ b/src/ee/kicad/read_schematic.py @@ -1,7 +1,7 @@ +import os.path import shlex -from ee import EeException + from ee.kicad.model import * -import os.path # Reads all .sch files referenced from the given .sch file. diff --git a/src/ee/kicad/to_bom.py b/src/ee/kicad/to_bom.py index 6cce5a5..235bd5e 100644 --- a/src/ee/kicad/to_bom.py +++ b/src/ee/kicad/to_bom.py @@ -1,5 +1,6 @@ from typing import Iterable, Union from xml.etree.ElementTree import Element + from ee.kicad.model import * __all__ = ["to_bom", "to_bom_xml"] -- cgit v1.2.3