feat(Data Import): custom csv delimiters, UTF-8 BOM handling by vmatt [frappe] PR#26183
From: https://github.com/frappe/frappe/pull/26183
Date: 2024-05-15 16:29:55+05:30
- chore: update labels and a comment
- fix: comments
- chore(doctype/file): update comments
- chore(csvutils): update messages
- feat: CSV import introduce FILE_ENCODING_OPTIONS constant in file.py, cleanup
- fix: fallback to ',' when delimiter_options not defined
- feat(Data Import): custom delimiters
Diagnostics
pre-commit failed for source commit: 45eabd32cd239b1d2c67e85b546b59d4b8f32924
Run ruff linter..........................................................Failed
- hook id: ruff
- exit code: 1
frappe/core/doctype/data_import/data_import.py:301:18: RUF005 Consider iterable unpacking instead of concatenation
frappe/core/doctype/data_import/importer.py:498:11: RUF005 Consider `[row.row_number, *row.as_list()]` instead of concatenation
frappe/utils/csvutils.py:15:22: F821 Undefined name `QUOTE_NONNUMERIC`
frappe/utils/csvutils.py:16:15: F821 Undefined name `QUOTE_ALL`
frappe/utils/csvutils.py:17:19: F821 Undefined name `QUOTE_MINIMAL`
frappe/utils/csvutils.py:18:16: F821 Undefined name `QUOTE_NONE`
Found 6 errors.
No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).
pre-commit failed for source commit: d3cfa26be7957204aa6b9a77650182c9a41f0a31
Run ruff linter..........................................................Failed
- hook id: ruff
- exit code: 1
frappe/core/doctype/data_import/data_import.py:301:18: RUF005 Consider iterable unpacking instead of concatenation
Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
pre-commit failed for source commit: e69093c82b075f43b4dc5085d123f22fc11cb840
Run ruff linter..........................................................Failed
- hook id: ruff
- exit code: 1
frappe/utils/csvutils.py:16:22: F821 Undefined name `QUOTE_NONNUMERIC`
frappe/utils/csvutils.py:17:15: F821 Undefined name `QUOTE_ALL`
frappe/utils/csvutils.py:18:19: F821 Undefined name `QUOTE_MINIMAL`
frappe/utils/csvutils.py:19:16: F821 Undefined name `QUOTE_NONE`
Found 4 errors.
pre-commit failed for source commit: 123844b10d61cb3cb8846ca844a159f1ccf53602
Run ruff linter..........................................................Failed
- hook id: ruff
- exit code: 1
frappe/utils/csvutils.py:16:22: F821 Undefined name `QUOTE_NONNUMERIC`
frappe/utils/csvutils.py:17:15: F821 Undefined name `QUOTE_ALL`
frappe/utils/csvutils.py:18:19: F821 Undefined name `QUOTE_MINIMAL`
frappe/utils/csvutils.py:19:16: F821 Undefined name `QUOTE_NONE`
Found 4 errors.
Checkout instructions
# Checkout locally
git fetch upstream
git switch ft-pr-26183
# Alternatively, re-take the changes
git switch develop
ft take ft-pr-26183
# Make changes then rebase
git rebase -i develop
# Fix or ignore conflicts
git checkout --theirs .
git rebase --continue
# Force-push changes
git push --force-with-lease