Fix up code style and documentation in ClearCase implementation.

Review Request #11288 — Created Nov. 19, 2020 and updated

david
Review Board
release-3.0.x
reviewboard

This change fixes up a bunch of style issues and code documentation in
the old ClearCase implementation. I've also removed an old fallback for
a no-longer-supported version of Python.

Ran unit tests.

Summary
Fix up code style and documentation in ClearCase implementation.
Description From Last Updated

E722 do not use bare except'

reviewbotreviewbot

While here, want to add Args and Returns?

chipx86chipx86

:py:attr for these?

chipx86chipx86

Is "object" correct? Or should this be "file", here and below?

chipx86chipx86

We should probably use a full path to these constants.

chipx86chipx86

Missing the full class path.

chipx86chipx86

Double backticks around extended_path?

chipx86chipx86

We can pass a tuple of choices to startswith, to simplify this.

chipx86chipx86

"oid" or "OID"?

chipx86chipx86

This should be the full class path.

chipx86chipx86

Can you make extended_path a literal?

chipx86chipx86

E902 TokenError: EOF in multi-line statement

reviewbotreviewbot

E999 SyntaxError: invalid syntax

reviewbotreviewbot

This needs to be a tuple.

chipx86chipx86

, optional

chipx86chipx86

, unused

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
chipx86
  1. 
      
  2. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     
     
     

    While here, want to add Args and Returns?

  3. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    :py:attr for these?

  4. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    Is "object" correct? Or should this be "file", here and below?

    1. Probably "element" is most correct.

  5. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     
     

    We should probably use a full path to these constants.

  6. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    Missing the full class path.

  7. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    Double backticks around extended_path?

  8. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     
     

    We can pass a tuple of choices to startswith, to simplify this.

  9. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    "oid" or "OID"?

    1. IBM's docs use "oid".

  10. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    This should be the full class path.

  11. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     

    Can you make extended_path a literal?

  12. 
      
david
Review request changed

Commits:

Summary
-
Fix up code style and documentation in ClearCase implementation.
+
Fix up code style and documentation in ClearCase implementation.

Diff:

Revision 3 (+624 -210)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
Review request changed

Change Summary:

Syntax.

Commits:

Summary
-
Fix up code style and documentation in ClearCase implementation.
+
Fix up code style and documentation in ClearCase implementation.

Diff:

Revision 4 (+624 -210)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
chipx86
  1. 
      
  2. reviewboard/scmtools/clearcase.py (Diff revision 4)
     
     

    This needs to be a tuple.

  3. reviewboard/scmtools/clearcase.py (Diff revision 4)
     
     

    , optional

  4. reviewboard/scmtools/clearcase.py (Diff revision 4)
     
     

    , unused

  5. 
      
Loading...