Skip to content

Commit

Permalink
[fix] Fix Syntax issue; move 'as fIn' to after the if-else in `STSD…
Browse files Browse the repository at this point in the history
…ataReader` (#3235)
  • Loading branch information
tomaarsen authored Feb 14, 2025
1 parent d4d198d commit 82fa841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sentence_transformers/readers/STSDataReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def get_examples(self, filename, max_examples=0):
with (
gzip.open(filepath, "rt", encoding="utf8")
if filename.endswith(".gz")
else open(filepath, encoding="utf-8") as fIn
):
else open(filepath, encoding="utf-8")
) as fIn:
data = csv.reader(fIn, delimiter=self.delimiter, quoting=self.quoting)
examples = []
for id, row in enumerate(data):
Expand Down

0 comments on commit 82fa841

Please sign in to comment.