We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cce4b5 commit 6a805faCopy full SHA for 6a805fa
2 files changed
sentry_sdk/client.py
@@ -48,6 +48,9 @@ def _get_options(*args, **kwargs):
48
else:
49
dsn = None
50
51
+ if len(args) > 1:
52
+ raise TypeError("Only single positional argument is expected")
53
+
54
rv = dict(DEFAULT_OPTIONS)
55
options = dict(*args, **kwargs)
56
if dsn is not None and options.get("dsn") is None:
tests/test_client.py
@@ -887,3 +887,9 @@ def test_max_breadcrumbs_option(
887
capture_message("dogs are great")
888
889
assert len(events[0]["breadcrumbs"]["values"]) == expected_breadcrumbs
890
891
892
+def test_multiple_positional_args(sentry_init):
893
+ with pytest.raises(TypeError) as exinfo:
894
+ sentry_init(1, None)
895
+ assert "Only single positional argument is expected" in str(exinfo.value)
0 commit comments