Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytest-dev/pytest
/ hasinit
Function
hasinit
src/_pytest/python.py:911–915 ·
view source on GitHub ↗
(obj: object)
Source
from the content-addressed store, hash-verified
909
910
911
def
hasinit(obj: object) -> bool:
912
init: object = getattr(obj,
"__init__"
, None)
913
if
init:
914
return
init != object.__init__
915
return
False
916
917
918
def
hasnew(obj: object) -> bool:
Callers
1
collect
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected