econchick/interrogate

re.error: nothing to repeat at position 0

Opened this issue · 1 comments

Environment

  • interrogate version(s) (interrogate --version: interrogate, version 1.5.0
  • Operating System(s): Ubuntu 22.04 LTS
  • Python version(s): 3.10

Description of the bug

Interrogate throws an exception (re.error) on every command.

Traceback (most recent call last): File "/home/id986507/.local/bin/interrogate", line 8, in <module> sys.exit(main()) File "/home/id986507/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/id986507/.local/lib/python3.10/site-packages/click/core.py", line 781, in main with self.make_context(prog_name, args, **extra) as ctx: File "/home/id986507/.local/lib/python3.10/site-packages/click/core.py", line 700, in make_context self.parse_args(ctx, args) File "/home/id986507/.local/lib/python3.10/site-packages/click/core.py", line 1048, in parse_args value, args = param.handle_parse_result(ctx, opts, args) File "/home/id986507/.local/lib/python3.10/site-packages/click/core.py", line 1630, in handle_parse_result value = invoke_param_callback(self.callback, ctx, self, value) File "/home/id986507/.local/lib/python3.10/site-packages/click/core.py", line 123, in invoke_param_callback return callback(ctx, param, value) File "/home/id986507/.local/lib/python3.10/site-packages/interrogate/utils.py", line 36, in parse_regex return [re.compile(v) for v in values] File "/home/id986507/.local/lib/python3.10/site-packages/interrogate/utils.py", line 36, in <listcomp> return [re.compile(v) for v in values] File "/usr/lib/python3.10/re.py", line 251, in compile return _compile(pattern, flags) File "/usr/lib/python3.10/re.py", line 303, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.10/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.10/sre_parse.py", line 950, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) File "/usr/lib/python3.10/sre_parse.py", line 443, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, File "/usr/lib/python3.10/sre_parse.py", line 668, in _parse raise source.error("nothing to repeat", re.error: nothing to repeat at position 0

What you expected to happen

Check for documentation in files, the normal behavior

How to reproduce (as minimally and precisely as possible)

id986507@BHLCWG3:~/saf$ interrogate --generate-badge saf/badge.svg Traceback (most recent call last): File "/home/id986507/.local/bin/interrogate", line 8, in <module>

Anthing else we need to know?

Hi @Charlie-Root - I can't seem to reproduce this error. If it's still an issue for you, can you provide a test file that you're trying to run it on?