Skip to content

Commit bc68edc

Browse files
committed
Please some pylint errors
1 parent f38b574 commit bc68edc

File tree

1 file changed

+7
-8
lines changed
  • instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx

1 file changed

+7
-8
lines changed

instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
# pylint: disable=too-many-lines
1415
"""
1516
Usage
1617
-----
@@ -782,13 +783,11 @@ def _instrument(self, **kwargs):
782783
)
783784

784785
def _uninstrument(self, **kwargs):
785-
import httpx
786-
787786
unwrap(httpx.HTTPTransport, "handle_request")
788787
unwrap(httpx.AsyncHTTPTransport, "handle_async_request")
789788

790-
def _handle_request_wrapper(
791-
self,
789+
@staticmethod
790+
def _handle_request_wrapper( # pylint: disable=too-many-locals
792791
wrapped,
793792
instance,
794793
args,
@@ -861,8 +860,8 @@ def _handle_request_wrapper(
861860

862861
return response
863862

864-
async def _handle_async_request_wrapper(
865-
self,
863+
@staticmethod
864+
async def _handle_async_request_wrapper( # pylint: disable=too-many-locals
866865
wrapped,
867866
instance,
868867
args,
@@ -979,14 +978,14 @@ def instrument_client(
979978
async_request_hook = request_hook
980979
request_hook = None
981980
else:
982-
request_hook = request_hook
981+
# request_hook already set
983982
async_request_hook = None
984983

985984
if iscoroutinefunction(response_hook):
986985
async_response_hook = response_hook
987986
response_hook = None
988987
else:
989-
response_hook = response_hook
988+
# response_hook already set
990989
async_response_hook = None
991990

992991
if hasattr(client._transport, "handle_request"):

0 commit comments

Comments
 (0)