Repository: brazilian-utils/brutils-python (python)

Issue:
Adicionar a </div> que foi retirado por engano do README.md

Pull request:
Arrumando README.md
## Descrição
<!--- Descreva de forma sucinta e clara qual é o propósito deste Pull Request. Explique o que ele faz ou resolve.-->
Quebrei com a ultima mudanca, tirei o `</div>`

## Mudanças Propostas
<!--- Liste as principais alterações ou melhorias que estão sendo propostas neste Pull Request.

- Adicionei o `</div>` que tinha tirado por engano no README.md

## Checklist de Revisão
<!--- Marque as caixas que se aplicam. Você pode deixar caixas desmarcadas se elas não se aplicarem.-->

- [x] Os testes foram adicionados ou atualizados para refletir as mudanças (se aplicável).
- [x] Foi adicionada uma entrada no changelog / Meu PR não necessita de uma nova entrada no changelog.
- [x] A documentação em português foi atualizada ou criada, se necessário.
- [x] Se feita a documentação, a atualização do arquivo em inglês. <!---Permitido uso de Google Tradutor/ChatGPT. -->
- [x] Eu documentei as minhas mudanças no código, adicionando docstrings e comentários. [Instruções](https://github.com/brazilian-utils/brutils-python/blob/main/CONTRIBUTING.md#8-fa%C3%A7a-as-suas-altera%C3%A7%C3%B5es)
- [x] O código segue as diretrizes de estilo e padrões de codificação do projeto.
- [x] Todos os testes passam. [Instruções](https://github.com/brazilian-utils/brutils-python/blob/main/CONTRIBUTING.md#testes)
- [x] O Pull Request foi testado localmente. [Instruções](https://github.com/brazilian-utils/brutils-python/blob/main/CONTRIBUTING.md#7-execute-o-brutils-localmente)
- [x] Não há conflitos de mesclagem.


## Comentários Adicionais (opcional)
<!--- Adicione qualquer informação adicional ou contexto que você acha importante para os revisores entenderem suas mudanças.-->

## Issue Relacionada
<!---Todos os PRs devem ter uma issue relacionada. Dessa forma, podemos garantir que ninguém perca tempo trabalhando em algo que não precisa ser feito. -->


Closes #200


Patch:
diff --git a/README.md b/README.md
index 0f71ec6..6f9ee02 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,7 @@
 [![codecov](https://codecov.io/gh/brazilian-utils/brutils-python/branch/main/graph/badge.svg?token=5KNECS8JYF)](https://codecov.io/gh/brazilian-utils/brutils-python)
 [![Downloads per Month](https://shields.io/pypi/dm/brutils)](https://pypistats.org/packages/brutils)
 [![Package version](https://shields.io/pypi/v/brutils)](https://pypi.org/project/brutils/)
+</div>
 
 ### [Looking for the english version?](README_EN.md)
 
diff --git a/brutils/phone.py b/brutils/phone.py
index 0a019ad..3735078 100644
--- a/brutils/phone.py
+++ b/brutils/phone.py
@@ -17,7 +17,10 @@ def is_valid_landline(phone_number):  # type: (str) -> bool
 
     """
     pattern = re.compile(r"^[1-9][1-9][2-5]\d{7}$")
-    return isinstance(phone_number, str) and re.match(pattern, phone_number)
+    return (
+        isinstance(phone_number, str)
+        and re.match(pattern, phone_number) is not None
+    )
 
 
 def is_valid_mobile(phone_number):  # type: (str) -> bool
@@ -29,7 +32,10 @@ def is_valid_mobile(phone_number):  # type: (str) -> bool
 
     """
     pattern = re.compile(r"^[1-9][1-9][9]\d{8}$")
-    return isinstance(phone_number, str) and re.match(pattern, phone_number)
+    return (
+        isinstance(phone_number, str)
+        and re.match(pattern, phone_number) is not None
+    )
 
 
 def is_valid(phone_number):  # type: (str) -> bool


Test patch:
diff --git a/tests/test_cep.py b/tests/test_cep.py
index a86392b..5e3544c 100644
--- a/tests/test_cep.py
+++ b/tests/test_cep.py
@@ -43,19 +43,19 @@ class TestCEP(TestCase):
 
     def test_is_valid(self):
         # When CEP is not string, returns False
-        self.assertFalse(is_valid(1))
+        self.assertIs(is_valid(1), False)
 
         # When CEP's len is different of 8, returns False
-        self.assertFalse(is_valid("1"))
+        self.assertIs(is_valid("1"), False)
 
         # When CEP does not contain only digits, returns False
-        self.assertFalse(is_valid("1234567-"))
+        self.assertIs(is_valid("1234567-"), False)
 
         # When CEP is valid
-        self.assertTrue(is_valid("99999999"))
-        self.assertTrue(is_valid("88390000"))
+        self.assertIs(is_valid("99999999"), True)
+        self.assertIs(is_valid("88390000"), True)
 
     def test_generate(self):
         for _ in range(10_000):
-            self.assertTrue(is_valid(generate()))
+            self.assertIs(is_valid(generate()), True)
         # assert format(generate()) is not None
diff --git a/tests/test_cnpj.py b/tests/test_cnpj.py
index cc4d941..09fea7c 100644
--- a/tests/test_cnpj.py
+++ b/tests/test_cnpj.py
@@ -63,42 +63,42 @@ class TestCNPJ(TestCase):
             self.assertIsNone(format_cnpj("01838723000127"))
 
     def test_validate(self):
-        self.assertTrue(validate("34665388000161"))
-        self.assertFalse(validate("52599927000100"))
-        self.assertFalse(validate("00000000000"))
+        self.assertIs(validate("34665388000161"), True)
+        self.assertIs(validate("52599927000100"), False)
+        self.assertIs(validate("00000000000"), False)
 
     def test_is_valid(self):
         # When CNPJ is not string, returns False
-        self.assertFalse(is_valid(1))
+        self.assertIs(is_valid(1), False)
 
         # When CNPJ's len is different of 14, returns False
-        self.assertFalse(is_valid("1"))
+        self.assertIs(is_valid("1"), False)
 
         # When CNPJ does not contain only digits, returns False
-        self.assertFalse(is_valid("1112223334445-"))
+        self.assertIs(is_valid("1112223334445-"), False)
 
         # When CNPJ has only the same digit, returns false
-        self.assertFalse(is_valid("11111111111111"))
+        self.assertIs(is_valid("11111111111111"), False)
 
         # When rest_1 is lt 2 and the 13th digit is not 0, returns False
-        self.assertFalse(is_valid("1111111111315"))
+        self.assertIs(is_valid("1111111111315"), False)
 
         # When rest_1 is gte 2 and the 13th digit is not (11 - rest), returns False
-        self.assertFalse(is_valid("1111111111115"))
+        self.assertIs(is_valid("1111111111115"), False)
 
         # When rest_2 is lt 2 and the 14th digit is not 0, returns False
-        self.assertFalse(is_valid("11111111121205"))
+        self.assertIs(is_valid("11111111121205"), False)
 
         # When rest_2 is gte 2 and the 14th digit is not (11 - rest), returns False
-        self.assertFalse(is_valid("11111111113105"))
+        self.assertIs(is_valid("11111111113105"), False)
 
         # When CNPJ is valid
-        self.assertTrue(is_valid("34665388000161"))
-        self.assertTrue(is_valid("01838723000127"))
+        self.assertIs(is_valid("34665388000161"), True)
+        self.assertIs(is_valid("01838723000127"), True)
 
     def test_generate(self):
         for _ in range(10_000):
-            self.assertTrue(validate(generate()))
+            self.assertIs(validate(generate()), True)
             self.assertIsNotNone(display(generate()))
 
     def test__hashdigit(self):
diff --git a/tests/test_cpf.py b/tests/test_cpf.py
index 58db6fb..37b2506 100644
--- a/tests/test_cpf.py
+++ b/tests/test_cpf.py
@@ -59,42 +59,42 @@ class TestCPF(TestCase):
             self.assertIsNone(format_cpf("11144477735"))
 
     def test_validate(self):
-        self.assertTrue(validate("52513127765"))
-        self.assertTrue(validate("52599927765"))
-        self.assertFalse(validate("00000000000"))
+        self.assertIs(validate("52513127765"), True)
+        self.assertIs(validate("52599927765"), True)
+        self.assertIs(validate("00000000000"), False)
 
     def test_is_valid(self):
         # When cpf is not string, returns False
-        self.assertFalse(is_valid(1))
+        self.assertIs(is_valid(1), False)
 
         # When cpf's len is different of 11, returns False
-        self.assertFalse(is_valid("1"))
+        self.assertIs(is_valid("1"), False)
 
         # When cpf does not contain only digits, returns False
-        self.assertFalse(is_valid("1112223334-"))
+        self.assertIs(is_valid("1112223334-"), False)
 
         # When CPF has only the same digit, returns false
-        self.assertFalse(is_valid("11111111111"))
+        self.assertIs(is_valid("11111111111"), False)
 
         # When rest_1 is lt 2 and the 10th digit is not 0, returns False
-        self.assertFalse(is_valid("11111111215"))
+        self.assertIs(is_valid("11111111215"), False)
 
         # When rest_1 is gte 2 and the 10th digit is not (11 - rest), returns False
-        self.assertFalse(is_valid("11144477705"))
+        self.assertIs(is_valid("11144477705"), False)
 
         # When rest_2 is lt 2 and the 11th digit is not 0, returns False
-        self.assertFalse(is_valid("11111111204"))
+        self.assertIs(is_valid("11111111204"), False)
 
         # When rest_2 is gte 2 and the 11th digit is not (11 - rest), returns False
-        self.assertFalse(is_valid("11144477732"))
+        self.assertIs(is_valid("11144477732"), False)
 
         # When cpf is valid
-        self.assertTrue(is_valid("11144477735"))
-        self.assertTrue(is_valid("11111111200"))
+        self.assertIs(is_valid("11144477735"), True)
+        self.assertIs(is_valid("11111111200"), True)
 
     def test_generate(self):
         for _ in range(10_000):
-            self.assertTrue(validate(generate()))
+            self.assertIs(validate(generate()), True)
             self.assertIsNotNone(display(generate()))
 
     def test__hashdigit(self):
diff --git a/tests/test_phone.py b/tests/test_phone.py
index 6281972..b942751 100644
--- a/tests/test_phone.py
+++ b/tests/test_phone.py
@@ -11,55 +11,55 @@ class TestPhone(TestCase):
         self.assertIs(is_valid_landline(1938814933), False)
 
         # When landline phone doesn't contain only digits, returns False
-        self.assertFalse(is_valid_landline("(19)388149"))
+        self.assertIs(is_valid_landline("(19)388149"), False)
 
         # When landline phone is an empty string, returns False
-        self.assertFalse(is_valid_landline(""))
+        self.assertIs(is_valid_landline(""), False)
 
         # When landline phone's len is different of 10, returns False
-        self.assertFalse(is_valid_landline("193881"))
+        self.assertIs(is_valid_landline("193881"), False)
 
         # When landline phone's first digit is 0, returns False
-        self.assertFalse(is_valid_landline("0938814933"))
+        self.assertIs(is_valid_landline("0938814933"), False)
 
         # When landline phone's second digit is 0, returns False
-        self.assertFalse(is_valid_landline("1038814933"))
+        self.assertIs(is_valid_landline("1038814933"), False)
 
         # When landline phone's third digit is different of 2,3,4 or 5, returns False
-        self.assertFalse(is_valid_landline("1998814933"))
+        self.assertIs(is_valid_landline("1998814933"), False)
 
         # When landline phone is valid
-        self.assertTrue(is_valid_landline("1928814933"))
-        self.assertTrue(is_valid_landline("1938814933"))
-        self.assertTrue(is_valid_landline("1948814933"))
-        self.assertTrue(is_valid_landline("1958814933"))
-        self.assertTrue(is_valid_landline("3333333333"))
+        self.assertIs(is_valid_landline("1928814933"), True)
+        self.assertIs(is_valid_landline("1938814933"), True)
+        self.assertIs(is_valid_landline("1948814933"), True)
+        self.assertIs(is_valid_landline("1958814933"), True)
+        self.assertIs(is_valid_landline("3333333333"), True)
 
     def test_is_valid_mobile(self):
         # When mobile is not string, returns False
-        self.assertFalse(is_valid_mobile(1))
+        self.assertIs(is_valid_mobile(1), False)
 
         # When mobile doesn't contain only digits, returns False
-        self.assertFalse(is_valid_mobile(119940 - 2927))
+        self.assertIs(is_valid_mobile(119940 - 2927), False)
 
         # When mobile is an empty string, returns False
-        self.assertFalse(is_valid_mobile(""))
+        self.assertIs(is_valid_mobile(""), False)
 
         # When mobile's len is different of 11, returns False
-        self.assertFalse(is_valid_mobile("119940"))
+        self.assertIs(is_valid_mobile("119940"), False)
 
         # When mobile's first digit is 0, returns False
-        self.assertFalse(is_valid_mobile("01994029275"))
+        self.assertIs(is_valid_mobile("01994029275"), False)
 
         # When mobile's second digit is 0, returns False
-        self.assertFalse(is_valid_mobile("90994029275"))
+        self.assertIs(is_valid_mobile("90994029275"), False)
 
         # When mobile's third digit is different of 9, returns False
-        self.assertFalse(is_valid_mobile("11594029275"))
+        self.assertIs(is_valid_mobile("11594029275"), False)
 
         # When mobile is valid
-        self.assertTrue(is_valid_mobile("99999999999"))
-        self.assertTrue(is_valid_mobile("11994029275"))
+        self.assertIs(is_valid_mobile("99999999999"), True)
+        self.assertIs(is_valid_mobile("11994029275"), True)
 
     def test_is_valid(self):
         # Mock is_valid_landline to return True
@@ -68,7 +68,7 @@ class TestPhone(TestCase):
         ) as mock_is_valid_landline:
             with patch("brutils.phone.is_valid_mobile") as mock_is_valid_mobile:
                 # When landline phone is_valid, returns True
-                self.assertTrue(is_valid("1958814933"))
+                self.assertIs(is_valid("1958814933"), True)
 
                 # Checks if function is_valid_landline is called with the correct argument
                 mock_is_valid_landline.assert_called_once_with("1958814933")
@@ -83,7 +83,7 @@ class TestPhone(TestCase):
                 "brutils.phone.is_valid_mobile", return_value=True
             ) as mock_is_valid_mobile:
                 # When mobile phone is_valid, returns True
-                self.assertTrue(is_valid("11994029275"))
+                self.assertIs(is_valid("11994029275"), True)
 
                 # Checks if function is_valid_landline is called with the correct argument
                 mock_is_valid_landline.assert_called_once_with("11994029275")
@@ -98,7 +98,7 @@ class TestPhone(TestCase):
                 "brutils.phone.is_valid_mobile", return_value=False
             ) as mock_is_valid_mobile:
                 # When landline phone isn't valid, returns False
-                self.assertFalse(is_valid("11994029275"))
+                self.assertIs(is_valid("11994029275"), False)
 
                 # Checks if function is_valid_landline is called with the correct argument
                 mock_is_valid_landline.assert_called_once_with("11994029275")