MCPcopy
hub / github.com/scrapy/scrapy / global_object_name

Function global_object_name

scrapy/utils/python.py:274–283  ·  view source on GitHub ↗

Return the full import path of the given object. >>> from scrapy import Request >>> global_object_name(Request) 'scrapy.http.request.Request' >>> global_object_name(Request.replace) 'scrapy.http.request.Request.replace'

(obj: Any)

Source from the content-addressed store, hash-verified

272
273
274def global_object_name(obj: Any) -> str:
275 """Return the full import path of the given object.
276
277 >>> from scrapy import Request
278 >>> global_object_name(Request)
279 'scrapy.http.request.Request'
280 >>> global_object_name(Request.replace)
281 'scrapy.http.request.Request.replace'
282 """
283 return f"{obj.__module__}.{obj.__qualname__}"
284
285
286if hasattr(sys, "pypy_version_info"):

Callers 15

__init__Method · 0.90
_process_chainMethod · 0.90
scrapedMethod · 0.90
handlerFunction · 0.90
verify_installed_reactorFunction · 0.90
_maybeDeferred_coroFunction · 0.90
__init__Method · 0.90
_process_spider_inputMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected