MCPcopy
hub / github.com/PyGithub/PyGithub / __makeSimpleAttribute

Method __makeSimpleAttribute

github/GithubObject.py:301–305  ·  view source on GitHub ↗
(value: Any, type: type[T])

Source from the content-addressed store, hash-verified

299
300 @staticmethod
301 def __makeSimpleAttribute(value: Any, type: type[T]) -> Attribute[T]:
302 if value is None or isinstance(value, type):
303 return _ValuedAttribute(value) # type: ignore
304 else:
305 return _BadAttribute(value, type) # type: ignore
306
307 @staticmethod
308 def __makeSimpleListAttribute(value: list, type: type[T]) -> Attribute[T]:

Callers 6

_makeStringAttributeMethod · 0.80
_makeIntAttributeMethod · 0.80
_makeDecimalAttributeMethod · 0.80
_makeFloatAttributeMethod · 0.80
_makeBoolAttributeMethod · 0.80
_makeDictAttributeMethod · 0.80

Calls 2

_ValuedAttributeClass · 0.85
_BadAttributeClass · 0.85

Tested by

no test coverage detected