Skip to content

Commit

Permalink
Merge pull request #427 from fyntex/dependabot/pip/black-23.1.0
Browse files Browse the repository at this point in the history
chore(deps-dev): Bump black from 22.12.0 to 23.1.0
  • Loading branch information
svillegas-cdd committed Mar 10, 2023
2 parents bf3a3bd + 84c1be0 commit 4c2fe17
Show file tree
Hide file tree
Showing 17 changed files with 10 additions and 37 deletions.
1 change: 0 additions & 1 deletion cl_sii/dte/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ def _text_strip_or_raise(xml_em: XmlElement) -> str:


def _set_dte_xml_missing_xmlns(xml_doc: XmlElement) -> Tuple[XmlElement, bool]:

# source: name of the XML element without namespace.
# cl_sii/data/ref/factura_electronica/schemas-xml/DTE_v10.xsd#L22 (f57a326)
# cl_sii/data/ref/factura_electronica/schemas-xml/EnvioDTE_v10.xsd#L92 (f57a326)
Expand Down
1 change: 0 additions & 1 deletion cl_sii/libs/dataclass_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def dc_deep_compare(value_a: object, value_b: object) -> DcDeepComparison:


def _dc_deep_compare_to(value_a: object, value_b: object) -> DcDeepComparison:

if type(value_a) != type(value_b):
raise TypeError("Values to be compared must be of the same type.")

Expand Down
1 change: 0 additions & 1 deletion cl_sii/libs/xml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def parse_untrusted_xml(value: bytes) -> XmlElement:

# warning: do NOT change the exception handling order.
try:

xml_root_em = defusedxml.lxml.fromstring(
text=value,
parser=None, # default: None (a custom one will be created)
Expand Down
1 change: 0 additions & 1 deletion cl_sii/rcv/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

@pydantic.dataclasses.dataclass(frozen=True)
class PeriodoTributario:

###########################################################################
# constants
###########################################################################
Expand Down
4 changes: 0 additions & 4 deletions cl_sii/rcv/parse_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ def to_detalle_entry(self, data: dict) -> RcvDetalleEntry:


class RcvVentaCsvRowSchema(_RcvCsvRowSchemaBase):

FIELD_FECHA_RECEPCION_DT_TZ = SII_OFFICIAL_TZ
FIELD_FECHA_ACUSE_DT_TZ = SII_OFFICIAL_TZ
FIELD_FECHA_RECLAMO_DT_TZ = SII_OFFICIAL_TZ
Expand Down Expand Up @@ -666,7 +665,6 @@ def to_detalle_entry(self, data: dict) -> RvDetalleEntry:


class RcvCompraRegistroCsvRowSchema(_RcvCsvRowSchemaBase):

FIELD_FECHA_RECEPCION_DT_TZ = SII_OFFICIAL_TZ
FIELD_FECHA_ACUSE_DT_TZ = SII_OFFICIAL_TZ

Expand Down Expand Up @@ -830,7 +828,6 @@ def to_detalle_entry(self, data: dict) -> RcNoIncluirDetalleEntry:


class RcvCompraReclamadoCsvRowSchema(_RcvCsvRowSchemaBase):

FIELD_FECHA_RECEPCION_DT_TZ = SII_OFFICIAL_TZ
FIELD_FECHA_RECLAMO_DT_TZ = SII_OFFICIAL_TZ

Expand Down Expand Up @@ -967,7 +964,6 @@ def to_detalle_entry(self, data: dict) -> RcReclamadoDetalleEntry:


class RcvCompraPendienteCsvRowSchema(_RcvCsvRowSchemaBase):

FIELD_FECHA_RECEPCION_DT_TZ = SII_OFFICIAL_TZ
FIELD_FECHA_ACUSE_DT_TZ = SII_OFFICIAL_TZ

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

-c requirements.txt

black==22.12.0
black==23.1.0
bumpversion==0.5.3
codecov==2.1.12
coverage==7.1.0
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
appdirs==1.4.4
# via virtualenv
black==22.12.0
black==23.1.0
# via -r requirements-dev.in
bleach==5.0.1
# via readme-renderer
Expand Down Expand Up @@ -66,6 +66,7 @@ mypy-extensions==0.4.3
packaging==23.0
# via
# -c requirements.txt
# black
# tox
pathspec==0.9.0
# via black
Expand Down
14 changes: 7 additions & 7 deletions tests/test_dte_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_FACTURA_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, False),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertEqual(result, expected)

def test_FACTURA_NO_AFECTA_O_EXENTA_ELECTRONICA(self) -> None:
Expand All @@ -52,7 +52,7 @@ def test_FACTURA_NO_AFECTA_O_EXENTA_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, False),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertTrue(result is expected)

def test_LIQUIDACION_FACTURA_ELECTRONICA(self) -> None:
Expand All @@ -70,7 +70,7 @@ def test_LIQUIDACION_FACTURA_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, False),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertEqual(result, expected)

def test_FACTURA_COMPRA_ELECTRONICA(self) -> None:
Expand All @@ -88,7 +88,7 @@ def test_FACTURA_COMPRA_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, True),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertTrue(result is expected)

