Skip to content

Commit 24cb49f

Browse files
committed
Remove superfluous exception parens
1 parent defe8e2 commit 24cb49f

File tree

21 files changed

+47
-46
lines changed

21 files changed

+47
-46
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def github_issue_role(name, rawtext, text, lineno, inliner, options=None, conten
7676
try:
7777
issue_num = int(text)
7878
if issue_num <= 0:
79-
raise ValueError()
79+
raise ValueError
8080
except ValueError:
8181
msg = inliner.reporter.error(f"Invalid GitHub issue: {text}", line=lineno)
8282
prb = inliner.problematic(rawtext, rawtext, msg)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ select = [
88
"UP",
99
"C4",
1010
# "TID",
11+
"RSE"
1112
]
1213
target-version = "py37"
1314

tests/storage/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get_storage_args(self):
4949
5050
:param collection: The name of the collection to create and use.
5151
"""
52-
raise NotImplementedError()
52+
raise NotImplementedError
5353

5454
@pytest_asyncio.fixture
5555
async def s(self, get_storage_args):

tests/storage/servers/davical/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def davical_args(self):
2323
elif self.storage_class.fileext == ".vcf":
2424
pytest.skip("No carddav")
2525
else:
26-
raise RuntimeError()
26+
raise RuntimeError
2727

2828
@pytest.fixture
2929
def get_storage_args(self, davical_args, request):

tests/storage/servers/fastmail/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def inner(collection="test"):
2424
elif self.storage_class.fileext == ".vcf":
2525
args["url"] = "https://carddav.fastmail.com/"
2626
else:
27-
raise RuntimeError()
27+
raise RuntimeError
2828

2929
if collection is not None:
3030
args = await slow_create_collection(

tests/storage/servers/icloud/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def inner(collection="test"):
2222
elif self.storage_class.fileext == ".vcf":
2323
args["url"] = "https://contacts.icloud.com/"
2424
else:
25-
raise RuntimeError()
25+
raise RuntimeError
2626

2727
if collection is not None:
2828
args = slow_create_collection(self.storage_class, args, collection)

tests/storage/test_filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def test_too_long_uid(self, tmpdir):
9393
@pytest.mark.asyncio
9494
async def test_post_hook_inactive(self, tmpdir, monkeypatch):
9595
def check_call_mock(*args, **kwargs):
96-
raise AssertionError()
96+
raise AssertionError
9797

9898
monkeypatch.setattr(subprocess, "call", check_call_mock)
9999

tests/storage/test_http_with_singlefile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CombinedStorage(Storage):
1919

2020
def __init__(self, url, path, *, connector, **kwargs):
2121
if kwargs.get("collection", None) is not None:
22-
raise ValueError()
22+
raise ValueError
2323

2424
super().__init__(**kwargs)
2525
self.url = url

tests/system/cli/test_discover.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ class TestStorage(Storage):
207207
def __init__(self, require_collection, **kw):
208208
if require_collection:
209209
assert not kw.get("collection")
210-
raise exceptions.CollectionRequired()
210+
raise exceptions.CollectionRequired
211211

212212
async def get(self, href: str):
213-
raise NotImplementedError()
213+
raise NotImplementedError
214214

215215
async def list(self) -> List[tuple]:
216-
raise NotImplementedError()
216+
raise NotImplementedError
217217

218218
from vdirsyncer.cli.utils import storage_names
219219

tests/unit/cli/test_fetchparams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_failed_strategy(monkeypatch, value_cache):
106106

107107
def strategy(x):
108108
calls.append(x)
109-
raise KeyboardInterrupt()
109+
raise KeyboardInterrupt
110110

111111
monkeypatch.setitem(STRATEGIES, "mystrategy", strategy)
112112

0 commit comments

Comments
 (0)