File tree Expand file tree Collapse file tree
src/ydata_profiling/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 lint :
2222 if : github.actor != 'renovate[bot]'
2323 name : Lint source code
24- runs-on : ubuntu-24 .04
24+ runs-on : ubuntu-22 .04
2525
2626 steps :
2727 - uses : actions/checkout@v4
4040 - name : Set up Python 3.11
4141 uses : actions/setup-python@v5
4242 with :
43- python-version : ' 3.13 '
43+ python-version : ' 3.11 '
4444
4545 - uses : actions/cache@v4
4646 name : Cache pip dependencies
@@ -85,15 +85,15 @@ jobs:
8585
8686 validate-docs :
8787 name : Validate Docs
88- runs-on : ubuntu-24 .04
88+ runs-on : ubuntu-22 .04
8989
9090 steps :
9191 - uses : actions/checkout@v4
9292
9393 - name : Setup Python 3.11
9494 uses : actions/setup-python@v5
9595 with :
96- python-version : ' 3.13 '
96+ python-version : ' 3.11 '
9797
9898 - name : Cache pip dependencies
9999 id : cache
Original file line number Diff line number Diff line change 22 References and information regarding ydata-profiling and ydata-sdk
33"""
44import importlib .util
5+ import os
56
67_displayed_banner = False
8+ SUPPRESS_BANNER = bool (os .getenv ("YDATA_SUPPRESS_BANNER" , "" ))
79
810link = "https://ydata.ai/register"
911title = "Upgrade to ydata-sdk"
@@ -15,10 +17,8 @@ def in_jupyter_notebook() -> bool:
1517 if importlib .util .find_spec ("IPython" ) is not None :
1618 from IPython import get_ipython
1719
18- isiPython = not get_ipython () is None
19- else :
20- isiPython = False
21- return isiPython
20+ return get_ipython () is not None
21+ return False
2222
2323
2424class DisplayInfo :
@@ -61,8 +61,8 @@ def display_message(self) -> None:
6161
6262def display_banner () -> None :
6363 global _displayed_banner
64- banner_info = DisplayInfo (title = title , info_text = info_text )
6564
66- if not _displayed_banner :
65+ if not _displayed_banner and not SUPPRESS_BANNER :
66+ banner_info = DisplayInfo (title = title , info_text = info_text )
6767 banner_info .display_message ()
6868 _displayed_banner = True
You can’t perform that action at this time.
0 commit comments