General comment: web-api and tests

Review Request #6431 — Created Oct. 11, 2014 and submitted

Information

Review Board
master
712b65f...

Reviewers

Reviewboard currently support 3 types of comments: Diff commment, File attachment comments, Screenshot comments.
This is a new type of comments: General comments.

A general comment on a review request is used when a comment is not tied to specific lines of code or a special file attachment, and an issue is opened. Examples include suggestions for testing or pointing out errors in the change description.

The general comment model is built. (review request 6375)
This review request is for general comments web-api.

Add 106 tests for general comments in reviewboard/webapi/tests and all tests passed.

Description From Last Updated

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 5 E113 unexpected indentation

reviewbotreviewbot

Col: 9 E113 unexpected indentation

reviewbotreviewbot

Col: 17 E225 missing whitespace around operator

reviewbotreviewbot

Col: 9 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 5 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 5 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 47 E701 multiple statements on one line (colon)

reviewbotreviewbot

Col: 12 E701 multiple statements on one line (colon)

reviewbotreviewbot

Col: 27 E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

Col: 29 E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

Col: 30 E502 the backslash is redundant between brackets

reviewbotreviewbot

Col: 17 E131 continuation line unaligned for hanging indent

reviewbotreviewbot

Col: 19 E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

Col: 21 E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

Col: 34 E701 multiple statements on one line (colon)

reviewbotreviewbot

Col: 72 E701 multiple statements on one line (colon)

reviewbotreviewbot

Col: 20 E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

Col: 22 E251 unexpected spaces around keyword / parameter equals

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 9 E124 closing bracket does not match visual indentation

reviewbotreviewbot

Col: 5 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 5 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 5 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 5 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 9 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 9 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 5 E124 closing bracket does not match visual indentation

reviewbotreviewbot

'six' imported but unused

reviewbotreviewbot

Col: 5 E303 too many blank lines (2)

reviewbotreviewbot

local variable 'review_request' is assigned to but never used

reviewbotreviewbot

Col: 77 W291 trailing whitespace

reviewbotreviewbot

'get_general_comment_list_url' imported but unused

reviewbotreviewbot

undefined name 'get_review_general_comment_list_url'

reviewbotreviewbot

Col: 62 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 62 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 37 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 44 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 50 E127 continuation line over-indented for visual indent

reviewbotreviewbot

These don't really make any sense. The only filtering in here should be the review__isnull one, and then ReviewGeneralCommentResource and …

daviddavid

This should probably be pulled out into a separate review request.

daviddavid

This resource shouldn't be necessary, because the only "object" that general comments will be attached to will be the review …

daviddavid

Please revert this change.

daviddavid

Why did you add this?

daviddavid

Why did you add this?

daviddavid

Typo: 'genral'

daviddavid

This resource definitely does support items.

daviddavid

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 56 W292 no newline at end of file

reviewbotreviewbot

Col: 46 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 50 E127 continuation line over-indented for visual indent

reviewbotreviewbot

undefined name 'CommentItemMixin'

reviewbotreviewbot

undefined name 'ReviewRequestChildItemMixin'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

Col: 56 E127 continuation line over-indented for visual indent

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

undefined name 'GeneralComment'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'User'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'User'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'PERMISSION_DENIED'

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

undefined name 'CommentListMixin'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

undefined name 'GeneralComment'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'general_comment_item_mimetype'

reviewbotreviewbot

undefined name 'get_review_general_comment_item_url'

reviewbotreviewbot

undefined name 'PERMISSION_DENIED'

reviewbotreviewbot

Col: 56 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 56 E127 continuation line over-indented for visual indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

This is no longer needed. It's for some old, deprecated support that actually probably isn't used anymore. Now, all resource …

chipx86chipx86

You can remove this. Some changes will soon be pushed (currently on the markdown-redesign branch) that move all this documentation …

chipx86chipx86

This class will have this automatically, so no need to copy it here.

chipx86chipx86

The base class here shouldn't set this, as that's going to be up to the subclass.

chipx86chipx86

For the life of me, I can't figure out why this isn't just in BaseComment. All subclasses use it. Maybe …

chipx86chipx86

