Open Bug 1556406 Opened 4 months ago Updated 4 months ago

WPT wdspec lint errors

Categories

(Testing :: geckodriver, defect, P3)

Version 3
defect

Tracking

(Not tracked)

People

(Reporter: ato, Unassigned)

Details

There are a lot of WPT linting errors for the wdspec tests that we
should probably fix:

% ./mach lint -funix testing/web-platform/tests/webdriver/
An error occurred running eslint. Please check the following error messages:


Oops! Something went wrong! :(

ESLint: 5.16.0.
No files matching the pattern "/home/ato/src/gecko/testing/web-platform/tests/webdriver" were found.
Please check for typing mistakes in the pattern.

testing/web-platform/tests/webdriver/tests/accept_alert/accept.py:42:100: E501 error: line too long (107 > 99 characters)
testing/web-platform/tests/webdriver/tests/add_cookie/add.py:8:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/delete_all_cookies/user_prompts.py:5:1: F401 error: 'webdriver.error.NoSuchCookieException' imported but unused
testing/web-platform/tests/webdriver/tests/dismiss_alert/dismiss.py:42:100: E501 error: line too long (107 > 99 characters)
testing/web-platform/tests/webdriver/tests/element_clear/clear.py:391:12: E127 error: continuation line over-indented for visual indent
testing/web-platform/tests/webdriver/tests/element_clear/clear.py:392:12: E127 error: continuation line over-indented for visual indent
testing/web-platform/tests/webdriver/tests/element_click/center_point.py:3:1: F401 error: 'tests.support.asserts.assert_error' imported but unused
testing/web-platform/tests/webdriver/tests/element_click/center_point.py:32:100: E501 error: line too long (100 > 99 characters)
testing/web-platform/tests/webdriver/tests/element_click/file_upload.py:1:1: F401 error: 'tests.support.asserts.assert_success' imported but unused
testing/web-platform/tests/webdriver/tests/element_click/file_upload.py:4:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/element_click/navigate.py:1:1: F401 error: 'pytest' imported but unused
testing/web-platform/tests/webdriver/tests/element_click/navigate.py:3:1: F401 error: 'tests.support.asserts.assert_error' imported but unused
testing/web-platform/tests/webdriver/tests/element_click/navigate.py:6:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/element_click/navigate.py:100:100: E501 error: line too long (107 > 99 characters)
testing/web-platform/tests/webdriver/tests/element_click/scroll_into_view.py:3:1: F401 error: 'tests.support.asserts.assert_error' imported but unused
testing/web-platform/tests/webdriver/tests/element_click/scroll_into_view.py:7:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/element_click/scroll_into_view.py:63:100: E501 error: line too long (104 > 99 characters)
testing/web-platform/tests/webdriver/tests/element_click/scroll_into_view.py:67:100: E501 error: line too long (101 > 99 characters)
testing/web-platform/tests/webdriver/tests/element_click/scroll_into_view.py:70:100: E501 error: line too long (101 > 99 characters)
testing/web-platform/tests/webdriver/tests/element_send_keys/content_editable.py:1:1: F401 error: 'pytest' imported but unused
testing/web-platform/tests/webdriver/tests/element_send_keys/scroll_into_view.py:5:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/get_element_attribute/get.py:44:17: E712 error: comparison to True should be 'if cond is True:' or 'if cond:'
testing/web-platform/tests/webdriver/tests/get_element_attribute/get.py:58:100: E501 error: line too long (106 > 99 characters)
testing/web-platform/tests/webdriver/tests/get_element_property/get.py:104:100: E501 error: line too long (106 > 99 characters)
testing/web-platform/tests/webdriver/tests/get_element_rect/__init__.py:1:1: W391 error: blank line at end of file
testing/web-platform/tests/webdriver/tests/get_named_cookie/get.py:7:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/get_named_cookie/user_prompts.py:5:1: F401 error: 'webdriver.error.NoSuchCookieException' imported but unused
testing/web-platform/tests/webdriver/tests/maximize_window/stress.py:8:1: F401 error: 'tests.support.helpers.document_hidden' imported but unused
testing/web-platform/tests/webdriver/tests/new_session/create_alwaysMatch.py:16:1: W391 error: blank line at end of file
testing/web-platform/tests/webdriver/tests/new_session/merge.py:62:100: E501 error: line too long (100 > 99 characters)
testing/web-platform/tests/webdriver/tests/new_session/page_load_strategy.py:3:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:15:41: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:16:36: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:17:39: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:18:39: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:21:100: E501 error: line too long (114 > 99 characters)
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:25:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:26:42: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:27:37: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:28:40: E231 error: missing whitespace after ','
testing/web-platform/tests/webdriver/tests/new_session/timeouts.py:31:100: E501 error: line too long (114 > 99 characters)
testing/web-platform/tests/webdriver/tests/perform_actions/key_shortcuts.py:49:1: W391 error: blank line at end of file
testing/web-platform/tests/webdriver/tests/permissions/set.py:4:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/permissions/set.py:22:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/permissions/set.py:23:5: E265 error: block comment should start with '# '
testing/web-platform/tests/webdriver/tests/permissions/set.py:24:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:24:22: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:24:33: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:24:55: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:25:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:25:22: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:25:44: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:26:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:26:22: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:26:44: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:26:66: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:27:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:27:43: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:28:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:28:54: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:29:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:29:22: E201 error: whitespace after '['
testing/web-platform/tests/webdriver/tests/permissions/set.py:29:24: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:29:46: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:29:48: E202 error: whitespace before ']'
testing/web-platform/tests/webdriver/tests/permissions/set.py:29:70: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:30:6: E201 error: whitespace after '['
testing/web-platform/tests/webdriver/tests/permissions/set.py:30:8: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:30:24: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:30:46: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:30:68: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:30:70: E202 error: whitespace before ']'
testing/web-platform/tests/webdriver/tests/permissions/set.py:31:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:31:22: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:31:44: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:31:82: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:49:10: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:49:26: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:49:41: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:49:59: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:54:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/permissions/set.py:56:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:56:23: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:57:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:57:24: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:61:19: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:61:35: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:61:57: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:61:75: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:77:39: E711 error: comparison to None should be 'if cond is None:'
testing/web-platform/tests/webdriver/tests/permissions/set.py:95:6: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:95:24: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:101:19: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:101:35: E201 error: whitespace after '{'
testing/web-platform/tests/webdriver/tests/permissions/set.py:101:57: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:101:75: E202 error: whitespace before '}'
testing/web-platform/tests/webdriver/tests/permissions/set.py:118:39: E711 error: comparison to None should be 'if cond is None:'
testing/web-platform/tests/webdriver/tests/set_timeouts/set.py:94:36: E711 error: comparison to None should be 'if cond is None:'
testing/web-platform/tests/webdriver/tests/support/__init__.py:3:1: F401 error: 'merge_dictionaries.merge_dictionaries' imported but unused
testing/web-platform/tests/webdriver/tests/support/asserts.py:3:1: F401 error: 'struct' imported but unused
testing/web-platform/tests/webdriver/tests/support/fixtures.py:22:9: E128 error: continuation line under-indented for visual indent
testing/web-platform/tests/webdriver/tests/support/fixtures.py:92:9: F841 error: local variable 'name' is assigned to but never used
testing/web-platform/tests/webdriver/tests/support/image.py:2:1: F401 error: 'math' imported but unused
testing/web-platform/tests/webdriver/tests/support/merge_dictionaries.py:8:1: E302 error: expected 2 blank lines, found 1
testing/web-platform/tests/webdriver/tests/support/merge_dictionaries.py:21:35: E127 error: continuation line over-indented for visual indent
testing/web-platform/tests/webdriver/tests/support/merge_dictionaries.py:27:1: E305 error: expected 2 blank lines after class or function definition, found 1
tools/lint/wpt.yml:0: wpt error: Lint process exited with return code 1

Are the WPT lints only run on changed files? What could explain
that we haven’t seen these when we’ve landed WPT changes from central
and GitHub?

Flags: needinfo?(james)
Priority: -- → P3

We don't run the flake8 lints on this code in CI and I don't expect it to pass. I think the local command must be overriding the exclusion. If we want to start running it on these we need to make upstream changes to ensure it doesn't regress with the first sync.

Flags: needinfo?(james)
You need to log in before you can comment on or make changes to this bug.