Replacing non-named usages to use names logging for files in reviewboard.scmTools

Review Request #11817 — Created Sept. 18, 2021 and updated

cynthia
Review Board
release-4.0.x
4909
reviewboard

Only some logging statements in the scmtools module used named
logging, when all of them should. So all logging statements were given
the name "logger", and that was used instead.

Passed all unit tests.

Summary Author
change logging to logger
Your Name
changes made after the review
Your Name
Description From Last Updated

For the summary, the module name needs to be all lowercase.

chipx86chipx86

For the description, this needs to wrap at around 75 characters, in order to fit properly in the Git commit ...

chipx86chipx86

This will need some testing. At the very least, you should run unit tests.

chipx86chipx86

At the top-level of modules, there should always be 2 blank lines between sections. Imports are one section. Functions or ...

chipx86chipx86

The parameters no longer align. logger is one character shorter than logging, but the other line in this statement wasn't ...

chipx86chipx86

This will need 2 blank lines on both sides of logger = .... Can you go through the other files ...

chipx86chipx86
cynthia
cynthia
chipx86
  1. 
      
  2. For the summary, the module name needs to be all lowercase.

  3. For the description, this needs to wrap at around 75 characters, in order to fit properly in the Git commit message.

  4. This will need some testing. At the very least, you should run unit tests.

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

    At the top-level of modules, there should always be 2 blank lines between sections. Imports are one section. Functions or classes are each their own section. A group of related constants or variable declarations are a section.

    So this would need to have 2 blank lines on both sides of it.

    On top of that, this is being declared in the middle of the import section (see the import ntpath below). You'll instead want this to be in its own section above the _cleartool = None.

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

    The parameters no longer align. logger is one character shorter than logging, but the other line in this statement wasn't similarly reduced by 1 character.

    This applies to other similar lines throughout the change. Can you go through the diff and check?

    1. I have gone through the code and changed all the occurrences.

  7. reviewboard/scmtools/core.py (Diff revision 1)
     
     
     
     
     
     

    This will need 2 blank lines on both sides of logger = ....

    Can you go through the other files and make sure the logger declaration section is following the 2 blank line rule?

  8. 
      
cynthia
Review request changed

Summary:

-Replacing non-named usages to use names logging for files in reviewboard.SCMTools
+Replacing non-named usages to use names logging for files in reviewboard.scmTools

Description:

~  

Only some logging statements in the SCMTools module used named logging, when all of them should. So all logging statements were given the name "logger", and that was used instead.

  ~

Only some logging statements in the scmtools module used named

  + logging, when all of them should. So all logging statements were given
  + the name "logger", and that was used instead.

Testing Done:

~  

Not tested

  ~

Passed all unit tests.

Commits:

Summary Author
-
change logging to logger
Your Name
+
change logging to logger
Your Name
+
changes made after the review
Your Name

Diff:

Revision 2 (+246 -196)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
mike_conley
  1. This looks great to me! Thanks, Cynthia!

  2. 
      
Loading...