Skip to content

Commit

Permalink
Merge pull request #185 from mdshw5/develop
Browse files Browse the repository at this point in the history
Remove deprecated argument to random.shuffle
  • Loading branch information
mdshw5 committed Jan 31, 2022
2 parents ede9a1b + 5a81446 commit b6ca41b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyfaidx/__init__.py
Expand Up @@ -352,8 +352,8 @@ def __init__(self,
try:
from Bio import bgzf
from Bio import __version__ as bgzf_version
from distutils.version import LooseVersion
if LooseVersion(bgzf_version) < LooseVersion('1.73'):
from packaging.version import Version
if Version(bgzf_version) < Version('1.73'):
raise ImportError
except ImportError:
raise ImportError(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_Fasta_synchronization.py
Expand Up @@ -22,7 +22,7 @@ def __init__(self, rand, result_map, result_lock, name, seq):

seq_len = len(seq)
sub_seq_slices = list(slice(i, min(i + 20, seq_len)) for i in range(0, seq_len, 20))
random.shuffle(sub_seq_slices, rand.random)
random.shuffle(sub_seq_slices)

self.result_map = result_map
self.result_lock = result_lock
Expand Down Expand Up @@ -52,7 +52,7 @@ def __init__(self, rand, name, seq):

seq_len = len(seq)
sub_seq_slices = list(slice(i, min(i + 20, seq_len)) for i in range(0, seq_len, 20))
random.shuffle(sub_seq_slices, rand.random)
random.shuffle(sub_seq_slices)

self.name = name
self.seq = seq
Expand Down

0 comments on commit b6ca41b

Please sign in to comment.