Quote all non-numeric CSV output

This commit is contained in:
Michael Hohn
2022-08-10 17:44:29 -07:00
committed by =Michael Hohn
parent 03a9ef0477
commit 235acf6b93
3 changed files with 6 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ from sarif_cli import signature, signature_single
from sarif_cli import typegraph
from sarif_cli import snowflake_id
import argparse
import csv
import dataclasses as dc
import json
import logging
@@ -208,7 +209,7 @@ p.mkdir(exist_ok=True)
def write(path, frame):
with p.joinpath(path + ".csv").open(mode='wb') as fh:
frame.to_csv(fh, index=False)
frame.to_csv(fh, index=False, quoting=csv.QUOTE_NONNUMERIC)
def _write_dataframes_of(tables_dataclass):
for field in dc.fields(tables_dataclass):