Skip to content

Commit

Permalink
Merge pull request #9 from bsmoliak/master
Browse files Browse the repository at this point in the history
Enable Flake8 user and project configuration
  • Loading branch information
mattijn authored Jan 8, 2019
2 parents a313cc9 + 6f1bc61 commit 3f9d9b2
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 1,046 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.pyc
*.tar.gz

# Jupyter Notebook
.ipynb_checkpoints
23 changes: 0 additions & 23 deletions .ipynb_checkpoints/README-checkpoint.md

This file was deleted.

112 changes: 0 additions & 112 deletions .ipynb_checkpoints/pycodestyle_magic-checkpoint.py

This file was deleted.

15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Make sure you've the Python package `pycodestyle`, `flake8` and this `pycodestyl
pip install flake8 pycodestyle pycodestyle_magic
```

# configuration

Flake8 and pycodestyle will discover and manage user configuration files
(stored in a user's home directory or in the XDG directory inside their home
directory) or project configuration files (stored in the current directory).
See their respective docs for specific details on configuration file naming,
syntax, and location.

Additionally, Flake8 cell magic ignores four codes by default:
* W292 - *no newline at end of file*; not relevant in an iPython cell
* W391 - *blank line at end of file*; not relevant in an iPython cell
* F401 - *module imported but unused*; a module may be imported in one cell and used in another
* F821 - *undefined name name*; a variable may be defined in one cell and used in another

# usage
Enable the magic function by using the pycodestyle_magic module in a cell

Expand All @@ -30,4 +44,3 @@ See notebooks in notebook directory for example use cases, as such:

Examples notebooks were slightly adapted from
https://github.com/SiggyF/notebooks/blob/master/styleguide.ipynb

Loading

0 comments on commit 3f9d9b2

Please sign in to comment.