TODO and FIXME comments must have ownership

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Metadata

ID: python-best-practices/comment-fixme-todo-ownership

Language: Python

Severity: Notice

Category: Best Practices

Description

When using TODO or FIXME, specify who write the annotation. It’s a best practice to remind you who created the annotation and have potential context and information about this issue.

Non-Compliant Code Examples

# TODO fix this function
def my_function():
    pass

# FIXME fix this function
def my_function():
    pass

# FIXME(): fix this function
def broken():
    pass

Compliant Code Examples

# TODO(bob) fix this function
def my_function():
    pass

# FIXME(julien) fix this function
def my_other_function():
    pass

# FIXME[julien] fix this function
def my_other_function():
    pass

# TODO[bob] fix this function
def my_function():
    pass

# TODO (amaan): fix this function
def broken():
    pass

# TODO (amaan.qureshi): fix this function too
def broken2():
    pass
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis

PREVIEWING: safchain/fix-custom-agent