Skip to content

Commit

Permalink
[IMP] edi_oca: pre-commit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiMForgeFlow committed Oct 24, 2024
1 parent b4fe58c commit 1dca94e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion edi_oca/models/edi_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def _validate_data(self, exchange_record, value=None, **kw):
if not exchange_record.type_id.allow_empty_files_on_receive:
raise ValueError(
_(
"Empty files are not allowed for exchange type %(name)s (%(code)s)"
"Empty files are not allowed for exchange "
"type %(name)s (%(code)s)"
)
% {
"name": exchange_record.type_id.name,
Expand Down
6 changes: 4 additions & 2 deletions edi_oca/models/edi_exchange_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ class EDIExchangeType(models.Model):
("surrogateescape", "Replace Byte with Individual Surrogate Code"),
("xmlcharrefreplace", "Replace with XML/HTML Numeric Character Reference"),
],
help="Handling of encoding errors on generate (default is always 'Raise Error').",
help="Handling of encoding errors on generate "
"(default is always 'Raise Error').",
)
# https://docs.python.org/3/library/codecs.html#codec-base-classes
encoding_in_error_handler = fields.Selection(
Expand All @@ -180,7 +181,8 @@ class EDIExchangeType(models.Model):
("backslashreplace", "Replace with Backslashed Escape Sequences"),
("surrogateescape", "Replace Byte with Individual Surrogate Code"),
],
help="Handling of decoding errors on process (default is always 'Raise Error').",
help="Handling of decoding errors on process "
"(default is always 'Raise Error').",
)
allow_empty_files_on_receive = fields.Boolean(string="Allow Empty Files")

Expand Down

0 comments on commit 1dca94e

Please sign in to comment.