Length
- class ase2sprkkr.common.generated_configuration_definitions.Length(*of, default_values=<object object>)[source]
Sometimes, the length of some array should appear in the config file
Class hierarchy
Constructor
- is_generated = True
- is_validated = True
- is_stored = True
- type
alias of
int
- _NO_DEFAULT = <object object>
- validators = (<function _validate_length>,)
- copy(**kwargs)[source]
Copy this modifier while preserving length metadata overrides.
- Parameters:
kwargs (Any)
- Return type:
ase2sprkkr.common.generated_configuration_definitions.Length
- stage_generated(option, transaction, value, key=<object object>)[source]
Resize source arrays to
valuewithintransaction.keyis accepted for the generated-value protocol but length assignment always applies to whole values.- Parameters:
option (ase2sprkkr.common.options.Option)
transaction (ase2sprkkr.common.configuration_transaction.ConfigurationTransaction)
value (Any)
key (Any)
- Return type:
None
- getter(container, key=None)[source]
Return the length of the first source value in
container.- Parameters:
container (Any)
key (Any)
- Return type:
int | None
- validate_parsed(option)[source]
Check whether
optionwas present as required by parse conditions.- Parameters:
option (ase2sprkkr.common.options.Option)
- Return type:
None