"... the comment text and the date/time the comment was made."

chipx86chipx86

This isn't true for all subclasses. We shouldn't doc this one, and should instead only doc in the subclasses.

chipx86chipx86

"file attachments, or general comments not tied to any code or file."

chipx86chipx86

This can be removed.

chipx86chipx86

Can you wrap this a bit nicer? It's awfully short, and you can fit more on a line.

chipx86chipx86

This can be removed.

chipx86chipx86

This should all be able to fit on one line.

chipx86chipx86

This can be removed.

chipx86chipx86

Indentation problems. Note that the summary must fit on one line.

chipx86chipx86

This can be removed.

chipx86chipx86

This can be removed.

chipx86chipx86

"general"

chipx86chipx86

This can be removed.

chipx86chipx86

Small, but for method summaries Review Board follows one of the conventions: """One line summary Long explanation, that can possible …

ML mloyzer

Why this change?

chipx86chipx86

I know the naming is inconsistent, but this should be _post_new_general_comment.

chipx86chipx86

Small, but for method summaries Review Board follows one of the conventions: """One line summary Long explanation, that can possible …

ML mloyzer

Just a note: This is going to change soon, due to the markdown-redesign branch. That will probably be merged this …

chipx86chipx86

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

'GeneralComment' imported but unused

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 17 E126 continuation line over-indented for hanging indent

reviewbotreviewbot
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    WARNING: Number of comments exceeded maximum, showing 30 of 60.
  2. Col: 1
     E302 expected 2 blank lines, found 1
    
  3. Col: 5
     E113 unexpected indentation
    
  4. Col: 9
     E113 unexpected indentation
    
  5. Col: 17
     E225 missing whitespace around operator
    
  6. Col: 9
     E122 continuation line missing indentation or outdented
    
  7. Col: 5
     E122 continuation line missing indentation or outdented
    
  8. Col: 5
     E122 continuation line missing indentation or outdented
    
  9. Col: 47
     E701 multiple statements on one line (colon)
    
  10. Col: 12
     E701 multiple statements on one line (colon)
    
  11. Col: 27
     E251 unexpected spaces around keyword / parameter equals
    
  12. Col: 29
     E251 unexpected spaces around keyword / parameter equals
    
  13. Col: 30
     E502 the backslash is redundant between brackets
    
  14. Col: 17
     E131 continuation line unaligned for hanging indent
    
  15. Col: 19
     E251 unexpected spaces around keyword / parameter equals
    
  16. Col: 21
     E251 unexpected spaces around keyword / parameter equals
    
  17. Col: 34
     E701 multiple statements on one line (colon)
    
  18. Col: 72
     E701 multiple statements on one line (colon)
    
  19. Col: 20
     E251 unexpected spaces around keyword / parameter equals
    
  20. Col: 22
     E251 unexpected spaces around keyword / parameter equals
    
  21. Col: 13
     E128 continuation line under-indented for visual indent
    
  22. Col: 13
     E128 continuation line under-indented for visual indent
    
  23. Col: 13
     E128 continuation line under-indented for visual indent
    
  24. Col: 9
     E124 closing bracket does not match visual indentation
    
  25. Col: 5
     E122 continuation line missing indentation or outdented
    
  26. Col: 5
     E122 continuation line missing indentation or outdented
    
  27. Col: 5
     E122 continuation line missing indentation or outdented
    
  28. Col: 5
     E122 continuation line missing indentation or outdented
    
  29. Col: 9
     E128 continuation line under-indented for visual indent
    
  30. Col: 9
     E128 continuation line under-indented for visual indent
    
  31. Col: 5
     E124 closing bracket does not match visual indentation
    
  32. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2.  'six' imported but unused
    
  3. Col: 5
     E303 too many blank lines (2)
    
  4.  local variable 'review_request' is assigned to but never used
    
  5. Col: 77
     W291 trailing whitespace
    
  6. reviewboard/webapi/tests/base.py (Diff revision 2)
     
     
     'get_general_comment_list_url' imported but unused
    
  7. reviewboard/webapi/tests/base.py (Diff revision 2)
     
     
     undefined name 'get_review_general_comment_list_url'
    
  8. Col: 62
     E127 continuation line over-indented for visual indent
    
  9. Col: 62
     E127 continuation line over-indented for visual indent
    
  10. Col: 17
     E126 continuation line over-indented for hanging indent
    
  11. reviewboard/webapi/tests/urls.py (Diff revision 2)
     
     
    Col: 37
     E127 continuation line over-indented for visual indent
    
  12. reviewboard/webapi/tests/urls.py (Diff revision 2)
     
     
    Col: 44
     E127 continuation line over-indented for visual indent
    
  13. reviewboard/webapi/tests/urls.py (Diff revision 2)
     
     
    Col: 50
     E127 continuation line over-indented for visual indent
    
  14. 
      
