Fixed imports.

This commit is contained in:
Franco Masotti 2021-07-08 18:56:20 +02:00
parent 7c90d42cc8
commit aa53e0ae02
Signed by: frnmst
GPG Key ID: 24116ED85666780A
6 changed files with 35 additions and 31 deletions

View File

@ -15,6 +15,7 @@
r"""conf.py."""
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

View File

@ -21,21 +21,20 @@
#
"""Python discovery file."""
from .api import (
is_xml_file_conforming_to_schema, parse_xml_file, get_invoice_filename,
is_p7m_file_signed, invoice_file_checksum_matches, get_remote_file,
get_ca_certificates, is_p7m_file_authentic, remove_signature_from_p7m_file,
extract_attachments_from_invoice_file, get_invoice_as_html,
patch_invoice_schema_file, create_appdirs,
define_appdirs_user_data_dir_file_path,
define_appdirs_user_config_dir_file_path, write_configuration_file,
assert_data_structure, asset_checksum_matches, pipeline)
from .cli import (CliInterface)
from .exceptions import (P7MFileDoesNotHaveACoherentCryptographicalSignature,
InvoiceFileChecksumFailed, P7MFileNotAuthentic,
from .api import (assert_data_structure, asset_checksum_matches,
create_appdirs, define_appdirs_user_config_dir_file_path,
define_appdirs_user_data_dir_file_path,
extract_attachments_from_invoice_file, get_ca_certificates,
get_invoice_as_html, get_invoice_filename, get_remote_file,
invoice_file_checksum_matches, is_p7m_file_authentic,
is_p7m_file_signed, is_xml_file_conforming_to_schema,
parse_xml_file, patch_invoice_schema_file, pipeline,
remove_signature_from_p7m_file, write_configuration_file)
from .cli import CliInterface
from .exceptions import (AssetsChecksumDoesNotMatch,
CannotExtractOriginalP7MFile,
MissingTagInMetadataFile,
XMLFileNotConformingToSchema,
ExtractedAttachmentNotInExtensionWhitelist,
ExtractedAttachmentNotInFileTypeWhitelist,
AssetsChecksumDoesNotMatch)
InvoiceFileChecksumFailed, MissingTagInMetadataFile,
P7MFileDoesNotHaveACoherentCryptographicalSignature,
P7MFileNotAuthentic, XMLFileNotConformingToSchema)

View File

@ -23,6 +23,7 @@
import sys
import traceback
from .cli import CliInterface

View File

@ -21,28 +21,29 @@
#
"""The main file."""
import shlex
import lxml.etree as ET
import hashlib
import requests
import base64
import hashlib
import pathlib
import tempfile
import shlex
import shutil
import tempfile
import appdirs
import atomicwrites
import filetype
import appdirs
import yaml
import fpyutils
from .exceptions import (P7MFileDoesNotHaveACoherentCryptographicalSignature,
InvoiceFileChecksumFailed, P7MFileNotAuthentic,
import lxml.etree as ET
import requests
import yaml
from . import constants as const
from .exceptions import (AssetsChecksumDoesNotMatch,
CannotExtractOriginalP7MFile,
MissingTagInMetadataFile,
XMLFileNotConformingToSchema,
ExtractedAttachmentNotInExtensionWhitelist,
ExtractedAttachmentNotInFileTypeWhitelist,
AssetsChecksumDoesNotMatch)
from . import constants as const
InvoiceFileChecksumFailed, MissingTagInMetadataFile,
P7MFileDoesNotHaveACoherentCryptographicalSignature,
P7MFileNotAuthentic, XMLFileNotConformingToSchema)
#######
# API #

View File

@ -22,9 +22,11 @@
"""Command line interface file."""
import argparse
import textwrap
import sys
from pkg_resources import (get_distribution, DistributionNotFound)
import textwrap
from pkg_resources import DistributionNotFound, get_distribution
from .api import pipeline
PROGRAM_DESCRIPTION = 'fattura-elettronica-reader: Validate, extract, and generate printables\nof electronic invoice files received from the "Sistema di Interscambio"\nas well as other P7M files'

View File

@ -20,7 +20,7 @@
#
"""setup."""
from setuptools import setup, find_packages
from setuptools import find_packages, setup
setup(
name='fattura_elettronica_reader',