Closed Bug 1508533 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 14137 - [wpt] Refactor internal function for clarity

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14137 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/14137
Details from upstream follow.

Mike Pennisi <mike@mikepennisi.com> wrote:
>  [wpt] Refactor internal function for clarity
>  
>  The `affected_by_interfaces` function is used for flow control in the
>  following `if` condition:
>  
>      if rel_path in file_contents or repo_path in file_contents or affected_by_interfaces(file_contents):
>          affected_testfiles.add(test_full_path)
>  
>  This usage suggests that the function should return a boolean value
>  indicating whether the provided file contents are "affected." However,
>  it was previously implemented to interact with the `affected_testfiles`
>  set directly and return `None` in all cases.
>  
>  Refactor the implementation to adhere to the functional style implied by
>  the call site.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/59c8ec95baa3
[wpt PR 14137] - [wpt] Refactor internal function for clarity, a=testonly
Result changes from PR not available.
https://hg.mozilla.org/mozilla-central/rev/59c8ec95baa3
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.