csv delimiter fix
This commit is contained in:
parent
3046b1ee7b
commit
fbdb6f9f5a
2 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "support_formatter"
|
||||
version = "0.1.0-a.1"
|
||||
version = "0.1.0-a.2"
|
||||
requires-python = ">= 3.10"
|
||||
authors = [{name = "Firq", email = "firelp42@gmail.com"}]
|
||||
maintainers = [{name = "Firq", email = "firelp42@gmail.com"}]
|
||||
|
|
|
@ -15,7 +15,10 @@ def process_csv(path: pathlib.Path):
|
|||
data, entries = {}, []
|
||||
|
||||
with open(path, "r") as csv_file:
|
||||
csv_reader = csv.DictReader(csv_file)
|
||||
dialect = csv.Sniffer().sniff(csv_file.read(1024), delimiters=";,")
|
||||
csv_file.seek(0)
|
||||
|
||||
csv_reader = csv.DictReader(csv_file, dialect=dialect)
|
||||
csv_type = determine_type(csv_reader.fieldnames)
|
||||
|
||||
if csv_type == "unknown":
|
||||
|
|
Loading…
Reference in a new issue