Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
is_valid_phoneaceitava números de telefone escritos com dígitos de outros alfabetos, porque as expressões regulares de_is_valid_mobilee_is_valid_landlineusam\d, que em Python corresponde a qualquer dígito Unicode. Por exemplo,is_valid("119" + "٩" * 8, type="mobile")retornavaTrue(o٩é o nove do alfabeto arábico-índico). Este PR compila as duas regex comre.ASCII, fazendo\dcorresponder apenas a dígitos de 0 a 9, no mesmo espírito da correção do CEP na #803/#805.Mudanças Propostas
re.ASCIIàs regex de_is_valid_mobilee_is_valid_landlineembrutils/phone.py.test_is_validcobrindo números válidos, dígitos de outros alfabetos (٩, fullwidth9) e dígitos sobrescritos (⁵,³).phone_number.Unreleased → Fixed.Checklist de Revisão
Declaração de Uso de IA (OBRIGATÓRIA)
Ferramenta utilizada: Claude Code (Anthropic), para investigação do bug, implementação e testes, com revisão e verificação manual dos resultados.
Comentários Adicionais (opcional)
Os testes do módulo
ibge(test_get_municipality_by_code_gzip_erroretest_get_municipality_by_code_gzip_generic_error) falham localmente também na branchmainsem nenhuma modificação, por dependerem de rede/ambiente; não têm relação com esta mudança.Issue Relacionada
Closes #807