Skip to content

Commit 051cfde

Browse files
committed
1 parent 2ebe5ff commit 051cfde

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

nixio/block.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
# modification, are permitted under the terms of the BSD License. See
88
# LICENSE file in the root of the Project.
99

10-
try:
11-
from sys import maxint
12-
except ImportError:
13-
from sys import maxsize as maxint
10+
from sys import maxsize
11+
1412
import numpy as np
1513
from inspect import isclass
1614
try:
@@ -396,7 +394,7 @@ def find_sources(self, filtr=lambda _: True, limit=None):
396394
:rtype: list of nixio.Source
397395
"""
398396
if limit is None:
399-
limit = maxint
397+
limit = maxsize
400398
return finders._find_sources(self, filtr, limit)
401399

402400
def pprint(self, indent=2, max_length=120, extra=True, start_depth=0):

nixio/file.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
import os
1010
import gc
1111
import numpy as np
12+
from sys import maxsize
1213
from warnings import warn
1314

14-
try:
15-
from sys import maxint
16-
except ImportError:
17-
from sys import maxsize as maxint
1815
import h5py
1916

2017
from .hdf5.h5group import H5Group
@@ -478,7 +475,7 @@ def find_sections(self, filtr=lambda _: True, limit=None):
478475
:rtype: list of nixio.Section
479476
"""
480477
if limit is None:
481-
limit = maxint
478+
limit = maxsize
482479
return finders._find_sections(self, filtr, limit)
483480

484481
@property

nixio/section.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
# Redistribution and use in source and binary forms, with or without
77
# modification, are permitted under the terms of the BSD License. See
88
# LICENSE file in the root of the Project.
9-
try:
10-
from sys import maxint
11-
except ImportError:
12-
from sys import maxsize as maxint
9+
from sys import maxsize
1310
try:
1411
from collections.abc import Sequence, Iterable
1512
except ImportError:
1613
from collections import Sequence, Iterable
14+
1715
import numpy as np
16+
1817
from .container import Container, SectionContainer
1918
from .datatype import DataType
2019
from .entity import Entity
@@ -386,7 +385,7 @@ def find_sections(self, filtr=lambda _: True, limit=None):
386385
:rtype: list of nixio.Section
387386
"""
388387
if limit is None:
389-
limit = maxint
388+
limit = maxsize
390389
return finders._find_sections(self, filtr, limit)
391390

392391
def find_related(self, filtr=lambda _: True):

nixio/source.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Redistribution and use in source and binary forms, with or without
77
# modification, are permitted under the terms of the BSD License. See
88
# LICENSE file in the root of the Project.
9-
from sys import maxsize as maxint
9+
from sys import maxsize
1010

1111
from .import exceptions
1212
from .entity import Entity
@@ -173,7 +173,7 @@ def find_sources(self, filtr=lambda _: True, limit=None):
173173
:rtype: list of nixio.Source
174174
"""
175175
if limit is None:
176-
limit = maxint
176+
limit = maxsize
177177
return finders._find_sources(self, filtr, limit)
178178

179179
@property

0 commit comments

Comments
 (0)