Fix: Formateo PEP8 (79 cols) y limpieza flake8 en tests y examples
- Líneas >79 cols reajustadas (asserts, strings CUDE/CUDS, comentarios) - Elimina imports y variables muertas (F401/F841), E712 (== False -> is False) - Reordena imports en docs/conf.py
This commit is contained in:
@@ -2,6 +2,7 @@ import pytest
|
||||
import facho.fe.form as form
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def simple_debit_note_without_lines():
|
||||
inv = form.DebitNote(form.InvoiceDocumentReference(
|
||||
@@ -15,7 +16,7 @@ def simple_debit_note_without_lines():
|
||||
inv.set_supplier(form.Party(
|
||||
name='facho-supplier',
|
||||
ident=form.PartyIdentification('123', '', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
@@ -36,38 +37,47 @@ def simple_debit_note_without_lines():
|
||||
))
|
||||
return inv
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def simple_credit_note_without_lines():
|
||||
inv = form.CreditNote(form.InvoiceDocumentReference('1234', 'xx', datetime.now()))
|
||||
inv = form.CreditNote(
|
||||
form.InvoiceDocumentReference(
|
||||
'1234', 'xx', datetime.now()))
|
||||
inv.set_period(datetime.now(), datetime.now())
|
||||
inv.set_issue(datetime.now())
|
||||
inv.set_ident('ABC123')
|
||||
inv.set_operation_type('20')
|
||||
inv.set_payment_mean(form.PaymentMean(form.PaymentMean.DEBIT, '41', datetime.now(), '1234'))
|
||||
inv.set_payment_mean(
|
||||
form.PaymentMean(
|
||||
form.PaymentMean.DEBIT,
|
||||
'41',
|
||||
datetime.now(),
|
||||
'1234'))
|
||||
inv.set_supplier(form.Party(
|
||||
name = 'facho-supplier',
|
||||
ident = form.PartyIdentification('123','', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_regime_code = '48',
|
||||
organization_code = '1',
|
||||
address = form.Address(
|
||||
name='facho-supplier',
|
||||
ident=form.PartyIdentification('123', '', '31'),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
'', '', form.City('05001', 'Medellín'),
|
||||
form.Country('CO', 'Colombia'),
|
||||
form.CountrySubentity('05', 'Antioquia'))
|
||||
))
|
||||
inv.set_customer(form.Party(
|
||||
name = 'facho-customer',
|
||||
ident = form.PartyIdentification('321', '', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_regime_code = '48',
|
||||
organization_code = '1',
|
||||
address = form.Address(
|
||||
name='facho-customer',
|
||||
ident=form.PartyIdentification('321', '', '31'),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
'', '', form.City('05001', 'Medellín'),
|
||||
form.Country('CO', 'Colombia'),
|
||||
form.CountrySubentity('05', 'Antioquia'))
|
||||
))
|
||||
return inv
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def simple_invoice_without_lines():
|
||||
inv = form.NationalSalesInvoice()
|
||||
@@ -75,25 +85,30 @@ def simple_invoice_without_lines():
|
||||
inv.set_issue(datetime.now())
|
||||
inv.set_ident('ABC123')
|
||||
inv.set_operation_type('10')
|
||||
inv.set_payment_mean(form.PaymentMean(form.PaymentMean.DEBIT, '41', datetime.now(), '1234'))
|
||||
inv.set_payment_mean(
|
||||
form.PaymentMean(
|
||||
form.PaymentMean.DEBIT,
|
||||
'41',
|
||||
datetime.now(),
|
||||
'1234'))
|
||||
inv.set_supplier(form.Party(
|
||||
name = 'facho-supplier',
|
||||
ident = form.PartyIdentification('123','', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_regime_code = '48',
|
||||
organization_code = '1',
|
||||
address = form.Address(
|
||||
name='facho-supplier',
|
||||
ident=form.PartyIdentification('123', '', '31'),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
'', '', form.City('05001', 'Medellín'),
|
||||
form.Country('CO', 'Colombia'),
|
||||
form.CountrySubentity('05', 'Antioquia'))
|
||||
))
|
||||
inv.set_customer(form.Party(
|
||||
name = 'facho-customer',
|
||||
ident = form.PartyIdentification('321', '', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_regime_code = '48',
|
||||
organization_code = '1',
|
||||
address = form.Address(
|
||||
name='facho-customer',
|
||||
ident=form.PartyIdentification('321', '', '31'),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
'', '', form.City('05001', 'Medellín'),
|
||||
form.Country('CO', 'Colombia'),
|
||||
form.CountrySubentity('05', 'Antioquia'))
|
||||
@@ -108,25 +123,30 @@ def simple_invoice():
|
||||
inv.set_issue(datetime.now())
|
||||
inv.set_ident('ABC123')
|
||||
inv.set_operation_type('10')
|
||||
inv.set_payment_mean(form.PaymentMean(form.PaymentMean.DEBIT, '41', datetime.now(), ' 1234'))
|
||||
inv.set_payment_mean(
|
||||
form.PaymentMean(
|
||||
form.PaymentMean.DEBIT,
|
||||
'41',
|
||||
datetime.now(),
|
||||
' 1234'))
|
||||
inv.set_supplier(form.Party(
|
||||
name = 'facho-supplier',
|
||||
ident = form.PartyIdentification('123','', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_regime_code = '48',
|
||||
organization_code = '1',
|
||||
address = form.Address(
|
||||
name='facho-supplier',
|
||||
ident=form.PartyIdentification('123', '', '31'),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
'', '', form.City('05001', 'Medellín'),
|
||||
form.Country('CO', 'Colombia'),
|
||||
form.CountrySubentity('05', 'Antioquia'))
|
||||
))
|
||||
inv.set_customer(form.Party(
|
||||
name = 'facho-customer',
|
||||
ident = form.PartyIdentification('321','', '31'),
|
||||
responsability_code = form.Responsability(['ZZ']),
|
||||
responsability_regime_code = '48',
|
||||
organization_code = '1',
|
||||
address = form.Address(
|
||||
name='facho-customer',
|
||||
ident=form.PartyIdentification('321', '', '31'),
|
||||
responsability_code=form.Responsability(['ZZ']),
|
||||
responsability_regime_code='48',
|
||||
organization_code='1',
|
||||
address=form.Address(
|
||||
'', '', form.City('05001', 'Medellín'),
|
||||
form.Country('CO', 'Colombia'),
|
||||
form.CountrySubentity('05', 'Antioquia'))
|
||||
@@ -136,7 +156,7 @@ def simple_invoice():
|
||||
quantity=form.Quantity(1, '94'),
|
||||
description='productofacho',
|
||||
item=form.StandardItem(9999),
|
||||
price=form.Price(form.Amount(100.0),'01',''),
|
||||
price=form.Price(form.Amount(100.0), '01', ''),
|
||||
tax=form.TaxTotal(
|
||||
tax_amount=form.Amount(0.0),
|
||||
taxable_amount=form.Amount(0.0),
|
||||
|
||||
Reference in New Issue
Block a user