Skip to content

Commit

Permalink
Merge branch 'main' into auto-dependency-upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury authored Jan 23, 2024
2 parents a41d755 + c9cf74c commit bcd786f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
9 changes: 4 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: '^docs/conf.py'
exclude: "^docs/conf.py"

default_stages: [commit]

Expand All @@ -12,7 +12,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.13
hooks:
- id: ruff
args: [--fix, --ignore, "D,E501", "--show-fixes"]
Expand Down Expand Up @@ -41,7 +41,6 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier

- id: prettier
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- `Solution.__add_`: Bugfix in the addition operation `+` that could cause problems with
child classes (i.e., classes that inherit from `Solution`) to work improperly

### Changed

- Removed deprecated `pkg_resources` import in favor of `importlib.resources`
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ version_scheme = "no-guess-dev"
[tool.black]
line-length = 120

[tool.ruff.lint]
target-version = "py38"
[tool.ruff]
target-version = "py39"
line-length = 120
exclude = [".dat"]
src = ["src"]

[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand Down
4 changes: 2 additions & 2 deletions src/pyEQL/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import math
import os
import warnings
from importlib.resources import files
from functools import lru_cache
from importlib.resources import files
from pathlib import Path
from typing import Any, Literal

Expand Down Expand Up @@ -153,7 +153,7 @@ def __init__(
if database is None:
# load the default database, which is a JSONStore
db_store = IonDB
elif isinstance(database, (str, Path)):
elif isinstance(database, str | Path):
db_store = JSONStore(str(database), key="formula")
logger.info(f"Created maggma JSONStore from .json file {database}")
else:
Expand Down

0 comments on commit bcd786f

Please sign in to comment.