Fix lint
This commit is contained in:
parent
b4272975f2
commit
f306ca9b53
@ -31,6 +31,7 @@ exclude = .venv,.hypothesis,.git,__pycache__,resources.py
|
|||||||
# (PEP257 got changed, but let's stick to the old standard)
|
# (PEP257 got changed, but let's stick to the old standard)
|
||||||
# D402: First line should not be function's signature (false-positives)
|
# D402: First line should not be function's signature (false-positives)
|
||||||
# FI10 - FI15: __future__ import missing
|
# FI10 - FI15: __future__ import missing
|
||||||
|
# H101: Use TODO(NAME)
|
||||||
# H201: bare except
|
# H201: bare except
|
||||||
# H238: Use new-stule classes
|
# H238: Use new-stule classes
|
||||||
# H301: one import per line
|
# H301: one import per line
|
||||||
@ -43,7 +44,7 @@ ignore =
|
|||||||
P101,P102,P103,
|
P101,P102,P103,
|
||||||
D102,D103,D104,D105,D209,D211,D402,
|
D102,D103,D104,D105,D209,D211,D402,
|
||||||
FI10,FI11,FI12,FI13,FI14,FI15,
|
FI10,FI11,FI12,FI13,FI14,FI15,
|
||||||
H201,H238,H301,H306
|
H101,H201,H238,H301,H306
|
||||||
max-complexity = 12
|
max-complexity = 12
|
||||||
putty-auto-ignore = True
|
putty-auto-ignore = True
|
||||||
putty-ignore =
|
putty-ignore =
|
||||||
|
@ -58,7 +58,7 @@ URLS_TO_CHECK = ('http://localhost',
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def data_tmpdir(monkeypatch, tmpdir):
|
def data_tmpdir(monkeypatch, tmpdir):
|
||||||
"""Set tmpdir as datadir"""
|
"""Set tmpdir as datadir."""
|
||||||
tmpdir = str(tmpdir)
|
tmpdir = str(tmpdir)
|
||||||
monkeypatch.setattr('qutebrowser.utils.standarddir.data', lambda: tmpdir)
|
monkeypatch.setattr('qutebrowser.utils.standarddir.data', lambda: tmpdir)
|
||||||
|
|
||||||
@ -193,7 +193,6 @@ def generic_blocklists(directory):
|
|||||||
- a local text file with valid hosts
|
- a local text file with valid hosts
|
||||||
- a remote text file without valid hosts format.
|
- a remote text file without valid hosts format.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# remote zip file with 1 hosts file and 2 useless files
|
# remote zip file with 1 hosts file and 2 useless files
|
||||||
file1 = create_blocklist(directory, blocked_hosts=CLEAN_HOSTS,
|
file1 = create_blocklist(directory, blocked_hosts=CLEAN_HOSTS,
|
||||||
name='README', line_format='not_correct')
|
name='README', line_format='not_correct')
|
||||||
@ -372,7 +371,7 @@ def test_blocking_with_whitelist(config_stub, basedir, download_stub,
|
|||||||
|
|
||||||
def test_config_change_initial(config_stub, basedir, download_stub,
|
def test_config_change_initial(config_stub, basedir, download_stub,
|
||||||
data_tmpdir, tmpdir):
|
data_tmpdir, tmpdir):
|
||||||
"""Test the following scenario:
|
"""Test emptying host-block-lists on restart with existing blocked_hosts.
|
||||||
|
|
||||||
- A blocklist is present in host-block-lists and blocked_hosts is populated
|
- A blocklist is present in host-block-lists and blocked_hosts is populated
|
||||||
- User quits qutebrowser, empties host-block-lists from his config
|
- User quits qutebrowser, empties host-block-lists from his config
|
||||||
|
Loading…
Reference in New Issue
Block a user