summaryrefslogtreecommitdiff
path: root/buildscripts/linter/pydocstyle.py
blob: 9420d42354c390c9f57a676b3db42c91791c9d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""PyDocStyle linter support module."""
from __future__ import absolute_import
from __future__ import print_function

from typing import List

from . import base


class PyDocstyleLinter(base.LinterBase):
    """PyDocStyle linter."""

    def __init__(self):
        # type: () -> None
        """Create a pydocstyle linter."""
        super(PyDocstyleLinter, self).__init__("pydocstyle", "1.1.1")

    def get_lint_version_cmd_args(self):
        # type: () -> List[str]
        """Get the command to run a linter version check."""
        return ["--version"]

    def get_lint_cmd_args(self, file_name):
        # type: (str) -> List[str]
        """Get the command to run a linter."""
        return [file_name]