Skip to content

Commit 633656f

Browse files
committed
Minor performance improvement (avoid local variable)
1 parent 58e7457 commit 633656f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pyomo/common/log.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ def is_debug_set(logger):
7373
"""
7474
if logger.manager.disable >= _DEBUG:
7575
return False
76-
_level = logger.getEffectiveLevel()
7776
# Filter out NOTSET and higher levels
78-
return _NOTSET < _level <= _DEBUG
77+
return _NOTSET < logger.getEffectiveLevel() <= _DEBUG
7978

8079
elif sys.version_info[:3] < (3, 13, 4):
8180
# This is inefficient (it indirectly checks effective level twice),

0 commit comments

Comments
 (0)