Skip to content

Commit

Permalink
Merge pull request #917 from mattwthompson/pydantic-v1-cleaner
Browse files Browse the repository at this point in the history
Use `from pydantic.v1` everywhere
  • Loading branch information
IAlibay authored Aug 7, 2024
2 parents 5f2cbe3 + 788c002 commit 27c9116
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- pytest-xdist
- pytest-cov
- pytest-rerunfailures
- pydantic >1
- pydantic >=1.10.17
- pyyaml
- coverage
- cinnabar ~=0.4.0
Expand Down
5 changes: 1 addition & 4 deletions openfe/protocols/openmm_afe/equil_afe_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@
)
import numpy as np

try:
from pydantic.v1 import validator
except ImportError:
from pydantic import validator # type: ignore[assignment]
from pydantic.v1 import validator


class AlchemicalSettings(SettingsBaseModel):
Expand Down
5 changes: 1 addition & 4 deletions openfe/protocols/openmm_md/plain_md_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
SettingsBaseModel,
OpenMMSystemGeneratorFFSettings
)
try:
from pydantic.v1 import validator
except ImportError:
from pydantic import validator # type: ignore[assignment]
from pydantic.v1 import validator


class PlainMDProtocolSettings(Settings):
Expand Down
5 changes: 1 addition & 4 deletions openfe/protocols/openmm_rfe/equil_rfe_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
OpenFFPartialChargeSettings,
)

try:
from pydantic.v1 import validator
except ImportError:
from pydantic import validator # type: ignore[assignment]
from pydantic.v1 import validator


class LambdaSettings(SettingsBaseModel):
Expand Down
5 changes: 1 addition & 4 deletions openfe/protocols/openmm_utils/omm_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
)


try:
from pydantic.v1 import validator
except ImportError:
from pydantic import validator # type: ignore[assignment]
from pydantic.v1 import validator


class BaseSolvationSettings(SettingsBaseModel):
Expand Down

0 comments on commit 27c9116

Please sign in to comment.