NI
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2. Col: 17
     E126 continuation line over-indented for hanging indent
    
  3. 
      
david
  1. 
      
  2. These don't really make any sense. The only filtering in here should be the review__isnull one, and then ReviewGeneralCommentResource and ReviewReplyGeneralCommentResource can filter to the specific review.

  3. This should probably be pulled out into a separate review request.

    1. Sure. I will do this later.

  4. This resource shouldn't be necessary, because the only "object" that general comments will be attached to will be the review (or reply). The docstrings you have in here should be moved over to BaseGeneralCommentResource.

    The other comments have a separate resource that's used to attach to the given object in the tree. For example, the FileAttachmentCommentResource is accessible through the FileAttachmentResource.

  5. Please revert this change.

    1. I think my modification make sense because the person wrote review_file_attachment_comment.py copy this from screenshot comment. However, screenshot comments contain dimensions info but file attachment comments actually don't.

    1. Well I thought maybe it make sense to check local site accessibility? I saw diff and screenshot comment does that, but since the function does nothing, I can remove this.

  6. This resource definitely does support items.

  7. 
      
NI
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2. Col: 56
     W292 no newline at end of file
    
  3. Col: 46
     E127 continuation line over-indented for visual indent
    
  4. Col: 50
     E127 continuation line over-indented for visual indent
    
  5.  undefined name 'CommentItemMixin'
    
  6.  undefined name 'ReviewRequestChildItemMixin'
    
  7.  undefined name 'get_review_general_comment_item_url'
    
  8.  undefined name 'general_comment_item_mimetype'
    
  9.  undefined name 'get_review_general_comment_item_url'
    
  10.  undefined name 'get_review_general_comment_item_url'
    
  11.  undefined name 'get_review_general_comment_item_url'
    
  12.  undefined name 'general_comment_item_mimetype'
    
  13.  undefined name 'get_review_general_comment_item_url'
    
  14. Col: 56
     E127 continuation line over-indented for visual indent
    
  15.  undefined name 'general_comment_item_mimetype'
    
  16. Col: 17
     E126 continuation line over-indented for hanging indent
    
  17.  undefined name 'GeneralComment'
    
  18.  undefined name 'get_review_general_comment_item_url'
    
  19.  undefined name 'general_comment_item_mimetype'
    
  20.  undefined name 'get_review_general_comment_item_url'
    
  21.  undefined name 'general_comment_item_mimetype'
    
  22.  undefined name 'get_review_general_comment_item_url'
    
  23.  undefined name 'general_comment_item_mimetype'
    
  24.  undefined name 'User'
    
  25.  undefined name 'get_review_general_comment_item_url'
    
  26.  undefined name 'general_comment_item_mimetype'
    
  27.  undefined name 'User'
    
  28.  undefined name 'get_review_general_comment_item_url'
    
  29.  undefined name 'PERMISSION_DENIED'
    
  30. Col: 17
     E126 continuation line over-indented for hanging indent
    
  31. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2.  undefined name 'CommentListMixin'
    
  3.  undefined name 'get_review_general_comment_item_url'
    
  4.  undefined name 'general_comment_item_mimetype'
    
  5.  undefined name 'get_review_general_comment_item_url'
    
  6.  undefined name 'get_review_general_comment_item_url'
    
  7.  undefined name 'get_review_general_comment_item_url'
    
  8.  undefined name 'general_comment_item_mimetype'
    
  9.  undefined name 'get_review_general_comment_item_url'
    
  10.  undefined name 'general_comment_item_mimetype'
    
  11. Col: 17
     E126 continuation line over-indented for hanging indent
    
  12.  undefined name 'GeneralComment'
    
  13.  undefined name 'get_review_general_comment_item_url'
    
  14.  undefined name 'general_comment_item_mimetype'
    
  15.  undefined name 'get_review_general_comment_item_url'
    
  16.  undefined name 'general_comment_item_mimetype'
    
  17.  undefined name 'get_review_general_comment_item_url'
    
  18.  undefined name 'general_comment_item_mimetype'
    
  19.  undefined name 'get_review_general_comment_item_url'
    
  20.  undefined name 'general_comment_item_mimetype'
    
  21.  undefined name 'get_review_general_comment_item_url'
    
  22.  undefined name 'PERMISSION_DENIED'
    
  23. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/reviews/models/__init__.py
        reviewboard/webapi/review_general_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/reviews/models/review.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_reply_general_comment.py
        reviewboard/testing/testcase.py
        reviewboard/webapi/resources/base_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/reviews/tests.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/models/general_comment.py
        reviewboard/webapi/base_file_attachment_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/review_reply.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/reviews/admin.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/review.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/templatetags/reviewtags.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/reviews/models/__init__.py
        reviewboard/webapi/review_general_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/reviews/models/review.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_reply_general_comment.py
        reviewboard/testing/testcase.py
        reviewboard/webapi/resources/base_file_attachment_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/reviews/tests.py
        reviewboard/reviews/models/review_request.py
        reviewboard/reviews/models/general_comment.py
        reviewboard/webapi/base_file_attachment_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/review_reply.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/reviews/admin.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/review.py
    
    
  2. Col: 56
     E127 continuation line over-indented for visual indent
    
  3. Col: 17
     E126 continuation line over-indented for hanging indent
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. Col: 17
     E126 continuation line over-indented for hanging indent
    
  6. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/review_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_reply_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/resources/base_file_attachment_comment.py
        reviewboard/webapi/base_file_attachment_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/review_reply.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/review.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/review_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_reply_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/resources/base_file_attachment_comment.py
        reviewboard/webapi/base_file_attachment_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/review_reply.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/review.py
    
    
  2. Col: 56
     E127 continuation line over-indented for visual indent
    
  3. Col: 17
     E126 continuation line over-indented for hanging indent
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. Col: 17
     E126 continuation line over-indented for hanging indent
    
  6. 
      
