Fix: Formateo PEP8 (79 cols) y limpieza flake8 en paquete facho
- Líneas >79 cols reajustadas en todo el paquete - Fix F821: etree.cleanup_namespaces(security) en signature.py (era 'header', NameError) - Fix bug cune_xpath -> xpath en nomina/informacion_general() (NameError) - Elimina clase TaxScheme duplicada en form/__init__.py - Imports explícitos (F403/F405) y __all__ en form_xml/invoice.py, nomina - Elimina imports y variables muertas (F401/F841), E712 (== None -> is None)
This commit is contained in:
@@ -6,16 +6,19 @@ from .. import form
|
||||
from ..fe import fe_from_string
|
||||
from datetime import datetime
|
||||
|
||||
def billing_reference(xmldocument: str, klass: form.BillingReference) -> form.BillingReference:
|
||||
|
||||
def billing_reference(
|
||||
xmldocument: str,
|
||||
klass: form.BillingReference) -> form.BillingReference:
|
||||
"""
|
||||
construye BillingReference desde XMLDOCUMENT
|
||||
usando KLASS como clase.
|
||||
"""
|
||||
if not issubclass(klass, form.BillingReference):
|
||||
raise TypeError('klass expected subclass of BillingReference')
|
||||
|
||||
|
||||
fachoxml = fe_from_string(xmldocument)
|
||||
|
||||
|
||||
uid = fachoxml.get_element_text('./cbc:ID')
|
||||
uuid = fachoxml.get_element_text('./cbc:UUID')
|
||||
issue_date = fachoxml.get_element_text('./cbc:IssueDate')
|
||||
|
||||
Reference in New Issue
Block a user