Skip to content

Commit

Permalink
[ISSUE #19733] fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi297 committed Dec 2, 2022
1 parent 0623bbb commit 3c16721
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions airbyte-cdk/python/airbyte_cdk/sources/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#


import json
import logging
from abc import ABC, abstractmethod
from collections import defaultdict
Expand Down Expand Up @@ -54,7 +53,7 @@ def read_state(self, state_path: str) -> Union[List[AirbyteStateMessage], Mutabl
:return: The complete stream state based on the connector's previous sync
"""
if state_path:
state_obj = json.loads(open(state_path, "r").read())
state_obj = self.read_json_file(state_path)
if not state_obj:
return self._emit_legacy_state_format({})
is_per_stream_state = isinstance(state_obj, List)
Expand Down

0 comments on commit 3c16721

Please sign in to comment.