Our regex used to determine the flake8 and python versions from this output uses a . to match all characters between these two version strings; however by default . will not match the newlines that are in the wrapped flake8 output. We fix this by appending the PCRE_DOTALL modifier, which allows . to match newlines and fixes the version parsing.
flake8
uses theargparse
library, which by default wraps output to a max character limit.When running
flake8 --version
in an environment with severalflake8
plugins, the resulting output can easily be split over multiple lines, e.g.Our regex used to determine the
flake8
andpython
versions from this output uses a.
to match all characters between these two version strings; however by default.
will not match the newlines that are in the wrappedflake8
output. We fix this by appending thePCRE_DOTALL
modifier, which allows.
to match newlines and fixes the version parsing.