Skip to content

Commit

Permalink
remove some lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcflugen committed Jan 30, 2024
1 parent 265cd79 commit c34c6bf
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 15 deletions.
3 changes: 1 addition & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Changelog for bmi-example-python
- Match bmipy (#12)
- Use GitHub Actions for continuous integration (#15)
- Dimensionalize flattened values passed into set_value (#17)
- Update CI (#18)
- Update CI (#18)
- Switch from versioneer to zest.releaser
- Remove obsolete docs directory

Expand All @@ -46,4 +46,3 @@ Changelog for bmi-example-python
------------------

- Initial release

1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3 changes: 2 additions & 1 deletion heat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Model the diffusion of heat over a 2D plate."""
from ._version import __version__
from .bmi_heat import BmiHeat
from .heat import Heat, solve_2d
from .heat import Heat
from .heat import solve_2d

__all__ = ["__version__", "BmiHeat", "solve_2d", "Heat"]
2 changes: 1 addition & 1 deletion heat/bmi_heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize(self, filename=None):
if filename is None:
self._model = Heat()
elif isinstance(filename, str):
with open(filename, "r") as file_obj:
with open(filename) as file_obj:
self._model = Heat.from_file_like(file_obj.read())
else:
self._model = Heat.from_file_like(filename)
Expand Down
2 changes: 1 addition & 1 deletion heat/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0):
return np.add(temp, out, out=out)


class Heat(object):
class Heat:

"""Solve the Heat equation on a grid.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def clean(session):

shutil.rmtree("build", ignore_errors=True)
shutil.rmtree("dist", ignore_errors=True)
shutil.rmtree(f"src/{PROJECT}.egg-info", ignore_errors=True)
shutil.rmtree(f"{PROJECT}.egg-info", ignore_errors=True)
shutil.rmtree(".pytest_cache", ignore_errors=True)
shutil.rmtree(".venv", ignore_errors=True)

Expand Down
5 changes: 1 addition & 4 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
bmi-tester
coveralls
pytest
pytest-cov
black
isort
ruff
bmi-tester
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bmipy
numpy
scipy
pyyaml
bmipy
scipy
3 changes: 2 additions & 1 deletion tests/get_value_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_less
from numpy.testing import assert_array_almost_equal
from numpy.testing import assert_array_less

from heat import BmiHeat

Expand Down
4 changes: 3 additions & 1 deletion tests/irf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

import numpy as np
import yaml
from numpy.testing import assert_almost_equal, assert_array_equal, assert_array_less
from numpy.testing import assert_almost_equal
from numpy.testing import assert_array_equal
from numpy.testing import assert_array_less

from heat import BmiHeat

Expand Down

0 comments on commit c34c6bf

Please sign in to comment.