Skip to content

Commit 26786be

Browse files
committed
Renamed ContextFlag.__count to ContextFlag._count.
1 parent 9fd1fcc commit 26786be

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cmd2/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -628,20 +628,20 @@ def __init__(self) -> None:
628628
629629
It should never go below 0.
630630
"""
631-
self.__count = 0
631+
self._count = 0
632632

633633
def __bool__(self) -> bool:
634634
"""Define the truth value of an object when it is used in a boolean context."""
635-
return self.__count > 0
635+
return self._count > 0
636636

637637
def __enter__(self) -> None:
638638
"""When a with block is entered, the __enter__ method of the context manager is called."""
639-
self.__count += 1
639+
self._count += 1
640640

641641
def __exit__(self, *args: object) -> None:
642642
"""When the execution flow exits a with statement block this is called, regardless of whether an exception occurred."""
643-
self.__count -= 1
644-
if self.__count < 0:
643+
self._count -= 1
644+
if self._count < 0:
645645
raise ValueError("count has gone below 0")
646646

647647

0 commit comments

Comments
 (0)