Skip to content

Latest commit

 

History

History
88 lines (63 loc) · 2.52 KB

api.rst

File metadata and controls

88 lines (63 loc) · 2.52 KB

pycodestyle API

.. module:: pycodestyle

The library provides classes which are usable by third party tools.

The :class:`StyleGuide` class is used to configure a style guide checker instance to check multiple files.

The :class:`Checker` class can be used to check a single file.

.. autoclass:: StyleGuide(parse_argv=False, config_file=None, parser=None, paths=None, report=None, **kwargs)

   .. automethod:: init_report(reporter=None)
   .. automethod:: check_files(paths=None)
   .. automethod:: input_file(filename, lines=None, expected=None, line_offset=0)
   .. automethod:: input_dir(dirname)
   .. automethod:: excluded(filename, parent=None)
   .. automethod:: ignore_code(code)
   .. automethod:: get_checks(argument_name)

.. autoclass:: Checker(filename=None, lines=None, report=None, **kwargs)

   .. automethod:: readline
   .. automethod:: run_check(check, argument_names)
   .. automethod:: check_physical(line)
   .. automethod:: build_tokens_line
   .. automethod:: check_logical
   .. automethod:: check_ast
   .. automethod:: generate_tokens
   .. automethod:: check_all(expected=None, line_offset=0)


.. autoclass:: BaseReport(options)

   .. automethod:: start
   .. automethod:: stop
   .. automethod:: init_file(filename, lines, expected, line_offset)
   .. automethod:: increment_logical_line
   .. automethod:: error(line_number, offset, text, check)
   .. automethod:: get_file_results
   .. automethod:: get_count(prefix='')
   .. automethod:: get_statistics(prefix='')
   .. automethod:: print_statistics(prefix='')
   .. automethod:: print_benchmark

.. autoclass:: FileReport

.. autoclass:: StandardReport

.. autoclass:: DiffReport


.. autofunction:: expand_indent(line)
.. autofunction:: mute_string(text)
.. autofunction:: read_config(options, args, arglist, parser)
.. autofunction:: process_options(arglist=None, parse_argv=False, config_file=None)
.. autofunction:: register_check(func_or_cls, codes=None)