From 0e50a3c60d9aea4c5d29ec4cf65406d0e9075cea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 18:22:19 -0500 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 23.3.0 → 23.9.1](https://github.com/psf/black/compare/23.3.0...23.9.1) - [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0) * Lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matthew W. Thompson --- .pre-commit-config.yaml | 4 ++-- openff/bespokefit/executor/services/models.py | 2 +- openff/bespokefit/schema/smirnoff.py | 2 +- .../tests/optimizers/forcebalance/test_factories.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a904853b..5be6d8bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: check-yaml - id: debug-statements - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.9.1 hooks: - id: black files: ^openff @@ -17,7 +17,7 @@ repos: - id: isort files: ^openff - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 files: ^openff diff --git a/openff/bespokefit/executor/services/models.py b/openff/bespokefit/executor/services/models.py index 43ce32a9..9f6ee205 100644 --- a/openff/bespokefit/executor/services/models.py +++ b/openff/bespokefit/executor/services/models.py @@ -30,7 +30,7 @@ def __gt__(self, other): def __eq__(self, other): return ( - type(self) == type(other) + type(self) is type(other) and self.id.__eq__(other.id) and self.self.__eq__(other.self) ) diff --git a/openff/bespokefit/schema/smirnoff.py b/openff/bespokefit/schema/smirnoff.py index c3dbf1e3..b53deea8 100644 --- a/openff/bespokefit/schema/smirnoff.py +++ b/openff/bespokefit/schema/smirnoff.py @@ -70,7 +70,7 @@ def from_smirnoff(cls, parameter: ParameterType): """Creates a version of this class from a SMIRNOFF parameter""" def __eq__(self, other): - return type(self) == type(other) and self.__hash__() == other.__hash__() + return type(self) is type(other) and self.__hash__() == other.__hash__() def __ne__(self, other): assert not self.__eq__(other) diff --git a/openff/bespokefit/tests/optimizers/forcebalance/test_factories.py b/openff/bespokefit/tests/optimizers/forcebalance/test_factories.py index c1299e25..76b697dd 100644 --- a/openff/bespokefit/tests/optimizers/forcebalance/test_factories.py +++ b/openff/bespokefit/tests/optimizers/forcebalance/test_factories.py @@ -69,7 +69,7 @@ def test_local_to_qc_records(result_fixture, request): LocalQCData(qc_records=[qc_result]) ) - assert type(qc_record) == type(qc_result) + assert type(qc_record) is type(qc_result) assert molecule.to_smiles() == expected_molecule.to_smiles() assert molecule.n_conformers == expected_molecule.n_conformers