Skip to content

Commit

Permalink
doc: update fields docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
scjorge committed Aug 2, 2024
1 parent 50f3096 commit 9abd44e
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 63 deletions.
15 changes: 6 additions & 9 deletions pydantic_br/fields/cep_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

class CEP(Base):
"""
Only Accepts string of CEP.
Código de Endereçamento Postal
Attributes:
number (str): CEP number.
Exemplos: '00000000' ou '00000-000'
"""

format = "cep"
Expand All @@ -24,10 +23,9 @@ class CEP(Base):

class CEPMask(BaseMask):
"""
Only Accepts string of CEP with mask.
Código de Endereçamento Postal
Attributes:
number (str): CEP number.
Exemplos: '00000-000'
"""

format = "cep"
Expand All @@ -38,10 +36,9 @@ class CEPMask(BaseMask):

class CEPDigits(BaseDigits):
"""
Only Accepts string of CEP without mask.
Código de Endereçamento Postal
Attributes:
number (str): CEP number.
Exemplos: '00000000'
"""

format = "cep"
Expand Down
15 changes: 6 additions & 9 deletions pydantic_br/fields/certidao_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

class Certidao(Base):
"""
Accepts string of Certidao with or without mask.
Certidão
Attributes:
number (str): Certidao number.
Exemplos: '00000000000000000000000000000000' ou '000000.00.00.0000.0.00000.000.0000000-00'
"""

format = "certidao"
Expand All @@ -27,10 +26,9 @@ class Certidao(Base):

class CertidaoMask(BaseMask):
"""
Only Accepts string of Certidao with mask.
Certidão
Attributes:
number (str): Certidao number.
Exemplos: '000000.00.00.0000.0.00000.000.0000000-00'
"""

format = "certidao"
Expand All @@ -41,10 +39,9 @@ class CertidaoMask(BaseMask):

class CertidaoDigits(BaseDigits):
"""
Only Accepts string of Certidao with digits.
Certidão
Attributes:
number (str): Certidao number.
Exemplos: '00000000000000000000000000000000'
"""

format = "certidao"
Expand Down
5 changes: 2 additions & 3 deletions pydantic_br/fields/cnh_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

class CNH(BaseDigits):
"""
Only Accepts string of CNH with digits.
Carteira Nacional de Habilitação
Attributes:
number (str): CNH number.
Exemplos: '00000000000'
"""

format = "cnh"
Expand Down
15 changes: 6 additions & 9 deletions pydantic_br/fields/cnpj_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

class CNPJ(Base):
"""
Accepts string of CNPJ with or without mask.
Cadastro Nacional de Pessoas Jurídicas
Attributes:
number (str): CNPJ number.
Exemplos: '00000000000000' ou '00.000.000/0000-00'
"""

format = "cnpj"
Expand All @@ -24,10 +23,9 @@ class CNPJ(Base):

class CNPJMask(BaseMask):
"""
Only Accepts string of CNPJ with mask.
Cadastro Nacional de Pessoas Jurídicas
Attributes:
number (str): CNPJ number.
Exemplos: '00.000.000/0000-00'
"""

format = "cnpj"
Expand All @@ -38,10 +36,9 @@ class CNPJMask(BaseMask):

class CNPJDigits(BaseDigits):
"""
Only Accepts string of CNPJ with digits.
Cadastro Nacional de Pessoas Jurídicas
Attributes:
number (str): CNPJ number.
Exemplos: '00000000000000'
"""

format = "cnpj"
Expand Down
5 changes: 2 additions & 3 deletions pydantic_br/fields/cns_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

class CNS(BaseDigits):
"""
Only Accepts string of CNS with digits.
Cartão Nacional de Saúde
Attributes:
number (str): CNS number.
Exemplos: '000000000000000'
"""

format = "cns"
Expand Down
15 changes: 6 additions & 9 deletions pydantic_br/fields/cpf_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

class CPF(Base):
"""
Accepts string of CPF with or without mask.
Cadastro de Pessoa Física
Attributes:
number (str): CPF number.
Exemplos: '00000000000' ou '000.000.000-00'
"""

format = "cpf"
Expand All @@ -24,10 +23,9 @@ class CPF(Base):

class CPFMask(BaseMask):
"""
Only Accepts string of CPF with mask.
Cadastro de Pessoa Física
Attributes:
number (str): CPF number.
Exemplos: '000.000.000-00'
"""

format = "cpf mask"
Expand All @@ -38,10 +36,9 @@ class CPFMask(BaseMask):

class CPFDigits(BaseDigits):
"""
Only Accepts string of CPF with digits.
Cadastro de Pessoa Física
Attributes:
number (str): CPF number.
Exemplos: '00000000000'
"""

format = "cpf digits"
Expand Down
15 changes: 6 additions & 9 deletions pydantic_br/fields/pis_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

class PIS(Base):
"""
Accepts string of PIS with or without mask.
Programa de Integração Social
Attributes:
number (str): PIS number.
Exemplos: '00000000000' ou '000.00000.00-0'
"""

format = "pis"
Expand All @@ -24,10 +23,9 @@ class PIS(Base):

class PISMask(BaseMask):
"""
Only Accepts string of PIS with mask.
Programa de Integração Social
Attributes:
number (str): PIS number.
Exemplos: '000.00000.00-0'
"""

format = "pis mask"
Expand All @@ -38,10 +36,9 @@ class PISMask(BaseMask):

class PISDigits(BaseDigits):
"""
Only Accepts string of PIS with digits.
Programa de Integração Social
Attributes:
number (str): PIS number.
Exemplos: '00000000000'
"""

format = "pis digits"
Expand Down
5 changes: 2 additions & 3 deletions pydantic_br/fields/placa_veiculo_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

class PlacaVeiculo(Base):
"""
Accepts string of PlacaVeiculo
Placa veicular
Attributes:
number (str): PlacaVeiculo number.
Exemplos: 'ABC0000' ou 'ABC0D00'
"""

format = "placa_veiculo"
Expand Down
5 changes: 2 additions & 3 deletions pydantic_br/fields/renavam_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

class RENAVAM(BaseDigits):
"""
Only Accepts string of RENAVAM with digits.
Registro Nacional de Veículos Automotores
Attributes:
number (str): RENAVAM number.
Exemplos: '00000000000'
"""

format = "renavam"
Expand Down
5 changes: 2 additions & 3 deletions pydantic_br/fields/sigla_estado_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

class SiglaEstado(Base):
"""
Only Accepts string of SiglaEstado with digits.
Sigla do Estado
Attributes:
number (str): SiglaEstado number.
Exemplos: 'SP'
"""

format = "sigla_estado"
Expand Down
5 changes: 2 additions & 3 deletions pydantic_br/fields/te_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

class TE(BaseDigits):
"""
Only Accepts string of TE with digits.
Título Eleitoral
Attributes:
number (str): TE number.
Exemplos: '000000000000'
"""

format = "te"
Expand Down

0 comments on commit 9abd44e

Please sign in to comment.