heros.inspect¶
Attributes¶
Functions¶
|
Mark a callable with a provided marker. |
|
Inspect if a callable is marked with a provided marker. |
|
Mark a callable as a event. |
|
Mark a callable as a method of a (remote) hero. |
|
Mark a callable is local only. |
|
Mark a callable as force remote. |
|
Check if a callable is a event. |
|
Check if a callable is a method of a (remote) hero. |
|
Check if a callable is a local only. |
|
Check if a callable is a force remote. |
Module Contents¶
- heros.inspect.HERO_EVENT_ATTRIBUTE = 'hero_event'¶
- heros.inspect.HERO_METHOD_ATTRIBUTE = 'hero_method'¶
- heros.inspect.LOCAL_ONLY_ATTRIBUTE = 'local_only'¶
- heros.inspect.FORCE_REMOTE_ATTRIBUTE = 'force_remote'¶
- heros.inspect._mark(func: callable, marker: str) callable ¶
Mark a callable with a provided marker.
- Parameters:
func – callable to mark
marker – attribute name at which to mark the callable
- Returns:
The marked callable.
- heros.inspect._is_marked(func: callable, marker: str) bool ¶
Inspect if a callable is marked with a provided marker.
- Parameters:
func – callable to check
marker – attribute name of the attribute to check
- Returns:
The value of the marker. False if the marker is not present.
- heros.inspect.mark_hero_event(func: callable) callable ¶
Mark a callable as a event.
- Parameters:
func – callable to mark
- Returns:
The marked callable.
- heros.inspect.mark_hero_method(func: callable) callable ¶
Mark a callable as a method of a (remote) hero.
- Parameters:
func – callable to mark
- Returns:
The marked callable.
- heros.inspect.mark_local_only(func: callable) callable ¶
Mark a callable is local only.
- Parameters:
func – callable to mark
- Returns:
The marked callable.
- heros.inspect.local_only¶
- heros.inspect.mark_force_remote(func: callable) callable ¶
Mark a callable as force remote.
- Parameters:
func – callable to mark
- Returns:
The marked callable.
- heros.inspect.force_remote¶
- heros.inspect.is_hero_event(func: callable) bool ¶
Check if a callable is a event.
- Parameters:
func – callable to check
- Returns:
The value of the marker. False if the marker is not present.
- heros.inspect.is_hero_method(func: callable) bool ¶
Check if a callable is a method of a (remote) hero.
- Parameters:
func – callable to check
- Returns:
The value of the marker. False if the marker is not present.
- heros.inspect.is_local_only(func: callable) bool ¶
Check if a callable is a local only.
- Parameters:
func – callable to check
- Returns:
The value of the marker. False if the marker is not present.
- heros.inspect.is_force_remote(func: callable) bool ¶
Check if a callable is a force remote.
- Parameters:
func – callable to check
- Returns:
The value of the marker. False if the marker is not present.