Skip to content

Commit

Permalink
Only issue deprecation warning once
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed Oct 5, 2023
1 parent fddab2c commit 769e088
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions databricks_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@
import warnings


_has_issued_warning = False

def issue_deprecation_warning():
global _has_issued_warning
if _has_issued_warning:
return
_has_issued_warning = True
# Don't print deprecation warning when running the CLI itself.
import sys
import os
Expand Down

0 comments on commit 769e088

Please sign in to comment.