lint: superfluous-parens and useless-suppression

Unnecessary parens after '=' keyword
This commit is contained in:
toofar 2023-02-06 19:20:50 +13:00
parent 9ec6d44910
commit ce134c9662
5 changed files with 7 additions and 7 deletions

View File

@ -490,7 +490,7 @@ class AbstractZoom(QObject):
raise ValueError("Can't zoom to factor {}!".format(factor))
default_zoom_factor = float(config.val.zoom.default) / 100
self._default_zoom_changed = (factor != default_zoom_factor)
self._default_zoom_changed = factor != default_zoom_factor
self._zoom_factor = factor
self._set_factor_internal(factor)

View File

@ -204,9 +204,9 @@ def test_misconfigured_user_dirs(request, server, temp_basedir_env,
home = tmp_path / 'home'
home.mkdir()
temp_basedir_env['HOME'] = str(home)
config_userdir_dir = (tmp_path / 'config')
config_userdir_dir = tmp_path / 'config'
config_userdir_dir.mkdir(parents=True)
config_userdir_file = (tmp_path / 'config' / 'user-dirs.dirs')
config_userdir_file = tmp_path / 'config' / 'user-dirs.dirs'
config_userdir_file.touch()
assert temp_basedir_env['XDG_CONFIG_HOME'] == str(tmp_path / 'config')
@ -307,7 +307,7 @@ def test_webengine_download_suffix(request, quteproc_new, tmp_path):
(tmp_path / 'user-dirs.dirs').write_text(
'XDG_DOWNLOAD_DIR={}'.format(download_dir))
env = {'XDG_CONFIG_HOME': str(tmp_path)}
args = (['--temp-basedir'] + _base_args(request.config))
args = ['--temp-basedir'] + _base_args(request.config)
quteproc_new.start(args, env=env)
quteproc_new.set_setting('downloads.location.prompt', 'false')

View File

@ -34,7 +34,7 @@ def test_version(message_mock, caplog):
with caplog.at_level(logging.WARNING):
assert spell.version('malformed_filename') is None
msg = message_mock.getmsg(usertypes.MessageLevel.warning)
expected = ("Found a dictionary with a malformed name: malformed_filename")
expected = "Found a dictionary with a malformed name: malformed_filename"
assert msg.text == expected

View File

@ -286,7 +286,7 @@ class FakeWebView:
def load_history(self, data):
self.loaded_history = data
if self.raise_error is not None:
raise self.raise_error # pylint: disable=raising-bad-type
raise self.raise_error
@pytest.fixture

View File

@ -281,7 +281,7 @@ class TestArguments:
def test_basedir_relative(self, tmpdir):
"""Test --basedir with a relative path."""
basedir = (tmpdir / 'basedir')
basedir = tmpdir / 'basedir'
basedir.ensure(dir=True)
with tmpdir.as_cwd():
args = types.SimpleNamespace(basedir='basedir')