Skip to content

Commit

Permalink
fix ?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Sep 7, 2024
1 parent 13b28d4 commit 0fe7434
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ostap/core/ostap_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
'all_strings' , ## all argumets of string types?
)
# =============================================================================
import sys, os, math, array, cppyy
from sys import version_info as python_version
import sys, os, math, array
from sys import version_info as python_version
# =============================================================================
# logging
# =============================================================================
Expand Down Expand Up @@ -82,7 +82,15 @@
list_types = list , tuple
listlike_types = list_types + ( set , C.Sequence , array.array )
# =============================================================================
std = cppyy.gbl.std
if sys.warnoptions or os.environ.get ( 'OSTAP_CMAKE_TEST', False ) :
import warnings
with warnings.catch_warnings():
warnings.simplefilter ( "always" )
import cppyy
else :
import cppyy
# ==============================================================================
std = cppyy.gbl.std
if hasattr ( std , 'string' ) : string_types += ( std.string , )
if hasattr ( std , 'string_view' ) : string_types += ( std.string_view , )
# =============================================================================
Expand Down

0 comments on commit 0fe7434

Please sign in to comment.