Code Monkey home page Code Monkey logo

autopep8_action's Introduction

GitHub autopep8 Action

License MIT Latest Release Contributors Issues

This action automatically restyles Python code according to PEP-8 using autopep8.

Usage

Parameters

The following parameters can be used in your custom action configuration.

Parameter Required Default Description
commit_message 'Adjusted files for PEP-8 compliance' Custom git commit message
commit_options - Custom git commit options
file_pattern '*' Custom file pattern for git add
checkpath '.' The path autopep8 checks
no_commit False Avoid committing, if used in a pipeline
options ' ' Parameters to use with autopep8
dry false Dry-run the action to fail when detecting PEP-8 uncompliant files, instead of automatically fixing them.
github_token ${{ github.token }} The default GITHUB_TOKEN or a Personal Access Token

Note: using the same_commit option may lead to problems if other actions are relying on the commit being the same before and after the prettier action has ran. Keep this in mind.

Example

This is a simple usage example of this script:

# This action works with pull requests and pushes
name: Continuous Integration

on:
  pull_request:
  push:
    branches:
    - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
      with:
        # Make sure the actual branch is checked out when running on pull requests
        ref: ${{ github.head_ref }}
    - uses: creyD/[email protected]

More documentation for writing a workflow can be found here.

Issues

Please report all bugs and feature request using the GitHub issues function.

Special Thanks

  • Hideo Hattori (GitHub) for creating and maintaining autopep8
  • Stefan Zweifel (GitHub) for providing an action to commit and push a git change

If you want you may also use my autoflake and prettier GitHub actions.

autopep8_action's People

Contributors

creyd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.