Skip to content

Commit 4b1b0fe

Browse files
authored
Merge pull request #987 from MolSSI/docs_fix
Remove using BaseModel.Config as base class for pydantic model Config
2 parents 006e076 + 4e37d8a commit 4b1b0fe

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

qcfractal/qcfractal/components/gridoptimization/record_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class GridoptimizationServiceState(BaseModel):
136136
This represents the current state of a gridoptimization service
137137
"""
138138

139-
class Config(BaseModel.Config):
139+
class Config:
140140
extra = Extra.forbid
141141
allow_mutation = True
142142
validate_assignment = True

qcfractal/qcfractal/components/neb/record_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class NEBServiceState(BaseModel):
6868
This represents the current state of a NEB service
6969
"""
7070

71-
class Config(BaseModel.Config):
71+
class Config:
7272
extra = Extra.forbid
7373
allow_mutation = True
7474
validate_assignment = True

qcfractal/qcfractal/components/torsiondrive/record_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class TorsiondriveServiceState(BaseModel):
7272
This represents the current state of a torsiondrive service
7373
"""
7474

75-
class Config(BaseModel.Config):
75+
class Config:
7676
extra = Extra.forbid
7777
allow_mutation = True
7878
validate_assignment = True

qcfractalcompute/qcfractalcompute/compute_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ManagerStatistics(BaseModel):
6262
Manager statistics
6363
"""
6464

65-
class Config(BaseModel.Config):
65+
class Config:
6666
extra = Extra.forbid
6767

6868
last_update_time: float = Field(default_factory=time.time)

qcportal/qcportal/record_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Provenance(BaseModel):
2828
version: str = Field("", description="The version of the creator, blank otherwise")
2929
routine: str = Field("", description="The name of the routine or function within the creator, blank otherwise.")
3030

31-
class Config(BaseModel.Config):
31+
class Config:
3232
extra: str = "allow"
3333

3434

qcportal/qcportal/singlepoint/record_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class Model(BaseModel):
3232
description="The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). "
3333
"For MM, name of the force field.",
3434
)
35-
basis: Optional[Union[str, BasisSet]] = Field( # type: ignore
35+
basis: Optional[str] = Field( # type: ignore
3636
None,
3737
description="The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for "
3838
"methods without basis sets. For molecular mechanics, name of the atom-typer.",
3939
)
4040

41-
class Config(BaseModel.Config):
41+
class Config:
4242
extra: str = "allow"
4343

4444

0 commit comments

Comments
 (0)