From e5264abea205130c615aeb8743f86d03fc3ba8e4 Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Tue, 21 Jan 2025 19:05:17 +1100 Subject: [PATCH] Update Ruff --- .pre-commit-config.yaml | 2 +- openff/pablo/_pdb.py | 12 ++++++------ pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db7643e..278c1b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: exclude: "_tests" - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.8.6 + rev: v0.9.2 hooks: # Run the linter. - id: ruff diff --git a/openff/pablo/_pdb.py b/openff/pablo/_pdb.py index c3a53fd..48f79e2 100644 --- a/openff/pablo/_pdb.py +++ b/openff/pablo/_pdb.py @@ -394,9 +394,9 @@ def _add_to_molecule( if this_molecule.atom(i).metadata["canonical_name"] == linking_atom_name: linking_atom_idx = i break - assert ( - linking_atom_idx is not None - ), "Expecting a prior bond, but no linking atom found" + assert linking_atom_idx is not None, ( + "Expecting a prior bond, but no linking atom found" + ) # Add the residue to the current molecule atom_name_to_mol_idx: dict[str, int] = {} @@ -449,9 +449,9 @@ def _add_to_molecule( if linking_atom_idx is not None: linking_bond = residue_match.residue_definition.linking_bond - assert ( - linking_bond is not None - ), "linking_atom_idx is only set when linking_atom_idx is None" + assert linking_bond is not None, ( + "linking_atom_idx is only set when linking_atom_idx is None" + ) this_molecule._add_bond( atom1=linking_atom_idx, atom2=atom_name_to_mol_idx[linking_bond.atom2], diff --git a/pyproject.toml b/pyproject.toml index a74df69..d8e3704 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ maintainers = [ { name = "Josh Mitchell", email = "josh.mitchell@openforcefield.org" }, ] readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.11" dependencies = [ ] keywords = [