Sha256: c0414fea736a4c24c03dfcb2d3be8f7068826f350c1150d612299ffdcfdcdac7
Contents?: true
Size: 577 Bytes
Versions: 11
Compression:
Stored size: 577 Bytes
Contents
module Overcommit::Hook::PreCommit # Runs `pydocstyle` against any modified Python files. # # @see https://pypi.python.org/pypi/pydocstyle class Pydocstyle < Base def run result = execute(command, args: applicable_files) return :pass if result.success? output = result.stderr.chomp # example message: # path/to/file.py:1 in public method `foo`: # D102: Docstring missing extract_messages( output.gsub(/:\s+/, ': ').split("\n"), /^(?<file>(?:\w:)?[^:]+):(?<line>\d+)/ ) end end end
Version data entries
11 entries across 9 versions & 2 rubygems