Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#67)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.9.1](astral-sh/ruff-pre-commit@v0.8.4...v0.9.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Jan 19, 2025
1 parent e4797ce commit fffae48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
rev: v0.9.1
hooks:
# Run the linter.
- id: ruff
Expand Down
18 changes: 9 additions & 9 deletions src/data/test_data_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ def test_data_loading(load_data):
for line in load_data:
try:
data = json.loads(line)
assert isinstance(
data, dict
), "Each line should be a JSON object (dictionary)"
assert isinstance(data, dict), (
"Each line should be a JSON object (dictionary)"
)

# Check for "conversations" key
assert (
"conversations" in data
), "'conversations' key is missing in the JSON object"
assert isinstance(
data["conversations"], list
), "'conversations' should be a list"
assert "conversations" in data, (
"'conversations' key is missing in the JSON object"
)
assert isinstance(data["conversations"], list), (
"'conversations' should be a list"
)

# Check for 'user' and 'assistant' roles within "conversations"
roles = {conv["role"] for conv in data["conversations"] if "role" in conv}
Expand Down

0 comments on commit fffae48

Please sign in to comment.