Skip to content

Commit f356e90

Browse files
committed
Please some pylint errors
1 parent dfb3b48 commit f356e90

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
-----
@@ -785,13 +786,11 @@ def _instrument(self, **kwargs):
785786
)
786787

787788
def _uninstrument(self, **kwargs):
788-
import httpx
789-
790789
unwrap(httpx.HTTPTransport, "handle_request")
791790
unwrap(httpx.AsyncHTTPTransport, "handle_async_request")
792791

793-
def _handle_request_wrapper(
794-
self,
792+
@staticmethod
793+
def _handle_request_wrapper( # pylint: disable=too-many-locals
795794
wrapped,
796795
instance,
797796
args,
@@ -864,8 +863,8 @@ def _handle_request_wrapper(
864863

865864
return response
866865

867-
async def _handle_async_request_wrapper(
868-
self,
866+
@staticmethod
867+
async def _handle_async_request_wrapper( # pylint: disable=too-many-locals
869868
wrapped,
870869
instance,
871870
args,
@@ -982,14 +981,14 @@ def instrument_client(
982981
async_request_hook = request_hook
983982
request_hook = None
984983
else:
985-
request_hook = request_hook
984+
# request_hook already set
986985
async_request_hook = None
987986

988987
if iscoroutinefunction(response_hook):
989988
async_response_hook = response_hook
990989
response_hook = None
991990
else:
992-
response_hook = response_hook
991+
# response_hook already set
993992
async_response_hook = None
994993

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

0 commit comments

Comments
 (0)