Skip to content

Commit

Permalink
f schema
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Dec 4, 2024
1 parent 76b864b commit f9a9282
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t3/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class T3Sensitivity(BaseModel):
"""
A class for validating input.T3.sensitivity arguments
"""
adapter: constr(max_length=255) = 'RMGConstantTP'
adapter: Optional[constr(max_length=255)] = 'RMGConstantTP'
atol: confloat(gt=0, lt=1e-1) = 1e-6
rtol: confloat(gt=0, lt=1e-1) = 1e-4
global_observables: Optional[List[str]] = None # ['IDT', 'ESR', 'SL']
Expand All @@ -117,9 +117,9 @@ class Config:
@validator('adapter')
def check_adapter(cls, value):
"""T3Sensitivity.adapter validator"""
if value not in _registered_simulate_adapters.keys():
if value not in _registered_simulate_adapters.keys() and value is not None:
raise ValueError(
f'The "T3 sensitivity adapter" argument of {value} was not present in the keys for the '
f'The sensitivity adapter argument "{value}" was not present in the keys for the '
f'_registered_simulate_adapters dictionary: {list(_registered_simulate_adapters.keys())}'
f'\nPlease check that the simulate adapter was registered properly.')
return value
Expand Down

0 comments on commit f9a9282

Please sign in to comment.