예제 #1
0
파일: errors.py 프로젝트: fishroot/nemoa
 def __init__(self, name: str, obj: object) -> None:
     that = entity.get_name(type(obj))
     msg = f"{name} requires to be callable not {that}"
     super().__init__(msg)
예제 #2
0
파일: errors.py 프로젝트: fishroot/nemoa
 def __init__(self, name: str, obj: object, ref: Class) -> None:
     this = entity.get_name(ref)
     that = entity.get_name(obj)
     msg = f"{name} requires to be a subclass of {this} not {that}"
     super().__init__(msg)
예제 #3
0
파일: errors.py 프로젝트: fishroot/nemoa
 def __init__(self, name: str, obj: object, classinfo: object) -> None:
     this = entity.get_lang_repr(classinfo, separator='or')
     that = entity.get_name(type(obj))
     msg = f"{name} requires to be of type {this} not {that}"
     super().__init__(msg)
예제 #4
0
파일: errors.py 프로젝트: fishroot/nemoa
 def __init__(self, name: str, obj: object) -> None:
     this = entity.get_name(obj)
     msg = f"{this} missing required keyword argument '{name}'"
     super().__init__(msg)
예제 #5
0
파일: errors.py 프로젝트: fishroot/nemoa
 def __init__(self, obj: object, attr: str) -> None:
     that = entity.get_name(obj)
     msg = f"'{attr}' is a read-only attribute of {that}"
     super().__init__(msg)
예제 #6
0
파일: errors.py 프로젝트: fishroot/nemoa
 def __init__(self, obj: object, attr: str) -> None:
     that = entity.get_name(obj)
     msg = f"{that} has no attribute '{attr}'"
     super().__init__(msg)