From 9a2e4b2c8326a550b07c78c66681dd0d6d3b470b Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Thu, 14 Nov 2024 17:02:52 -0700 Subject: [PATCH] fix precommit errors --- docs/conf.py | 2 +- mbuild/__init__.py | 2 ++ mbuild/lib/atoms/__init__.py | 1 + mbuild/lib/bulk_materials/__init__.py | 1 + mbuild/lib/moieties/__init__.py | 1 + mbuild/lib/molecules/__init__.py | 1 + mbuild/lib/recipes/__init__.py | 1 + mbuild/lib/surfaces/__init__.py | 1 + mbuild/tests/test_pattern.py | 12 ++---------- mbuild/tests/test_silica_surface.py | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3b4f22dd6..4a777e90a 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,6 +16,7 @@ import sys import mock +import sphinx_rtd_theme # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -205,7 +206,6 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'default' -import sphinx_rtd_theme html_theme = "sphinx_rtd_theme" hhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/mbuild/__init__.py b/mbuild/__init__.py index 33dfcd2a1..f1e9084fc 100644 --- a/mbuild/__init__.py +++ b/mbuild/__init__.py @@ -1,3 +1,5 @@ +# ruff: noqa: F401 +# ruff: noqa: F403 """mBuild: a hierarchical, component based molecule builder.""" from mbuild.box import Box diff --git a/mbuild/lib/atoms/__init__.py b/mbuild/lib/atoms/__init__.py index fb9d8cbc1..819cffc95 100644 --- a/mbuild/lib/atoms/__init__.py +++ b/mbuild/lib/atoms/__init__.py @@ -1,3 +1,4 @@ +# ruff: noqa: F401 """mBuild library of atoms.""" from mbuild.lib.atoms.c3 import C3 diff --git a/mbuild/lib/bulk_materials/__init__.py b/mbuild/lib/bulk_materials/__init__.py index 9417b96a3..4f9e7fac3 100644 --- a/mbuild/lib/bulk_materials/__init__.py +++ b/mbuild/lib/bulk_materials/__init__.py @@ -1,3 +1,4 @@ +# ruff: noqa: F401 """mBuild bulk materials library.""" from mbuild.lib.bulk_materials.amorphous_silica_bulk import AmorphousSilicaBulk diff --git a/mbuild/lib/moieties/__init__.py b/mbuild/lib/moieties/__init__.py index a1978ef0b..9b76338bb 100644 --- a/mbuild/lib/moieties/__init__.py +++ b/mbuild/lib/moieties/__init__.py @@ -1,3 +1,4 @@ +# ruff: noqa: F401 """mBuild library of common chemical moieties.""" from mbuild.lib.moieties.ch2 import CH2 diff --git a/mbuild/lib/molecules/__init__.py b/mbuild/lib/molecules/__init__.py index f39893047..85c103d38 100644 --- a/mbuild/lib/molecules/__init__.py +++ b/mbuild/lib/molecules/__init__.py @@ -1,3 +1,4 @@ +# ruff: noqa: F401 """Library of molecules for mBuild.""" from mbuild.lib.molecules.ethane import Ethane diff --git a/mbuild/lib/recipes/__init__.py b/mbuild/lib/recipes/__init__.py index 9d4fc9b3a..16f148718 100644 --- a/mbuild/lib/recipes/__init__.py +++ b/mbuild/lib/recipes/__init__.py @@ -1,3 +1,4 @@ +# ruff: noqa: F401 """Library of recipes for mBuild.""" from mbuild.lib.recipes.alkane import Alkane diff --git a/mbuild/lib/surfaces/__init__.py b/mbuild/lib/surfaces/__init__.py index b7e40474b..0be2e9eba 100644 --- a/mbuild/lib/surfaces/__init__.py +++ b/mbuild/lib/surfaces/__init__.py @@ -1,3 +1,4 @@ +# ruff: noqa: F401 """mBuild surface library.""" from mbuild.lib.surfaces.amorphous_silica_surface import AmorphousSilicaSurface diff --git a/mbuild/tests/test_pattern.py b/mbuild/tests/test_pattern.py index b2c583863..7b0cbe1de 100644 --- a/mbuild/tests/test_pattern.py +++ b/mbuild/tests/test_pattern.py @@ -162,16 +162,8 @@ def test_scaling(self): def test_scaling_error_string(self): with pytest.raises(TypeError): - pattern = mb.Random3DPattern(10, scale="tim") + mb.Random3DPattern(10, scale="tim") def test_scaling_error_dict(self): with pytest.raises(TypeError): - pattern = mb.Random3DPattern(10, scale={"name": "tim"}) - - def test_scaling_error_dict(self): - with pytest.raises(TypeError): - pattern = mb.Random3DPattern(10, scale={"name": "tim"}) - - def test_scaling_error_dict(self): - with pytest.raises(TypeError): - pattern = mb.Random3DPattern(10, scale={"name": "tim"}) + mb.Random3DPattern(10, scale={"name": "tim"}) diff --git a/mbuild/tests/test_silica_surface.py b/mbuild/tests/test_silica_surface.py index 1df0a8fd6..d7545a1b3 100644 --- a/mbuild/tests/test_silica_surface.py +++ b/mbuild/tests/test_silica_surface.py @@ -18,4 +18,4 @@ def test_create_amorphous_silica_surface(self): def test_amorphous_silica_surface_error(self): with pytest.raises(ValueError): - surface = AmorphousSilicaSurface(surface_roughness=2) + AmorphousSilicaSurface(surface_roughness=2)