Skip to content

Commit

Permalink
[py] flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmtierney committed Aug 2, 2019
1 parent cbd9435 commit d0198ec
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .ie.options import Options as IeOptions # noqa
from .edge.webdriver import WebDriver as Edge # noqa
from .edge.webdriver import WebDriver as ChromiumEdge # noqa
from .edge.options import Options as EdgeOptions #noqa
from .edge.options import Options as EdgeOptions # noqa
from .opera.webdriver import WebDriver as Opera # noqa
from .safari.webdriver import WebDriver as Safari # noqa
from .blackberry.webdriver import WebDriver as BlackBerry # noqa
Expand Down
5 changes: 1 addition & 4 deletions py/selenium/webdriver/chrome/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
# specific language governing permissions and limitations
# under the License.

import base64
import os

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.chromium.options import ChromiumOptions
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities


class Options(ChromiumOptions):
Expand Down
5 changes: 3 additions & 2 deletions py/selenium/webdriver/chrome/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def __init__(self, executable_path="chromedriver", port=DEFAULT_PORT,
if service is None:
service = Service(executable_path, port, service_args, service_log_path)

super(WebDriver, self).__init__(executable_path, port, options, service_args, desired_capabilities, service_log_path,
service, keep_alive)
super(WebDriver, self).__init__(executable_path, port, options,
service_args, desired_capabilities,
service_log_path, service, keep_alive)

def create_options(self):
return Options()
2 changes: 1 addition & 1 deletion py/selenium/webdriver/chromium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# under the License.
1 change: 0 additions & 1 deletion py/selenium/webdriver/chromium/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import base64
import os

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.options import ArgOptions


Expand Down
6 changes: 2 additions & 4 deletions py/selenium/webdriver/chromium/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
# specific language governing permissions and limitations
# under the License.
import warnings
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.chromium.remote_connection import ChromiumRemoteConnection
from .service import ChromiumService
from .options import ChromiumOptions

from selenium.webdriver.chromium.remote_connection import ChromiumRemoteConnection
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver

DEFAULT_PORT = 0
DEFAULT_SERVICE_LOG_PATH = None
Expand Down
6 changes: 2 additions & 4 deletions py/selenium/webdriver/edge/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

class Service(service.ChromiumService):

def __init__(self, executable_path, port=0, verbose=False, log_path=None, is_legacy=True, service_args=None, env=None):
def __init__(self, executable_path, port=0, verbose=False, log_path=None,
is_legacy=True, service_args=None, env=None):
"""
Creates a new instance of the EdgeDriver service.
EdgeDriver provides an interface for Microsoft WebDriver to use
Expand All @@ -41,9 +42,6 @@ def __init__(self, executable_path, port=0, verbose=False, log_path=None, is_leg
if verbose:
self.service_args.append("--verbose")

if log_path:
params["log_file"] = open(log_path, "a+")

service.ChromiumService.__init__(
self,
executable_path,
Expand Down
6 changes: 4 additions & 2 deletions py/selenium/webdriver/edge/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ def __init__(self, executable_path='MicrosoftWebDriver.exe',
executable_path = "msedgedriver"

service = service or Service(executable_path,
port=port, verbose=verbose,
log_path=service_log_path, is_legacy=is_legacy)
port=port,
verbose=verbose,
log_path=service_log_path,
is_legacy=is_legacy)

super(WebDriver, self).__init__(
executable_path,
Expand Down
4 changes: 2 additions & 2 deletions py/test/selenium/webdriver/common/window_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_should_set_the_rect_of_the_current_window(driver):
@pytest.mark.xfail_chrome(raises=WebDriverException,
reason='Fullscreen command not implemented')
@pytest.mark.xfail_chromiumedge(raises=WebDriverException,
reason='Fullscreen command not implemented')
reason='Fullscreen command not implemented')
@pytest.mark.xfail_firefox(raises=WebDriverException,
reason='Fullscreen command not implemented')
@pytest.mark.xfail_safari(raises=WebDriverException,
Expand Down Expand Up @@ -149,7 +149,7 @@ def test_should_fullscreen_the_current_window(driver):
@pytest.mark.xfail_chrome(raises=WebDriverException,
reason='Minimize command not implemented')
@pytest.mark.xfail_chromiumedge(raises=WebDriverException,
reason='Minimize command not implemented')
reason='Minimize command not implemented')
@pytest.mark.xfail_firefox(raises=WebDriverException,
reason='Minimize command not implemented')
@pytest.mark.xfail_safari(raises=WebDriverException,
Expand Down

0 comments on commit d0198ec

Please sign in to comment.