flake8: Check W503 (line break before binary op)

This commit is contained in:
Florian Bruhin 2016-01-21 21:52:57 +01:00
parent 526441bcae
commit 289891a828
3 changed files with 6 additions and 7 deletions

View File

@ -79,8 +79,8 @@ def get_window(via_ipc, force_window=False, force_tab=False,
if open_target not in ('tab-silent', 'tab-bg-silent'): if open_target not in ('tab-silent', 'tab-bg-silent'):
window_to_raise = window window_to_raise = window
if window_to_raise is not None: if window_to_raise is not None:
window_to_raise.setWindowState(window.windowState() & window_to_raise.setWindowState(
~Qt.WindowMinimized | Qt.WindowActive) window.windowState() & ~Qt.WindowMinimized | Qt.WindowActive)
window_to_raise.raise_() window_to_raise.raise_()
window_to_raise.activateWindow() window_to_raise.activateWindow()
QApplication.instance().alert(window_to_raise) QApplication.instance().alert(window_to_raise)

View File

@ -217,9 +217,9 @@ def _has_explicit_scheme(url):
# after the scheme delimiter. Since we don't know of any URIs # after the scheme delimiter. Since we don't know of any URIs
# using this and want to support e.g. searching for scoped C++ # using this and want to support e.g. searching for scoped C++
# symbols, we treat this as not an URI anyways. # symbols, we treat this as not an URI anyways.
return (url.isValid() and url.scheme() return (url.isValid() and url.scheme() and
and not url.path().startswith(' ') not url.path().startswith(' ') and
and not url.path().startswith(':')) not url.path().startswith(':'))
def is_special_url(url): def is_special_url(url):

View File

@ -6,7 +6,6 @@ exclude = .venv,.hypothesis,.git,__pycache__,resources.py
# E501: Line too long # E501: Line too long
# E402: module level import not at top of file # E402: module level import not at top of file
# E266: too many leading '#' for block comment # E266: too many leading '#' for block comment
# W503: line break before binary operator
# F401: Unused import # F401: Unused import
ignore = E128,E226,E265,E501,E402,E266,W503,F401 ignore = E128,E226,E265,E501,E402,E266,F401
max-complexity = 12 max-complexity = 12