Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
self.options = self.parse_args(argv)
nit: Does this need to be an attribute, or could it just remain a local variable?
if self.options.verbose:
configure_logging(logging_level=logging.DEBUG, include_time=True)
We should always `configure_logging()` instead of skipping it for `verbose=False`. Use the `verbose` flag to just [pass a different level](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/blinkpy/w3c/test_importer.py;l=106;drc=a3a5890e78d541dca55f46921866f74b89fab5d2;bpv=0;bpt=0) instead:
```suggestion
level = logging.DEBUG if self.options.verbose else logging.INFO
configure_logging(logging_level=level, include_time=True)
```
self._dry_run = self.options.dry_run
I think a test that calls `process_draft_bug()` without calling `run()` first will crash. Generally, [`__init__` should define all attributes](https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/attribute-defined-outside-init.html), even if it's just a default like `self._dry_run = False` that `run()` will overwrite.
Alternatively, you can construct the desired object to begin with using a [`from_args()`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/blinkpy/wpt_tests/wpt_adapter.py;l=156-176;drc=258547b3a37233e95e1b1ca65e4e24f717f64875;bpv=0;bpt=0) factory.
help='log extra details that may be helpful when debugging')
nit: Capitalize and add punctuation to be consistent with formatting for the `--dry-run` help.
if not existing_bugs:
if self._dry_run:
f'{str(bug)}')
nit: No need for `str`, it should be implied.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks for the great suggestions. A lot of patterns in this CL were made in reference to tools/blinkpy/w3c/wpt_uploader.py. Do you think it is worthwhile to apply the same improvements on it in future CL?
nit: Does this need to be an attribute, or could it just remain a local variable?
Done
if self.options.verbose:
configure_logging(logging_level=logging.DEBUG, include_time=True)
We should always `configure_logging()` instead of skipping it for `verbose=False`. Use the `verbose` flag to just [pass a different level](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/blinkpy/w3c/test_importer.py;l=106;drc=a3a5890e78d541dca55f46921866f74b89fab5d2;bpv=0;bpt=0) instead:
```suggestion
level = logging.DEBUG if self.options.verbose else logging.INFO
configure_logging(logging_level=level, include_time=True)
```
Done
I think a test that calls `process_draft_bug()` without calling `run()` first will crash. Generally, [`__init__` should define all attributes](https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/attribute-defined-outside-init.html), even if it's just a default like `self._dry_run = False` that `run()` will overwrite.
Alternatively, you can construct the desired object to begin with using a [`from_args()`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/tools/blinkpy/wpt_tests/wpt_adapter.py;l=156-176;drc=258547b3a37233e95e1b1ca65e4e24f717f64875;bpv=0;bpt=0) factory.
Done
help='log extra details that may be helpful when debugging')
nit: Capitalize and add punctuation to be consistent with formatting for the `--dry-run` help.
Done
Done
nit: No need for `str`, it should be implied.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks for the great suggestions. A lot of patterns in this CL were made in reference to tools/blinkpy/w3c/wpt_uploader.py. Do you think it is worthwhile to apply the same improvements on it in future CL?
Do you think it is worthwhile to apply the same improvements on it in future CL?
My suggestions are very minor, so it's fine to leave the old code as-is.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[Blink] Add dryrun and verbose arg to vts notifier
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |