Skip to content

Commit

Permalink
1.0.1 - Correção nos tipos recebidos pela função
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarofpp committed Mar 18, 2019
1 parent 2b3e562 commit 0184a05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]",
description="Validate brazilian documents.",
Expand Down
2 changes: 1 addition & 1 deletion validate_docbr.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions validate_docbr/CNPJ.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .BaseDoc import BaseDoc
from random import sample
from typing import Union


class CNPJ(BaseDoc):
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 0184a05

Please sign in to comment.