not
detected PYL-C01132694 for a, p, m in actlist:
2695 if a in st_action:
2696 if p is not st_actionp[a]:
2697 if not (a, m) in _actprint:2698 log.debug(' ! %-15s [ %s ]', a, m)
2699 not_used = 1
2700 _actprint[(a, m)] = 1
322 # handle Google's text emphasis
323 strikethrough = 'line-through' in tag_emphasis and self.hide_strikethrough
324 bold = 'bold' in tag_emphasis and not 'bold' in parent_emphasis
325 italic = 'italic' in tag_emphasis and not 'italic' in parent_emphasis326 fixed = google_fixed_width_font(tag_style) and not \
327 google_fixed_width_font(parent_style) and not self.pre
328
321
322 # handle Google's text emphasis
323 strikethrough = 'line-through' in tag_emphasis and self.hide_strikethrough
324 bold = 'bold' in tag_emphasis and not 'bold' in parent_emphasis325 italic = 'italic' in tag_emphasis and not 'italic' in parent_emphasis
326 fixed = google_fixed_width_font(tag_style) and not \
327 google_fixed_width_font(parent_style) and not self.pre
The boolean expression contains an unneeded negation and can be re-written without using the not
statement.
def categorize_number(num):
if not num % 2 == 0:
print("The number is odd.")
else:
print("The number is even.")
Here, the condition not num % 2 == 0
contains an unneeded not
and can be changed into num % 2 != 0
.
A clearer and more straightforward approach would look like this:
def categorize_number(num):
if num % 2 != 0:
print("The number is odd.")
else:
print("The number is even.")