diff --git a/csvmeta/__init__.py b/csvmeta/__init__.py index 9d4bab5..05dc44d 100644 --- a/csvmeta/__init__.py +++ b/csvmeta/__init__.py @@ -2,4 +2,4 @@ from csvmeta.write import DEFAULT_DIALECT, write __all__ = ["read", "metadata", "write", "DEFAULT_DIALECT"] -__version__ = "1.1.1" +__version__ = "1.1.2" diff --git a/csvmeta/write.py b/csvmeta/write.py index d5a4a7a..e292308 100644 --- a/csvmeta/write.py +++ b/csvmeta/write.py @@ -5,7 +5,14 @@ _DialectType = Union[str, dict] -DEFAULT_DIALECT = "unix" +DEFAULT_DIALECT = { + "delimiter": ",", + "quotechar": '"', + "doublequote": True, + "skipinitialspace": False, + "lineterminator": "\n", + "quoting": csv.QUOTE_ALL, +} def write( diff --git a/pyproject.toml b/pyproject.toml index 0ad2c7e..f020b97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "csvmeta" -version = "1.1.1" +version = "1.1.2" description = "Lightweight csv read/write, keeping track of csv dialect and other metadata." authors = [{ name = "Olivier Binette", email = "olivier@olivierbinette.ca" }] readme = "README.md" diff --git a/tests/conftest.py b/tests/conftest.py index bcd18f6..3462fe4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,10 @@ import pytest +import csvmeta + DIALECTS_LIST = [ + csvmeta.DEFAULT_DIALECT, "excel", "unix", {"delimiter": "|", "escapechar": "\\", "quotechar": "'", "quoting": csv.QUOTE_NONE, "lineterminator": "\n"},