From 0184a05568e86bbe06e0182899856deab36fef7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Ferreira=20Pires=20de=20Paiva?= Date: Mon, 18 Mar 2019 13:03:06 -0300 Subject: [PATCH] =?UTF-8?q?1.0.1=20-=20Corre=C3=A7=C3=A3o=20nos=20tipos=20?= =?UTF-8?q?recebidos=20pela=20fun=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 2 +- validate_docbr.egg-info/PKG-INFO | 2 +- validate_docbr/CNPJ.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 105267a..cade9a3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="validate_docbr", - version="1.0.0", + version="1.0.1", author="Álvaro Ferreira Pires de Paiva", author_email="alvarofepipa@gmail.com", description="Validate brazilian documents.", diff --git a/validate_docbr.egg-info/PKG-INFO b/validate_docbr.egg-info/PKG-INFO index 35409a0..eb17de6 100644 --- a/validate_docbr.egg-info/PKG-INFO +++ b/validate_docbr.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: validate-docbr -Version: 1.0.0 +Version: 1.0.1 Summary: Validate brazilian documents. Home-page: https://github.com/alvarofpp/validate-docbr Author: Álvaro Ferreira Pires de Paiva diff --git a/validate_docbr/CNPJ.py b/validate_docbr/CNPJ.py index d0e1a4f..018e6e3 100644 --- a/validate_docbr/CNPJ.py +++ b/validate_docbr/CNPJ.py @@ -1,5 +1,6 @@ from .BaseDoc import BaseDoc from random import sample +from typing import Union class CNPJ(BaseDoc): @@ -39,7 +40,7 @@ def generate(self, mask: bool = False) -> str: return cnpj - def _generate_first_digit(self, doc: (str, list)) -> str: + def _generate_first_digit(self, doc: Union[str, list]) -> str: """Gerar o primeiro dígito verificador do CNPJ.""" sum = 0 @@ -55,7 +56,7 @@ def _generate_first_digit(self, doc: (str, list)) -> str: return str(sum) - def _generate_second_digit(self, doc: (str, list)) -> str: + def _generate_second_digit(self, doc: Union[str, list]) -> str: """Gerar o segundo dígito verificador do CNPJ.""" sum = 0