Skip to content

Commit 2c8fd66

Browse files
Ken KundertKen Kundert
authored andcommitted
nits
1 parent 069a889 commit 2c8fd66

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

doc/user.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ in a pipeline.
810810

811811
If *stream_policy* is 'errors' then all error messages are sent to the standard
812812
error stream and all other messages are sent to the standard output. This is
813-
also commonly used for programs that act s filters.
813+
also commonly used for programs that act as filters.
814814

815815
If *stream_policy* is 'all' stderr is used for all informants that do not
816816
explicitly set their stream. By default, no informants explicitly set their

inform/inform.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,9 @@ def __format__(self, formatter=None):
14891489
def __str__(self):
14901490
return self.format()
14911491

1492+
def __bool__(self):
1493+
return bool(self.value)
1494+
14921495
def __repr__(self):
14931496
return f"{self.__class__.__name__}({self.count})"
14941497

@@ -1598,12 +1601,12 @@ def __format__(self, formatter):
15981601
def __str__(self):
15991602
return self.defaults[0] if self.value else self.defaults[1]
16001603

1601-
def __repr__(self):
1602-
return f"{self.__class__.__name__}({bool(self.value)})"
1603-
16041604
def __bool__(self):
16051605
return bool(self.value)
16061606

1607+
def __repr__(self):
1608+
return f"{self.__class__.__name__}({bool(self.value)})"
1609+
16071610
# full_stop {{{2
16081611
def full_stop(sentence, end='.', allow='.?!', remove=r'\\'):
16091612
"""Add period to end of string if it is needed.
@@ -3267,7 +3270,7 @@ def terminate(self, status=None, exit=True):
32673270
| 2: invalid invocation
32683271
| 3: panic
32693272
3270-
Of, if your program naturally want to signal pass or failure using its exit status:
3273+
Of, if your program naturally wants to signal pass or failure using its exit status:
32713274
| 0: success
32723275
| 1: failure
32733276
| 2: error

0 commit comments

Comments
 (0)