Skip to content

Commit 878d260

Browse files
committed
Apply Ruff formatting
1 parent 1e03fc2 commit 878d260

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/typecode/contenttype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ def is_binary(self):
364364
self._is_binary = is_binary(self.location)
365365
if not self._is_binary:
366366
try:
367-
with open(self.location, 'rb') as f:
368-
if f.read(5) == b'%PDF-':
367+
with open(self.location, "rb") as f:
368+
if f.read(5) == b"%PDF-":
369369
self._is_binary = True
370370
except Exception:
371371
pass

tests/test_contenttype.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def test_size(self):
398398

399399
def test_is_binary_handles_pdf_signature(self):
400400
test_dir = self.get_temp_dir()
401-
test_file = os.path.join(test_dir, 'test_pdf.pdf')
402-
with open(test_file, 'wb') as f:
403-
f.write(b'%PDF-1.4\nSome binary content \x00\xff')
404-
assert is_binary(test_file) is True
401+
test_file = os.path.join(test_dir, "test_pdf.pdf")
402+
with open(test_file, "wb") as f:
403+
f.write(b"%PDF-1.4\nSome binary content \x00\xff")
404+
assert is_binary(test_file) is True

0 commit comments

Comments
 (0)