Skip to content

Commit 4bf18b9

Browse files
authored
Merge pull request #26 from eriknw/isort
run isort
2 parents d5ed2bb + 4f85733 commit 4bf18b9

20 files changed

+667
-276
lines changed

continuous_integration/environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- graphblas=5.1.3
6+
- graphblas=5.1.10
77
- cffi
88
- cython
99
- numpy

setup.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ parentdir_prefix=suitesparse_graphblas-
3535
[tool:pytest]
3636
testpaths = suitesparse_graphblas/tests
3737

38+
[isort]
39+
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
40+
profile = black
41+
skip_gitignore = true
42+
float_to_top = true
43+
default_section = THIRDPARTY
44+
known_first_party = suitesparse_graphblas

setup.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
from setuptools import setup, find_packages, Extension
1+
import os
2+
import sys
23
from glob import glob
34

5+
import numpy as np
6+
from setuptools import Extension, find_packages, setup
7+
8+
import versioneer
9+
410
try:
511
from Cython.Build import cythonize
612
from Cython.Compiler.Options import get_directive_defaults
713

814
use_cython = True
915
except ImportError:
1016
use_cython = False
11-
import numpy as np
12-
import os
13-
import sys
14-
import versioneer
17+
1518

1619
is_win = sys.platform.startswith("win")
1720
define_macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]

suitesparse_graphblas/__init__.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from ._graphblas import ffi, lib # noqa
2-
from . import utils
3-
from ._version import get_versions
1+
from . import _version
42
from . import exceptions as ex
3+
from . import utils
4+
from ._graphblas import ffi, lib # noqa
55

66

77
def is_initialized():
@@ -46,10 +46,6 @@ def initialize(*, blocking=False, memory_manager="numpy"):
4646
raise ValueError(f'memory_manager argument must be "numpy" or "c"; got: {memory_manager!r}')
4747

4848

49-
__version__ = get_versions()["version"]
50-
del get_versions
51-
52-
5349
def libget(name):
5450
"""Helper to get items from GraphBLAS which might be GrB or GxB"""
5551
try:
@@ -170,3 +166,6 @@ def check_status(obj, response_code):
170166
error_func(string, obj)
171167
text = ffi.string(string[0]).decode()
172168
raise _error_code_lookup[response_code](text)
169+
170+
171+
__version__ = _version.get_versions()["version"]

0 commit comments

Comments
 (0)