Skip to main content
CI

A collection of code quality tools:

  • A few pylint plugins to check for quality issues pylint misses.

  • A command-line tool to generate config files like pylintrc from a master file (part of edx_lint), and a repo-specific tweaks file.

Using edx_lint

The edx_lint command can generate config files from its own master file. Install the package using pip:

$ pip install edx-lint

The write sub-command will write a config file based on the contents of the edx_lint master file:

$ edx_lint write pylintrc

The file written contains a hash of its contents, to detect subsequent editing. edx_lint will detect this when it next tries to write the file. If editing is detected, the edited file will be moved aside so it can be compared to the newly written file.

Handling newly introduced lint violations

New potential lint violations will be communicated with a major version bump.

If you run into new lint violations during an upgrade of edx-lint, your options include:

  1. Fixing the violations immediately, or

  2. Using lint-amnesty and fixing at a later time, or

  3. Customizing edx_lint to permanently ignore the violations.

Using lint-amnesty

The lint-amnesty command can be used to squash all existing pylint errors in a codebase, so that from then the repository can maintain pylint-cleanliness. Install the package using pip:

$ pip install edx-lint

The lint-amnesty command expects pylint errors in the --output-format=parseable format:

$ pylint my.python.package --output-format=parseable | lint-amnesty

This will add comments for every existing pylint violation that look like:

# pylint: disable=some-error  # lint-amnesty

It will also remove any existing suppressions that pylint flags as being useless-suppressions.

Customizing edx_lint

You can customize the resulting pylintrc file by creating a pylintrc_tweaks file in the current directory before running the write sub-command. It should contain only the settings you want to override.

Note: If your project is not a Django project, you’ll want to disable the Django plugins with your pylintrc_tweaks file:

[MASTER]
load-plugins = edx_lint.pylint

Developing edx_lint

To run the tests:

$ make requirements
$ make test

To manually test your pylint plugin, create a custom module and run pylint with a selected set of enabled message symbols. For instance:

pylint --load-plugins=edx_lint.pylint --disable=all --enable=feature-toggle-needs-doc path/to/my/custom/module.py

License

The code in this repository is licensed under Apache 2.0. Please see LICENSE.txt for details.

How To Contribute

Contributions are very welcome.

Please read How To Contribute for details.

Getting Help

The Open edX project has resources for developer support on the Getting Help page.

Metadata

Release files for edx-lint 6.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for edx-lint 6.2.0
File Size Uploaded Provenance
edx_lint-6.2.0.tar.gz 55.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for edx-lint 6.2.0
File Interpreter ABI Platform
edx_lint-6.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 119.6 kB

Release files / edx_lint-6.2.0.tar.gz

Download URL edx_lint-6.2.0.tar.gz
Size 55.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2ce94b0b1235024e7714792442ea674e1bbe2877e7ca2ca970609e74aa73dfdf
BLAKE2b-256 checksum
How to use checksums
dae220b4782eba5bbbaeb949877666f871912db05fb22cee2eafdbc83566cffc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / edx_lint-6.2.0-py3-none-any.whl

Download URL edx_lint-6.2.0-py3-none-any.whl
Size 64.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e1491f9a049927e35eb05a0fd33464b4ec912b83e387568e37f4ce5d10acb30
BLAKE2b-256 checksum
How to use checksums
cff372bbb973cb654aa9d8291c438dd02b21ffb3bf2bdc9e653f9ea9048e3b20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for edx-lint 6.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

6.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page