Skip to content

Commit 1d25972

Browse files
committed
brackets are important, requests broken on 3.10? (pytest-dev/pytest#9174)
1 parent 273c743 commit 1d25972

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

checkpy/lib/basic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import pathlib
55
import re
6-
import requests
76
import shutil
87
import sys
98
import traceback
@@ -281,7 +280,8 @@ def download(fileName, source):
281280
r = requests.get(url, allow_redirects=True)
282281
with open('google.ico', 'wb') as f:
283282
f.write(r.content)
284-
""", DeprecationWarning, stacklevel=2)
283+
""", DeprecationWarning, stacklevel=2)
284+
import requests
285285
try:
286286
r = requests.get(source)
287287
except requests.exceptions.ConnectionError as e:

checkpy/tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def runMethod():
188188
if getattr(self._function, "isTestFunction", False):
189189
self._function(test)()
190190
elif (len(inspect.getfullargspec(self._function).args) >
191-
1 if inspect.ismethod(self._function) else 0):
191+
(1 if inspect.ismethod(self._function) else 0)):
192192
self._function(test)
193193
else:
194194
self._function()

0 commit comments

Comments
 (0)