Skip to content

Commit

Permalink
BUG: Fully respect PYTHONWARNINGS, when set
Browse files Browse the repository at this point in the history
Fixes #331
  • Loading branch information
kernc committed Mar 31, 2021
1 parent c2c1320 commit da98dd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pdoc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ def main(_args=None):
global args
args = _args or parser.parse_args()

warnings.simplefilter("once", DeprecationWarning)
# If warnings not externally managed, show deprecation warnings
if not sys.warnoptions:
warnings.simplefilter("once", DeprecationWarning)

if args.close_stdin:
sys.stdin.close()
Expand Down

0 comments on commit da98dd7

Please sign in to comment.