Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: exemplo incorreto no README (incorrect example on README) #93

Open
aureliobarbosa opened this issue Oct 21, 2024 · 2 comments
Open
Labels
good first issue Good for newcomers

Comments

@aureliobarbosa
Copy link
Contributor

O exemplo de construção de um objeto Notifiable no README está inconsistente com a intenção: ao invés de criar uma notifição para nomes com menos de três letras, ele cria notificações para nomes MAIORES do que três letras. O exemplo abaixo:

class Nome(Notifiable):
    def __init__(self, nome):
        super().__init__()

        if len(nome) > 3:
            self.add_notification(field='nome', message='nome inválido')
        self._nome = nome

Deveria ser:

class Nome(Notifiable):
    def __init__(self, nome):
        super().__init__()

        if len(nome) < 3:
            self.add_notification(field='nome', message='nome inválido')
        self._nome = nome

Esta é um bom exercício para alguém que está começando a programar em python.

  • Versão do PyFlunt: 2.3
@aureliobarbosa aureliobarbosa changed the title DOC: DOC: exemplo incorreto no README Oct 21, 2024
@aureliobarbosa aureliobarbosa changed the title DOC: exemplo incorreto no README DOC: exemplo incorreto no README (incorrect example on README) Oct 21, 2024
@fazedordecodigo fazedordecodigo added the good first issue Good for newcomers label Oct 21, 2024
@aureliobarbosa
Copy link
Contributor Author

aureliobarbosa commented Oct 23, 2024

Thanks @ChinoUkeagbu,

This issue came by when we were discussing this library during Python Brasil 2024 and the idea was to use it as an example to teach someone to do the first PR.

Fixing the doc is trivial but demands knowledge about git and github... Nevertheless... What I found amazing was the speed it took we got this issue 'solved' by simply marking it as "good first issue". Thank you!

Look this @fazedordecodigo. The issue didn't survive two days!

@ChinoUkaegbu
Copy link

No worries haha I'll close the PR! Yeah there's a couple of sites that collate good first issues from different repositories together to make it easier for people new to open source, that's how I found this one actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants