cosapp.utils.naming¶
Functions
|
Checks if an expression contains 't' |
|
Strip references to common port names from variable name |
Classes
|
Port names common to every system. |
|
Class handling admissible names, through regular expression filtering |
- class cosapp.utils.naming.CommonPorts(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
Port names common to every system.
INWARDS : For orphan input variables OUTWARDS : For orphan output variables MODEVARS_IN : For orphan input mode variables MODEVARS_OUT : For orphan output mode variables
- INWARDS = 'inwards'¶
- MODEVARS_IN = 'modevars_in'¶
- MODEVARS_OUT = 'modevars_out'¶
- OUTWARDS = 'outwards'¶
- class cosapp.utils.naming.NameChecker(pattern='^[A-Za-z][\\w]*$', message="Name must start with a letter, and contain only alphanumerics and '_'", excluded: List[str] = [])[source]¶
Bases:
object
Class handling admissible names, through regular expression filtering
- property excluded: Tuple[str]¶
- is_valid(name: str) bool [source]¶
Method indicating whether or not a name is valid, under the current rule
- property message: str¶
Returns a human-readable message, transcripted from regexp rule
- property pattern: str¶