Skip to content

Commit 435913a

Browse files
committed
PL: Add stub file for top-level __init__.py
1 parent 4ee2a49 commit 435913a

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

nibabel/__init__.pyi

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
2+
# vi: set ft=python sts=4 ts=4 sw=4 et:
3+
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
4+
#
5+
# See COPYING file distributed along with the NiBabel package for the
6+
# copyright and license terms.
7+
#
8+
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9+
10+
import os
11+
from typing import Any
12+
13+
# module imports
14+
from nibabel import analyze as ana
15+
from nibabel import ecat, imagestats, mriutils, orientations, streamlines, viewers
16+
from nibabel import nifti1 as ni1
17+
from nibabel import spm2analyze as spm2
18+
from nibabel import spm99analyze as spm99
19+
20+
# object imports
21+
from nibabel.analyze import AnalyzeHeader, AnalyzeImage
22+
from nibabel.arrayproxy import is_proxy
23+
from nibabel.cifti2 import Cifti2Header, Cifti2Image
24+
from nibabel.fileholders import FileHolder, FileHolderError
25+
from nibabel.freesurfer import MGHImage
26+
from nibabel.funcs import as_closest_canonical, concat_images, four_to_three, squeeze_image
27+
from nibabel.gifti import GiftiImage
28+
from nibabel.imageclasses import all_image_classes
29+
from nibabel.info import long_description as __doc__
30+
from nibabel.loadsave import load, save
31+
from nibabel.minc1 import Minc1Image
32+
from nibabel.minc2 import Minc2Image
33+
from nibabel.nifti1 import Nifti1Header, Nifti1Image, Nifti1Pair
34+
from nibabel.nifti2 import Nifti2Header, Nifti2Image, Nifti2Pair
35+
from nibabel.orientations import (
36+
OrientationError,
37+
aff2axcodes,
38+
apply_orientation,
39+
flip_axis,
40+
io_orientation,
41+
)
42+
from nibabel.pkg_info import __version__
43+
from nibabel.pkg_info import get_pkg_info as _get_pkg_info
44+
from nibabel.spm2analyze import Spm2AnalyzeHeader, Spm2AnalyzeImage
45+
from nibabel.spm99analyze import Spm99AnalyzeHeader, Spm99AnalyzeImage
46+
47+
try:
48+
from pytest import ExitCode # type: ignore[import] # noqa: PT013
49+
except (ImportError, ModuleNotFoundError):
50+
class ExitCode(int): ... # type: ignore[no-redef]
51+
52+
def get_info() -> dict[str, str]: ...
53+
def test(
54+
label: Any = None,
55+
verbose: int = 1,
56+
extra_argv: list[Any] | None = None,
57+
doctests: bool = False,
58+
coverage: bool = False,
59+
raise_warnings: Any = None,
60+
timer: Any = False,
61+
) -> ExitCode: ...
62+
def bench(
63+
label: Any = None, verbose: int = 1, extra_argv: list[Any] | None = None
64+
) -> ExitCode: ...
65+
66+
__all__ = [
67+
'AnalyzeHeader',
68+
'AnalyzeImage',
69+
'Cifti2Header',
70+
'Cifti2Image',
71+
'FileHolder',
72+
'FileHolderError',
73+
'GiftiImage',
74+
'MGHImage',
75+
'Minc1Image',
76+
'Minc2Image',
77+
'Nifti1Header',
78+
'Nifti1Image',
79+
'Nifti1Pair',
80+
'Nifti2Header',
81+
'Nifti2Image',
82+
'Nifti2Pair',
83+
'OrientationError',
84+
'Spm2AnalyzeHeader',
85+
'Spm2AnalyzeImage',
86+
'Spm99AnalyzeHeader',
87+
'Spm99AnalyzeImage',
88+
'__doc__',
89+
'__version__',
90+
'_get_pkg_info',
91+
'aff2axcodes',
92+
'all_image_classes',
93+
'ana',
94+
'apply_orientation',
95+
'as_closest_canonical',
96+
'bench',
97+
'concat_images',
98+
'ecat',
99+
'flip_axis',
100+
'four_to_three',
101+
'get_info',
102+
'imagestats',
103+
'io_orientation',
104+
'is_proxy',
105+
'load',
106+
'mriutils',
107+
'ni1',
108+
'orientations',
109+
'os',
110+
'save',
111+
'spm2',
112+
'spm99',
113+
'squeeze_image',
114+
'streamlines',
115+
'test',
116+
'viewers',
117+
]

0 commit comments

Comments
 (0)