Skip to content

Commit 25b9fe8

Browse files
Merge branch 'FABulous2.0-development' into WIP/top_wrapper_expand
2 parents 753a5aa + e337d33 commit 25b9fe8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

FABulous/fabric_generator/parser/parse_csv.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parseTilesCSV(fileName: Path) -> tuple[list[Tile], list[tuple[str, str]]]:
8282
# Parse each tile config
8383
for t in tilesData:
8484
t = t.split("\n")
85-
tileName = t[0].split(",")[1]
85+
tileName = t[0].split(",")[1].strip()
8686
ports: list[Port] = []
8787
bels: list[Bel] = []
8888
matrixDir: Path | None = None
@@ -95,6 +95,7 @@ def parseTilesCSV(fileName: Path) -> tuple[list[Tile], list[tuple[str, str]]]:
9595

9696
for item in t:
9797
temp: list[str] = item.split(",")
98+
temp = [i.strip() for i in temp]
9899
if not temp or temp[0] == "":
99100
continue
100101
if temp[0] in ["NORTH", "SOUTH", "EAST", "WEST", "JUMP"]:
@@ -525,6 +526,7 @@ def parseFabricCSV(fileName: str) -> Fabric:
525526
for i in parameters:
526527
i = i.split(",")
527528
i = [j for j in i if j != ""]
529+
i = [i.strip() for i in i]
528530
if not i:
529531
continue
530532
if i[0].startswith("Tile"):
@@ -577,6 +579,7 @@ def parseFabricCSV(fileName: str) -> Fabric:
577579
for f in fabricDescription:
578580
fabricLineTmp = f.split(",")
579581
fabricLineTmp = [i for i in fabricLineTmp if i != ""]
582+
fabricLineTmp = [i.strip() for i in fabricLineTmp]
580583
if not fabricLineTmp:
581584
continue
582585
fabricLine = []

0 commit comments

Comments
 (0)