Skip to content
Closed

478 #635

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Updated

- Tratando CNPJ formato 2026 nos métodos do utilitário cnpj (https://github.com/brazilian-utils/python/issues/478)

## [2.3.0] - 2025-10-07

### Added
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Verifica se os dígitos de verificação do CNPJ (Cadastro Nacional da Pessoa
Jurídica) fornecido correspondem ao seu número base. A entrada deve ser uma
string de dígitos com o comprimento apropriado. Esta função não verifica a
existência do CNPJ; ela só valida o formato da string.
OBS.: Já está tratando CNPJs no novo formato (2026)

Argumentos:

Expand All @@ -217,6 +218,8 @@ Exemplo:
>>> from brutils import is_valid_cnpj
>>> is_valid_cnpj('03560714000142')
True
>>> is_valid_cnpj('12ABC34501DE')
True
>>> is_valid_cnpj('00111222000133')
False
```
Expand All @@ -242,6 +245,8 @@ Exemplo:
>>> from brutils import format_cnpj
>>> format_cnpj("03560714000142")
'03.560.714/0001-42'
>>> format_cnpj("12ABC34501DE35")
'12.ABC.345/01DE-35'
>>> format_cnpj("98765432100100")
None
```
Expand Down Expand Up @@ -277,6 +282,7 @@ opcional pode ser fornecido; o padrão é 1.
Argumentos:

- branch (int): Um número de filial opcional a ser incluído no CNPJ.
- new_format (bool): Boolean para definir se o CNPJ será no novo formato (2026).

Retorna:

Expand All @@ -288,6 +294,8 @@ Exemplo:
>>> from brutils import generate_cnpj
>>> generate_cnpj()
'34665388000161'
>>> generate_cnpj(new_format=True)
'BDPDVE7250ZX31'
>>> generate_cnpj(1234)
"01745284123455"
```
Expand Down
8 changes: 8 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ Returns whether or not the verifying checksum digits of the given CNPJ
Input should be a digit string of proper length.
This function does not verify the existence of the CNPJ; it only
validates the format of the string.
P.S.: It's already included the new CNPJ version (2026)

Args:

Expand All @@ -218,6 +219,8 @@ Example:
>>> from brutils import is_valid_cnpj
>>> is_valid_cnpj('03560714000142')
True
>>> is_valid_cnpj('12ABC34501DE')
True
>>> is_valid_cnpj('00111222000133')
False
```
Expand All @@ -244,6 +247,8 @@ Example:
>>> from brutils import format_cnpj
>>> format_cnpj("03560714000142")
'03.560.714/0001-42'
>>> format_cnpj("12ABC34501DE35")
'12.ABC.345/01DE-35'
>>> format_cnpj("98765432100100")
None
```
Expand Down Expand Up @@ -279,6 +284,7 @@ string. An optional branch number parameter can be given; it defaults to 1.
Args:

- branch (int): An optional branch number to be included in the CNPJ.
- new_format (bool): Bool to use the new CNPJ version format (2026).

Returns:

Expand All @@ -290,6 +296,8 @@ Example:
>>> from brutils import generate_cnpj
>>> generate_cnpj()
'34665388000161'
>>> generate_cnpj(new_format=True)
'BDPDVE7250ZX31'
>>> generate_cnpj(1234)
"01745284123455"
```
Expand Down
Loading
Loading