TODO and FIXME comments must have ownership

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

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