Skip to main content

Ask Scholars Portal Name Conversion

Project description

Flake8 Markdown

PyPI PyPI PyPI TravisCI

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 flake8-markdown

Usage

CLI

You can use Flake8 Markdown as a CLI tool using the flake8-markdown command.

flake8-markdown accepts one or more globs as its arguments.

Example:

$ flake8-markdown flake8-markdown "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 flake8-markdown to your project using pre-commit. When configured, any staged Markdown files will be linted using flake8-markdown 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/flake8-markdown
    rev: v0.2.0
    hooks:
      - id: flake8-markdown

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ask_schools-0.2.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

ask_schools-0.2.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file ask_schools-0.2.0.tar.gz.

File metadata

  • Download URL: ask_schools-0.2.0.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

Hashes for ask_schools-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ab13735e49495b40f5e8d742805675df8583dd1b6e18e4f1351b581e5438d81f
MD5 d17fb4c598e82875722912feb0eb75e6
BLAKE2b-256 4d8ab1200e126bec00cd155fd5e016e6a115a5a46567feddff2de99c9f2ce3d3

See more details on using hashes here.

File details

Details for the file ask_schools-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ask_schools-0.2.0-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

Hashes for ask_schools-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5a6628057e169dca8c31eaa6cca899114f7b85ab2860ae313b21247325454e9
MD5 1cc7842817d1ec1ea3509e6ed9580dff
BLAKE2b-256 37f1091fb09c2e9f05a92318ad648bd62dfe26ce7c8bcdc6a0bb4bf5eb5bca49

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page