Skip to content

Commit

Permalink
Merge pull request #1262 from scikit-hep/ikrommyd/add-version-pyi-to-…
Browse files Browse the repository at this point in the history
…0.7.x

chore: add `version.pyi` in coffea 0.7.x
  • Loading branch information
lgray authored Jan 31, 2025
2 parents c2a5231 + 7357f0a commit 1a7ebdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 2 additions & 10 deletions coffea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,14 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from coffea._version import __version__
from . import _version
import re
import sys

__version__ = _version.__version__
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))


if sys.version_info.major < 3:
import warnings

warnings.warn("coffea only supports python3 as of 1 January 2020!")
warnings.warn(
"If you are using python2 and run into problems please submit a pull request to fix the issue!"
)

# control severity for utils.deprecate
deprecations_as_errors = False

Expand Down
4 changes: 4 additions & 0 deletions coffea/version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import annotations

version: str
version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str]

0 comments on commit 1a7ebdc

Please sign in to comment.