# Buggy code
def _check_useless_math_operator(
    self,
    op: ast.operator,
    left: ast.AST,
    right: Optional[ast.AST] = None,
) -> None:
    if isinstance(left, ast.Num) and right:
        if left.n == 1:
            left = None
    non_negative_numbers = self._get_non_negative_nodes(left, right)

    for number in non_negative_numbers:
        forbidden = self._meaningless_operations.get(number.n, None)
        if forbidden and isinstance(op, forbidden):
            self.add_violation(
                consistency.MeaninglessNumberOperationViolation(number),
            )


# Traceback (ValueError)
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/click/termui.py", line 372, in style
bits.append('\033[%dm' % (_ansi_colors.index(fg) + 30))
ValueError: tuple.index(x): x not in tuple
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 666, in _run_checks
return checker.run_checks()
File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 598, in run_checks
self.run_ast_checks()
File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 502, in run_ast_checks
for (line_number, offset, text, check) in runner:
File "/usr/local/lib/python3.7/site-packages/nitpick/plugin.py", line 58, in run
yield from checker.check_exists()
File "/usr/local/lib/python3.7/site-packages/nitpick/files/base.py", line 87, in check_exists
yield from self.check_rules()
File "/usr/local/lib/python3.7/site-packages/nitpick/files/setup_cfg.py", line 67, in check_rules
yield from self.show_missing_keys(section, key, values)
File "/usr/local/lib/python3.7/site-packages/nitpick/files/setup_cfg.py", line 106, in show_missing_keys
yield self.flake8_error(4, ": section [{}] has some missing key/value pairs. Use this:".format(section), output)
File "/usr/local/lib/python3.7/site-packages/nitpick/mixin.py", line 20, in flake8_error
click.style("\n{}".format(suggestion.rstrip()), fg="bright_green") if suggestion else ""
File "/usr/local/lib/python3.7/site-packages/click/termui.py", line 374, in style
raise TypeError('Unknown color %r' % fg)
TypeError: Unknown color 'bright_green'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/flake8", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/flake8/main/cli.py", line 18, in main
app.run(argv)
File "/usr/local/lib/python3.7/site-packages/flake8/main/application.py", line 393, in run
self._run(argv)
File "/usr/local/lib/python3.7/site-packages/flake8/main/application.py", line 381, in _run
self.run_checks()
File "/usr/local/lib/python3.7/site-packages/flake8/main/application.py", line 300, in run_checks
self.file_checker_manager.run()
File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 329, in run
self.run_parallel()
File "/usr/local/lib/python3.7/site-packages/flake8/checker.py", line 293, in run_parallel
for ret in pool_map:
File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 354, in <genexpr>
return (item for chunk in result for item in chunk)
File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 748, in next
raise value
TypeError: Unknown color 'bright_green'

# Fixed code
def _check_useless_math_operator(
    self,
    op: ast.operator,
    left: Optional[ast.AST],
    right: Optional[ast.AST] = None,
) -> None:
    if isinstance(left, ast.Num) and left.n in self._left_special_cases:
        if right and isinstance(op, self._left_special_cases[left.n]):
            left = None

    non_negative_numbers = self._get_non_negative_nodes(left, right)

    for number in non_negative_numbers:
        forbidden = self._meaningless_operations.get(number.n, None)
        if forbidden and isinstance(op, forbidden):
            self.add_violation(
                consistency.MeaninglessNumberOperationViolation(number),
            )