Skip to content

Commit

Permalink
Use pathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Oct 4, 2023
1 parent acd40f2 commit 05f2fdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vallox_websocket_api/data/model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import asyncio
from collections import defaultdict
from functools import cached_property
from importlib.abc import Traversable
from importlib.resources import files
import json
import logging
from pathlib import Path
import re
from typing import Optional

Expand Down Expand Up @@ -55,7 +55,7 @@ async def read_model_from_unit(self, url) -> None:
except Exception as ex:
raise DataModelReadException(f"Failed to read model from {url}") from ex

async def read_model_from_js_file(self, js_file: Traversable) -> None:
async def read_model_from_js_file(self, js_file: Path) -> None:
try:
data = await asyncio.get_running_loop().run_in_executor(
None, js_file.read_text
Expand Down

0 comments on commit 05f2fdf

Please sign in to comment.