NI
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/review_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_reply_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/resources/base_file_attachment_comment.py
        reviewboard/webapi/base_file_attachment_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/review_reply.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/review.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/review_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/review_file_attachment_comment.py
        reviewboard/webapi/tests/test_file_attachment_comment.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_reply_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/resources/base_file_attachment_comment.py
        reviewboard/webapi/base_file_attachment_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/review_reply.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/screenshot_comment.py
        reviewboard/webapi/resources/file_attachment_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/review.py
    
    
  2. Col: 17
     E126 continuation line over-indented for hanging indent
    
  3. Col: 17
     E126 continuation line over-indented for hanging indent
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. 
      
chipx86
  1. Hmmm, a bunch of files from reviewboard/webapi/resources/ just got added into reviewboard/webapi/. What happened there? Something seems wrong.

    1. Sorry about that, should be fixed now!

  2. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/resources/base_general_comment.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2. Col: 17
     E126 continuation line over-indented for hanging indent
    
  3. Col: 17
     E126 continuation line over-indented for hanging indent
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. 
      
chipx86
  1. 
      
  2. reviewboard/webapi/encoder.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
     
     

    This is no longer needed. It's for some old, deprecated support that actually probably isn't used anymore.

    Now, all resource data is serialized straight from the WebAPIResource subclass.

  3. reviewboard/webapi/resources/base_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     

    You can remove this. Some changes will soon be pushed (currently on the markdown-redesign branch) that move all this documentation to a new page.

  4. This class will have this automatically, so no need to copy it here.

  5. The base class here shouldn't set this, as that's going to be up to the subclass.

  6. reviewboard/webapi/resources/base_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     
     
     

    For the life of me, I can't figure out why this isn't just in BaseComment. All subclasses use it. Maybe just introduce it there?

  7. "... the comment text and the date/time the comment was made."

  8. reviewboard/webapi/resources/base_general_comment.py (Diff revision 9)
     
     
     
     
     
     

    This isn't true for all subclasses.

    We shouldn't doc this one, and should instead only doc in the subclasses.

  9. reviewboard/webapi/resources/review.py (Diff revision 9)
     
     

    "file attachments, or general comments not tied to any code or file."

  10. reviewboard/webapi/resources/review_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     
     

    This can be removed.

  11. Can you wrap this a bit nicer? It's awfully short, and you can fit more on a line.

  12. This can be removed.

  13. This should all be able to fit on one line.

  14. reviewboard/webapi/resources/review_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
     
     
     

    This can be removed.

  15. reviewboard/webapi/resources/review_reply_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Indentation problems.

    Note that the summary must fit on one line.

  16. reviewboard/webapi/resources/review_reply_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     

    This can be removed.

  17. This can be removed.

  18. reviewboard/webapi/resources/review_reply_general_comment.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
     
     
     

    This can be removed.

  19. reviewboard/webapi/tests/base.py (Diff revision 9)
     
     

    Why this change?

    1. Since we are passing a review in, we are finding screenshot comments related to a review, not a review request. But in webapi/test/urls.py we can see that get_screenshot_list_url is getting all the screenshot comments in the review request.

  20. reviewboard/webapi/tests/base.py (Diff revision 9)
     
     

    I know the naming is inconsistent, but this should be _post_new_general_comment.

  21. Just a note: This is going to change soon, due to the markdown-redesign branch. That will probably be merged this week. At that point, your tests will break, so look at the similar test classes when that happens to see how they changed.

  22. 
      
