pnijhara / gitsome

Use of an unneeded not detected PYL-C0113
Anti-pattern
Major
4 years ago4 years old
Consider changing "not (a, m) in _actprint" to "(a, m) not in _actprint"
2694            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
Consider changing "not 'italic' in parent_emphasis" to "'italic' not in parent_emphasis"
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
Consider changing "not 'bold' in parent_emphasis" to "'bold' not in parent_emphasis"
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