Ask Scholars Portal Name Conversion
Project description
Flake8 Markdown
Flake8 Markdown lints GitHub-style Python code blocks in Markdown files using flake8
.
This package helps improve a Python project's documentation by ensuring that code samples are error-free.
Features
- Lints code blocks containing regular Python and Python interpreter code (
pycon
) - pre-commit hook to lint on commit
Installation
Flake8 Markdown can be installed from PyPI using pip
or your package manager of choice:
pip install ask_schools
Usage
CLI
You can use Flake8 Markdown as a CLI tool using the ask_schools
command.
ask_schools
accepts one or more globs as its arguments.
Example:
$ ask_schools ask_schools "tests/samples/*.md"
tests/samples/emphasized_lines.md:6:1: F821 undefined name 'emphasized_imaginary_function'
tests/samples/basic.md:8:48: E999 SyntaxError: EOL while scanning string literal
tests/samples/basic.md:14:7: F821 undefined name 'undefined_variable'
pre-commit hook
You can also add ask_schools
to your project using pre-commit. When configured, any staged Markdown files will be linted using ask_schools
once you run git commit
.
To enable this hook in your local repository, add the following repo
to your .pre-commit-config.yaml
file:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/guinslym/ask_schools
rev: v0.2.0
hooks:
- id: ask_schools
Code of Conduct
Everyone interacting in the project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.
History
[0.2.0] - 2019-06-14
Added
pycon
code block support
[0.1.1] - 2019-05-19
Changed
- Fixed pre-commit example in README
[0.1.0] - 2019-05-19
Added
- Added code for initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ask_schools-0.2.1.tar.gz
.
File metadata
- Download URL: ask_schools-0.2.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.12 CPython/3.4.1 Darwin/18.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32fccda0f0edfb18b28a4bb243ee35ae24c415543151d16d7bfd0cefb6e1968e |
|
MD5 | 9fad2f8a0755e43bb0a6c557f525c182 |
|
BLAKE2b-256 | 5cff2a4ddb388b7121f352b37012524a1b9fffcecd3ed62ed36d7008afcd0745 |
File details
Details for the file ask_schools-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: ask_schools-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.12 CPython/3.4.1 Darwin/18.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba420ee5cce0c2d33472b5fe8131cc38ecdfa160654402389e7b14dbbc3c3166 |
|
MD5 | 583dc606a50e49bf54f474b690bed94e |
|
BLAKE2b-256 | 68fdd3d555fd971b9db1fed048a6c7c1374696f2a02de919b2cdccae5833ac8a |