Skip to content

Commit

Permalink
better detection of Path for Python 3.13 (address #413)
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Nov 5, 2024
1 parent 9d99d2e commit a03a75a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pybedtools/bedtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import gzip
import pysam
from warnings import warn
import pathlib
from pathlib import Path

from .helpers import (
Expand Down Expand Up @@ -495,7 +496,7 @@ def __init__(self, fn=None, from_string=False, remote=False):

else:
# if fn is a Path object, we have to use its string representation
if "pathlib.PurePath" in str(type(fn).__mro__):
if isinstance(fn, pathlib.PurePath):
fn = str(fn)

# our work is already done
Expand Down

0 comments on commit a03a75a

Please sign in to comment.