def test_GUIA_DESPACHO_ELECTRONICA(self) -> None:
Expand All @@ -106,7 +106,7 @@ def test_GUIA_DESPACHO_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, False),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertTrue(result is expected)

def test_NOTA_DEBITO_ELECTRONICA(self) -> None:
Expand All @@ -124,7 +124,7 @@ def test_NOTA_DEBITO_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, False),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertTrue(result is expected)

def test_NOTA_CREDITO_ELECTRONICA(self) -> None:
Expand All @@ -142,5 +142,5 @@ def test_NOTA_CREDITO_ELECTRONICA(self) -> None:
(value.receptor_is_vendedor, False),
]

for (result, expected) in assertions:
for result, expected in assertions:
self.assertTrue(result is expected)
1 change: 0 additions & 1 deletion tests/test_extras_drf_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


class RutFieldTest(unittest.TestCase):

# TODO: implement!

pass
4 changes: 0 additions & 4 deletions tests/test_extras_mm_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class LoadMyMmSchema(marshmallow.Schema):
)

class MyMmSchemaStrict(marshmallow.Schema):

emisor_rut = RutField(
required=True,
data_key='RUT of Emisor',
Expand Down Expand Up @@ -110,7 +109,6 @@ def test_dump_ok_strange(self) -> None:
self.assertEqual(data, {})

def test_load_fail(self) -> None:

schema = self.LoadMyMmSchema()

data_invalid_1 = {'RUT of Emisor': '123123123123'}
Expand Down Expand Up @@ -252,7 +250,6 @@ def test_dump_ok_strange(self) -> None:
self.assertEqual(data, {})

def test_load_fail(self) -> None:

schema = self.LoadMyMmSchema()

data_invalid_1 = {'source field name': '123'}
Expand Down Expand Up @@ -406,7 +403,6 @@ def test_dump_ok_strange(self) -> None:
self.assertEqual(data, {})

def test_load_fail(self) -> None:

schema = self.LoadMyMmSchema()

data_invalid_1 = {'source field name': '123'}
Expand Down
3 changes: 0 additions & 3 deletions tests/test_libs_dataclass_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@

@dataclasses.dataclass
class DataclassA:

field_1: int = dataclasses.field()


@dataclasses.dataclass
class DataclassBWithoutMixin:

field_1: object = dataclasses.field()
field_2: Dict[str, object] = dataclasses.field()
field_3: tuple = dataclasses.field()
Expand All @@ -29,7 +27,6 @@ class DataclassBWithoutMixin:

@dataclasses.dataclass
class DataclassBWithMixin(DataclassBWithoutMixin, DcDeepCompareMixin):

pass


Expand Down
1 change: 0 additions & 1 deletion tests/test_libs_io_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def test_with_mode_x(self) -> None:
self.assertFalse(with_mode_text(f))

with tempfile.NamedTemporaryFile() as f:

self.assertTrue(isinstance(f, tempfile._TemporaryFileWrapper))
self.assertTrue(with_mode_binary(f))
self.assertFalse(with_mode_text(f))
Expand Down
1 change: 0 additions & 1 deletion tests/test_libs_json_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class FunctionReadJsonSchemaTest(unittest.TestCase):

# TODO: implement

pass
3 changes: 0 additions & 3 deletions tests/test_libs_xml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,18 @@ def test_type_error(self) -> None:


class FunctionReadXmlSchemaTest(unittest.TestCase):

# TODO: implement

pass


class FunctionValidateXmlDocTest(unittest.TestCase):

# TODO: implement

pass


class FunctionWriteXmlDocTest(unittest.TestCase):

# TODO: implement for function 'write_xml_doc'. Consider each of the "observations".
pass

Expand Down
5 changes: 0 additions & 5 deletions tests/test_rcv_parse_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,26 @@


class RcvVentaCsvRowSchemaTest(unittest.TestCase):

# TODO: implement for 'RcvVentaCsvRowSchema'.
pass


class RcvCompraRegistroCsvRowSchemaTest(unittest.TestCase):

# TODO: implement for 'RcvCompraRegistroCsvRowSchema'.
pass


class RcvCompraNoIncluirCsvRowSchemaTest(unittest.TestCase):

# TODO: implement for 'RcvCompraNoIncluirCsvRowSchema'.
pass


class RcvCompraReclamadoCsvRowSchemaTest(unittest.TestCase):

# TODO: implement for 'RcvCompraReclamadoCsvRowSchema'.
pass


class RcvCompraPendienteCsvRowSchemaTest(unittest.TestCase):

# TODO: implement for 'RcvCompraPendienteCsvRowSchema'.
pass

Expand Down
1 change: 0 additions & 1 deletion tests/test_rtc_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class TipoDteCediblesTest(unittest.TestCase):

# For 'TIPO_DTE_CEDIBLES'

def test_all_are_factura(self) -> None:
Expand Down
1 change: 0 additions & 1 deletion tests/test_rut.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class RutTest(unittest.TestCase):

valid_rut_canonical: str
valid_rut_dv: str
valid_rut_digits: str
Expand Down

0 comments on commit 4c2fe17

Please sign in to comment.