ML
  1. 
      
  2. Small, but for method summaries Review Board follows one of the conventions:

    """One line summary

    Long explanation, that can possible
    span multiple lines.
    """

    or:

    """One line summary"""

    Review Board adheres to the PEP standard: http://legacy.python.org/dev/peps/pep-0257/

  3. 
      
ML
  1. 
      
  2. reviewboard/webapi/tests/base.py (Diff revision 9)
     
     
     
     

    Small, but for method summaries Review Board follows one of the conventions:

    """One line summary

    Long explanation, that can possible
    span multiple lines.
    """
    (make sure there's a new line)

  3. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/base_review_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/encoder.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/base_review_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2. reviewboard/webapi/encoder.py (Diff revision 10)
     
     
     'GeneralComment' imported but unused
    
  3. reviewboard/webapi/tests/base.py (Diff revision 10)
     
     
    Col: 80
     E501 line too long (80 > 79 characters)
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. Col: 17
     E126 continuation line over-indented for hanging indent
    
  6. Col: 17
     E126 continuation line over-indented for hanging indent
    
  7. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/base_review_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/base_review_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2. Col: 17
     E126 continuation line over-indented for hanging indent
    
  3. Col: 17
     E126 continuation line over-indented for hanging indent
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. 
      
NI
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/resources/base_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/base_review_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/resources/base_comment.py
        reviewboard/webapi/resources/__init__.py
        reviewboard/notifications/tests.py
        reviewboard/webapi/tests/test_review_general_comment.py
        reviewboard/webapi/resources/base_review_general_comment.py
        reviewboard/webapi/tests/test_review_reply_general_comment.py
        reviewboard/webapi/resources/review_reply.py
        reviewboard/webapi/resources/review.py
        reviewboard/notifications/webhooks.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/tests/base.py
        reviewboard/webapi/resources/review_general_comment.py
        reviewboard/webapi/resources/review_reply_general_comment.py
    
    
  2. Col: 17
     E126 continuation line over-indented for hanging indent
    
  3. Col: 17
     E126 continuation line over-indented for hanging indent
    
  4. Col: 17
     E126 continuation line over-indented for hanging indent
    
  5. 
      
NI
chipx86
  1. Ship It!
  2. 
      
NI
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to ucosp/nicole_xin/general-comments (3c3e22d)
Loading...