Skip to content

Commit 1a7ebdc

Browse files
authored
Merge pull request #1262 from scikit-hep/ikrommyd/add-version-pyi-to-0.7.x
chore: add `version.pyi` in coffea 0.7.x
2 parents c2a5231 + 7357f0a commit 1a7ebdc

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Diff for: coffea/__init__.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,14 @@
2727
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2828
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30-
from coffea._version import __version__
30+
from . import _version
3131
import re
32-
import sys
3332

33+
__version__ = _version.__version__
3434
version = __version__
3535
version_info = tuple(re.split(r"[-\.]", __version__))
3636

3737

38-
if sys.version_info.major < 3:
39-
import warnings
40-
41-
warnings.warn("coffea only supports python3 as of 1 January 2020!")
42-
warnings.warn(
43-
"If you are using python2 and run into problems please submit a pull request to fix the issue!"
44-
)
45-
4638
# control severity for utils.deprecate
4739
deprecations_as_errors = False
4840

Diff for: coffea/version.pyi

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from __future__ import annotations
2+
3+
version: str
4+
version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]

0 commit comments

Comments
 (0)