Skip to main content

A linter for Cython files

Project description

Build Status Coverage pre-commit.ci status

cython-lint

A tool and pre-commit hook to lint Cython files.

Installation

$ pip install cython-lint

Usage as a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/MarcoGorelli/cython-lint
    rev: v0.1.2
    hooks:
    -   id: cython-lint

Command-line example

$ cython-lint my_file_1.pyx my_file_2.pyx
my_file_1.pyx:54:5: 'get_conversion_factor' imported but unused
my_file_2.pyx:1112:38: 'mod' defined but unused

Configuration

Exclude lines by include a # no-cython-lint comment (analogous to # noqa in flake8).

Currently, the following checks are implemented:

  • variable defined but unused
  • variable imported but unused

More to come! Requests welcome!

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

cython_lint-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

cython_lint-0.1.2-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cython_lint-0.1.2.tar.gz.

File metadata

  • Download URL: cython_lint-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.5

File hashes

Hashes for cython_lint-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1e428fb952f1fdded64d8dae3d3f42e27f637d0ad7619d00f5f5fa711ea07560
MD5 e816ec38293bfe8aac5c4a7eec62287c
BLAKE2b-256 b9f07a86f8166a7ed0934333c304380c536adfe09cba325fae32f8669e1441a2

See more details on using hashes here.

Provenance

File details

Details for the file cython_lint-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cython_lint-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d88342da91d076146e873a2703b76e0f699f6ad612820b54778a833fea294f36
MD5 dd17db1aeea88e221a855bb2ec77eb56
BLAKE2b-256 c3e065e55c920834f07b51b8caceeeac74ba18bf8d585b8f8b5c503ff0ac5e41

See more details on using hashes here.

Provenance

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