Giter VIP home page Giter VIP logo

nbpep8's Introduction

nbpep8

A package for PEP8 analysis in browser based Jupyter notebooks, such as Kaggle and Google Colabatory, that do not allow adding 3rd Party PEP8 analysis tools as add ons.

Prerequisites

  • Install pycodestyle if already not installed. This package replaces old pep8 package. It comes pre-installed in Kaggle notebooks but not in Google Colabs.
  • Install nbpep8 from test.pypi . I will push to PyPI in future.
pip install pycodestyle
pip install --index-url https://test.pypi.org/simple/ nbpep8

How to Use?

Import nbpep8

from nbpep8.nbpep8 import pep8

Analysis

Add pep8(_ih) at the end of the code cell to see PEP8 analysis.

Example:

import os,sys
a =  23

pep8(_ih)

Output:

cell_content.py:1:10: E231 missing whitespace after ','
cell_content.py:1:10: E401 multiple imports on one line
cell_content.py:2:4: E222 multiple spaces after operator

Sample Notebooks

Kaggle

https://www.kaggle.com/debanga/kaggle-pep8-test

Google Colab

https://colab.research.google.com/drive/1fmZAd-GnG2jr7jAJMs38oDD6nt2ohARX

Any suggestions to improve? Please send me a message at https://www.linkedin.com/in/debanga/.


(c) 2020, Debanga Raj Neog

nbpep8's People

Contributors

debanga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

debanga

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.