mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-10-24 18:27:01 +02:00
When a CSV or TSV file was not perfectly rectangular, `csv.Sniffer` either raised "Could not determine delimiter" (single-column files) or returned a nonsense delimiter such as "a" for "id,name\n1,Cleo,extra". The latter silently turned the header into a single column called "id,n" and broke the documented extra-field handling. Treat an alphanumeric sniffed delimiter as a failed sniff and fall back to whichever of comma or tab appears on the most lines, using comma when neither appears (a single-column file). Well-formed files are unaffected. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| cli.py | ||
| create_table_parser.py | ||
| db.py | ||
| hookspecs.py | ||
| migrations.py | ||
| plugins.py | ||
| py.typed | ||
| recipes.py | ||
| utils.py | ||