Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#41)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.3.0](psf/black@23.12.1...24.3.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Mar 19, 2024
1 parent 01ca20c commit 20c3307
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
args: [--line-length=80]
Expand Down
14 changes: 8 additions & 6 deletions forcefield_utilities/gmso_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,11 @@ def load_from_etree(cls, root, existing_dihedrals, existing_impropers):
]
)
register_identifiers(
existing_impropers
if el.tag == "ImproperType"
else existing_dihedrals,
(
existing_impropers
if el.tag == "ImproperType"
else existing_dihedrals
),
identifier,
el.tag + "s",
)
Expand Down Expand Up @@ -901,9 +903,9 @@ def to_gmso_potentials(self, default_units):
pairpotential_type.class2,
)

pairpotential_type_dict[
"parameters"
] = pairpotential_type.parameters(units)
pairpotential_type_dict["parameters"] = (
pairpotential_type.parameters(units)
)
pairpotential_type_dict["independent_variables"] = indep_vars(
pairpotential_type_dict["expression"],
frozenset(pairpotential_type_dict["parameters"]),
Expand Down
16 changes: 10 additions & 6 deletions forcefield_utilities/tests/test_xml_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def test_rb_torsions(self, oplsaa_foyer, missing_atom_classes_oplsaa):
and rb_torsion.class4 not in missing_atom_classes_oplsaa
):
ff_params = oplsaa_foyer.get_parameters(
group="rb_propers"
if isinstance(rb_torsion, RBProper)
else "rb_impropers",
group=(
"rb_propers"
if isinstance(rb_torsion, RBProper)
else "rb_impropers"
),
key=[
rb_torsion.class1,
rb_torsion.class2,
Expand Down Expand Up @@ -155,9 +157,11 @@ def test_periodic_torsions_gaff(self, gaff_foyer):
]
if key != ["", "c", "c1", ""]:
ff_params = gaff_foyer.get_parameters(
group="periodic_propers"
if isinstance(periodic_torsion, PeriodicProper)
else "periodic_impropers",
group=(
"periodic_propers"
if isinstance(periodic_torsion, PeriodicProper)
else "periodic_impropers"
),
key=key,
keys_are_atom_classes=True,
)
Expand Down

0 comments on commit 20c3307

Please sign in to comment.