leaf_focus/report/item/skipped_line.py
def save(cls, path: Path, items: Iterable["SkippedLine"]):
        """Save items to a csv file."""
        fields = ["count", "text"]
        path.parent.mkdir(parents=True, exist_ok=True)
        with open(path, "wt", newline="", encoding="utf8") as f:
            writer = csv.DictWriter(f, fields, dialect="excel")
            writer.writeheader()
            for i in items:
                writer.writerow({"count": i.count, "text": i.text})
Save items to a csv file.
Save items to a csv file.
Save items to a csv file .
def save(cls, path: Path, items: Iterable["SkippedLine"]):
        fields = ["count", "text"]
        path.parent.mkdir(parents=True, exist_ok=True)
        with open(path, "wt", newline="", encoding="utf8") as f:
            writer = csv.DictWriter(f, fields, dialect="excel")
            writer.writeheader()
            for i in items:
                writer.writerow({"count": i.count, "text": i.text})
def save ( cls , path : Path , items : Iterable [ "SkippedLine" ] ) : fields = [ "count" , "text" ] path . parent . mkdir ( parents = True , exist_ok = True ) with open ( path , "wt" , newline = "" , encoding = "utf8" ) as f : writer = csv . DictWriter ( f , fields , dialect = "excel" ) writer . writeheader ( ) for i in items : writer . writerow ( { "count" : i . count , "text" : i . text } )
Save items to a csv file.
Save items to a csv file .
"""Save items to a csv file."""
cls
path
Path
items
Iterable["SkippedLine"]