Skip to content

Commit

Permalink
Merge pull request #165 from rasg-affiliates/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
steven-murray authored Jan 14, 2025
2 parents 9589f74 + d6c157a commit fb32bcc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.6
rev: v0.9.1
hooks:
# Run the linter.
- id: ruff
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ build:
conda:
environment: docs/environment.yml

sphinx:
configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
python:
install:
Expand Down
2 changes: 1 addition & 1 deletion src/py21cmsense/baseline_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class BaselineRange(BaselineFilter):
def _bl_max_vld(self, att, val):
if val <= self.bl_min:
raise ValueError(
"bl_max must be greater than bl_min, got " f"bl_min={self.bl_min} and bl_max={val}"
f"bl_max must be greater than bl_min, got bl_min={self.bl_min} and bl_max={val}"
)

def __call__(self, bl: tp.Length) -> bool:
Expand Down
3 changes: 1 addition & 2 deletions src/py21cmsense/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def _check_type(self: Any, att: attr.Attribute, val: Any):
raise UnitError(f"{att.name} must be an astropy Quantity!")
if val.unit.physical_type != unit:
raise un.UnitConversionError(
f"{att.name} must have physical type of '{unit}'. "
f"Got '{val.unit.physical_type}'"
f"{att.name} must have physical type of '{unit}'. Got '{val.unit.physical_type}'"
)

return _check_type
Expand Down

0 comments on commit fb32bcc

Please sign in to comment.