Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
satcfdi committed Jan 12, 2024
1 parent ff19994 commit dfeb96b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion satdigitalinvoice/file_data_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import os
import re
from datetime import date
from decimal import Decimal

import jsonschema as jsonschema
Expand Down Expand Up @@ -147,7 +148,7 @@ def deep_complement(destination, source):
class FacturasManager(LocalData):
file_source = "facturas.yaml"

def __init__(self, dp: DatePeriod | None):
def __init__(self, dp: DatePeriod | date | None):
def loading_function(loader, node):
cases = loader.construct_mapping(node, deep=True)
if dp is None:
Expand Down
2 changes: 2 additions & 0 deletions satdigitalinvoice/schemas/producto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ properties:
type: [string, object]
Detalle:
type: string
Metros:
type: number
Concepto:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion satdigitalinvoice/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def cert_info(signer: Signer):
}


def find_best_match(cases, dp: DatePeriod) -> (date, object):
def find_best_match(cases, dp: DatePeriod | date) -> (date, object):
fk, fv = (None, None)
for k, v in cases.items():
k = datetime.strptime(k, '%Y-%m').date()
Expand Down

0 comments on commit dfeb96b

Please sign in to comment.