aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-04-11 14:06:58 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-04-11 14:06:58 +0200
commit0232e0f992c3a03fe163b437cc1c1d631c8ddb83 (patch)
tree6b374a1fc11c8b7c07cc8f5234e1bfa171ec7dd8
parente47a988e624e75ab3c0bac32041668647ab2a0f1 (diff)
downloadee-python-0232e0f992c3a03fe163b437cc1c1d631c8ddb83.tar.gz
ee-python-0232e0f992c3a03fe163b437cc1c1d631c8ddb83.tar.bz2
ee-python-0232e0f992c3a03fe163b437cc1c1d631c8ddb83.tar.xz
ee-python-0232e0f992c3a03fe163b437cc1c1d631c8ddb83.zip
ee.bom: Moving it a single file, no need for more.
-rw-r--r--src/ee/bom.py (renamed from src/ee/bom/__init__.py)4
-rw-r--r--src/ee/project/report.py4
-rw-r--r--src/ee/templates/bom.rst.j2 (renamed from src/ee/bom/templates/bom.rst.j2)0
3 files changed, 4 insertions, 4 deletions
diff --git a/src/ee/bom/__init__.py b/src/ee/bom.py
index 11c2fce..f8cca71 100644
--- a/src/ee/bom/__init__.py
+++ b/src/ee/bom.py
@@ -27,7 +27,7 @@ def make_report(out_file, unresolved_parts, bom_parts: ObjDb[BomPart], supplier_
"supplier_parts": supplier_parts,
"unresolved_parts": unresolved_parts,
}
- report.save_report("ee.bom", "bom.rst.j2", out_file, **kwargs)
+ report.save_report("ee", "bom.rst.j2", out_file, **kwargs)
def default_strategy(x):
@@ -35,7 +35,7 @@ def default_strategy(x):
def create_bom(project: Project, schematic_path: Path, out_path: Path, part_dbs: List[Path],
- fail_on_missing_parts: bool, strategy_name: Optional[str]):
+ fail_on_missing_parts: bool, strategy_name: Optional[str]):
strategy = default_strategy
if strategy_name:
strategy = pydoc.locate(strategy_name)
diff --git a/src/ee/project/report.py b/src/ee/project/report.py
index 26cdaa3..1e7f6f4 100644
--- a/src/ee/project/report.py
+++ b/src/ee/project/report.py
@@ -9,8 +9,8 @@ from ee.xml import types
class Message(object):
- def __init__(self, object: Optional[str] = None, text: Optional[str] = None):
- self.object = object
+ def __init__(self, obj: Optional[str] = None, text: Optional[str] = None):
+ self.object = obj
self.text = text
diff --git a/src/ee/bom/templates/bom.rst.j2 b/src/ee/templates/bom.rst.j2
index 3463d90..3463d90 100644
--- a/src/ee/bom/templates/bom.rst.j2
+++ b/src/ee/templates/bom.rst.j2