Skip to content

Commit 267c1a5

Browse files
authored
Merge pull request #117 from fyntex/release/v0.10.0
Release v0.10.0
2 parents d84d127 + a2adc48 commit 267c1a5

File tree

6 files changed

+29
-49
lines changed

6 files changed

+29
-49
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.10.0.a3
2+
current_version = 0.10.0
33
commit = True
44
tag = True
55

HISTORY.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
History
44
-------
55

6+
0.10.0 (2020-04-14)
7+
+++++++++++++++++++++++
8+
9+
0.10.0.a3
10+
~~~~~~~~~~~~~~~~~~~~~~
11+
12+
* (PR #116, 2020-04-14) rcv.data_models: remove unnecessary fields
13+
* (PR #114, 2020-04-14) rcv.parse_csv: remove param ``razon_social`` from parse functions
14+
15+
0.10.0.a2
16+
~~~~~~~~~~~~~~~~~~~~~~
17+
18+
* (PR #112, 2020-04-14) data_models: make some fields optional
19+
20+
0.10.0.a1
21+
~~~~~~~~~~~~~~~~~~~~~~
22+
23+
* (PR #110, 2020-04-13) rcv.data_models: move some fields to subclasses
24+
* (PR #109, 2020-04-13) rcv.parse_csv: move code from 'fd-cl-data' in here
25+
* (PR #108, 2020-04-13) dte.data_models: add 'DteXmlData'
26+
* (PR #107, 2020-04-10) requirements: several updates
27+
628
0.9.1 (2020-03-20)
729
+++++++++++++++++++++++
830

cl_sii/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"""
66

77

8-
__version__ = '0.10.0.a3'
8+
__version__ = '0.10.0'

cl_sii/rcv/data_models.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ class RvDetalleEntry(RcvDetalleEntry):
224224
RCV_KIND = RcvKind.VENTAS
225225
RC_ESTADO_CONTABLE = None
226226

227-
emisor_razon_social: Optional[str] = dc_field()
228-
"""
229-
"Razón social" (legal name) of the "emisor" of the "documento".
230-
"""
231-
232227
# TODO: docstring
233228
# TODO: can it be None? What happens for those "tipo docto" that do not have a receptor?
234229
receptor_razon_social: str = dc_field()
@@ -244,11 +239,6 @@ class RvDetalleEntry(RcvDetalleEntry):
244239
def __post_init__(self) -> None:
245240
super().__post_init__()
246241

247-
if self.emisor_razon_social is not None:
248-
if not isinstance(self.emisor_razon_social, str):
249-
raise TypeError("Inappropriate type of 'emisor_razon_social'.")
250-
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.emisor_razon_social)
251-
252242
if not isinstance(self.receptor_razon_social, str):
253243
raise TypeError("Inappropriate type of 'receptor_razon_social'.")
254244
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.receptor_razon_social)
@@ -279,10 +269,6 @@ class RcRegistroDetalleEntry(RcvDetalleEntry):
279269
"Razón social" (legal name) of the "emisor" of the "documento".
280270
"""
281271

282-
# TODO: docstring
283-
# TODO: can it be None? What happens for those "tipo docto" that do not have a receptor?
284-
receptor_razon_social: Optional[str] = dc_field()
285-
286272
# TODO: docstring
287273
# note: must be timezone-aware.
288274
fecha_acuse_dt: Optional[datetime] = dc_field()
@@ -294,11 +280,6 @@ def __post_init__(self) -> None:
294280
raise TypeError("Inappropriate type of 'emisor_razon_social'.")
295281
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.emisor_razon_social)
296282

297-
if self.receptor_razon_social is not None:
298-
if not isinstance(self.receptor_razon_social, str):
299-
raise TypeError("Inappropriate type of 'receptor_razon_social'.")
300-
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.receptor_razon_social)
301-
302283
if self.fecha_acuse_dt is not None:
303284
if not isinstance(self.fecha_acuse_dt, datetime):
304285
raise TypeError("Inappropriate type of 'fecha_acuse_dt'.")
@@ -331,10 +312,6 @@ class RcReclamadoDetalleEntry(RcvDetalleEntry):
331312
"Razón social" (legal name) of the "emisor" of the "documento".
332313
"""
333314

334-
# TODO: docstring
335-
# TODO: can it be None? What happens for those "tipo docto" that do not have a receptor?
336-
receptor_razon_social: Optional[str] = dc_field()
337-
338315
# TODO: docstring
339316
# note: must be timezone-aware.
340317
fecha_reclamo_dt: Optional[datetime] = dc_field()
@@ -346,11 +323,6 @@ def __post_init__(self) -> None:
346323
raise TypeError("Inappropriate type of 'emisor_razon_social'.")
347324
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.emisor_razon_social)
348325

349-
if self.receptor_razon_social is not None:
350-
if not isinstance(self.receptor_razon_social, str):
351-
raise TypeError("Inappropriate type of 'receptor_razon_social'.")
352-
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.receptor_razon_social)
353-
354326
if self.fecha_reclamo_dt is not None:
355327
if not isinstance(self.fecha_reclamo_dt, datetime):
356328
raise TypeError("Inappropriate type of 'fecha_reclamo_dt'.")
@@ -372,18 +344,9 @@ class RcPendienteDetalleEntry(RcvDetalleEntry):
372344
"Razón social" (legal name) of the "emisor" of the "documento".
373345
"""
374346

375-
# TODO: docstring
376-
# TODO: can it be None? What happens for those "tipo docto" that do not have a receptor?
377-
receptor_razon_social: Optional[str] = dc_field()
378-
379347
def __post_init__(self) -> None:
380348
super().__post_init__()
381349

382350
if not isinstance(self.emisor_razon_social, str):
383351
raise TypeError("Inappropriate type of 'emisor_razon_social'.")
384352
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.emisor_razon_social)
385-
386-
if self.receptor_razon_social is not None:
387-
if not isinstance(self.receptor_razon_social, str):
388-
raise TypeError("Inappropriate type of 'receptor_razon_social'.")
389-
cl_sii.dte.data_models.validate_contribuyente_razon_social(self.receptor_razon_social)

cl_sii/rcv/parse_csv.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,6 @@ def to_detalle_entry(self, data: dict) -> RvDetalleEntry:
656656
receptor_rut=receptor_rut,
657657
monto_total=monto_total,
658658
receptor_razon_social=receptor_razon_social,
659-
# FIXME: remove after field 'emisor_razon_social' is removed from the dataclass
660-
emisor_razon_social=None,
661659
fecha_recepcion_dt=fecha_recepcion_dt,
662660
fecha_acuse_dt=fecha_acuse_dt,
663661
fecha_reclamo_dt=fecha_reclamo_dt,
@@ -791,8 +789,6 @@ def to_detalle_entry(self, data: dict) -> RcRegistroDetalleEntry:
791789
receptor_rut=receptor_rut,
792790
monto_total=monto_total,
793791
emisor_razon_social=emisor_razon_social,
794-
# FIXME: remove after field 'receptor_razon_social' is removed from the dataclass
795-
receptor_razon_social=None,
796792
fecha_recepcion_dt=fecha_recepcion_dt,
797793
fecha_acuse_dt=fecha_acuse_dt,
798794
)
@@ -827,8 +823,6 @@ def to_detalle_entry(self, data: dict) -> RcNoIncluirDetalleEntry:
827823
receptor_rut=receptor_rut,
828824
monto_total=monto_total,
829825
emisor_razon_social=emisor_razon_social,
830-
# FIXME: remove after field 'receptor_razon_social' is removed from the dataclass
831-
receptor_razon_social=None,
832826
fecha_recepcion_dt=fecha_recepcion_dt,
833827
fecha_acuse_dt=fecha_acuse_dt,
834828
)
@@ -967,8 +961,6 @@ def to_detalle_entry(self, data: dict) -> RcReclamadoDetalleEntry:
967961
receptor_rut=receptor_rut,
968962
monto_total=monto_total,
969963
emisor_razon_social=emisor_razon_social,
970-
# FIXME: remove after field 'receptor_razon_social' is removed from the dataclass
971-
receptor_razon_social=None,
972964
fecha_recepcion_dt=fecha_recepcion_dt,
973965
fecha_reclamo_dt=fecha_reclamo_dt,
974966
)
@@ -1090,8 +1082,6 @@ def to_detalle_entry(self, data: dict) -> RcPendienteDetalleEntry:
10901082
receptor_rut=receptor_rut,
10911083
monto_total=monto_total,
10921084
emisor_razon_social=emisor_razon_social,
1093-
# FIXME: remove after field 'receptor_razon_social' is removed from the dataclass
1094-
receptor_razon_social=None,
10951085
fecha_recepcion_dt=fecha_recepcion_dt,
10961086
)
10971087
except (TypeError, ValueError):

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ disallow_untyped_defs = True
2727
check_untyped_defs = True
2828
warn_return_any = True
2929

30+
show_column_numbers = True
31+
show_error_codes = True
32+
show_error_context = True
33+
error_summary = True
34+
3035
[mypy-cryptography.*]
3136
ignore_missing_imports = True
3237

0 commit comments

Comments
 (0)