Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

A Python indentation parser to be used by editor packages

License

Notifications You must be signed in to change notification settings

DSpeckhals/python-indent-parser

Repository files navigation

python-indent-parser

Build Status

This package is the base parser for the following text editor packages:

It helps the editor to automatically indent in typical Python fashion after new line events.

Indent Types

Both indent types for continuing lines as described in PEP 0008 -- Style Guide for Python Code are auto-detected and applied by this package.

  • Aligned with Opening Delimiter

    def function_with_lots_of_params(param_1, param_2,
                                     param_3, param_4,
                                     very_long_parameter_name,
                                     param_6)
  • Hanging

    def function_with_lots_of_params(
        param_1, param_2,
        param_3, param_4,
        very_long_parameter_name,
        param_6)

Contributing

  1. Fork this repository

  2. Clone your forked repository and create a new feature branch.

git clone https://github.com/<you>/python-indent-parser

  1. Install the dependencies

npm install

  1. Contribute

  2. Make sure that all tests pass.

npm run test

  1. Lint and correct as necessary.

npm run lint

  1. Push your changes and create a pull request.

  2. After a PR has been merged, and if you help maintain the package, run the following.

npm version <patch|minor|major>
npm publish

About

A Python indentation parser to be used by editor packages

Resources

License

Stars

Watchers

Forks

Packages