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.

Download files

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

Source Distribution

edx_lint-6.2.0.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edx_lint-6.2.0-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

Details for the file edx_lint-6.2.0.tar.gz.

File metadata

  • Download URL: edx_lint-6.2.0.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for edx_lint-6.2.0.tar.gz
Algorithm Hash digest
SHA256 2ce94b0b1235024e7714792442ea674e1bbe2877e7ca2ca970609e74aa73dfdf
MD5 e4b3d03eb0057acd26915d895c16472f
BLAKE2b-256 dae220b4782eba5bbbaeb949877666f871912db05fb22cee2eafdbc83566cffc

See more details on using hashes here.

File details

Details for the file edx_lint-6.2.0-py3-none-any.whl.

File metadata

  • Download URL: edx_lint-6.2.0-py3-none-any.whl
  • Upload date:
  • Size: 64.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for edx_lint-6.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e1491f9a049927e35eb05a0fd33464b4ec912b83e387568e37f4ce5d10acb30
MD5 2d95e2b99165d0c6a9c983adad9b1661
BLAKE2b-256 cff372bbb973cb654aa9d8291c438dd02b21ffb3bf2bdc9e653f9ea9048e3b20

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

6.2.0 This release

2 files

6.1.0

2 files

6.0.0

2 files

5.6.0

2 files

5.5.0

2 files

5.4.1

2 files

5.4.0

2 files

5.3.7

2 files

5.3.6

2 files

5.3.4

2 files

5.3.2

2 files

5.3.1

2 files

5.3.0

2 files

5.2.5

2 files

5.2.4

2 files

5.2.3

2 files

5.2.2

2 files

5.2.1

2 files

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

4.1.1

2 files

4.1.0

2 files

4.0.1

2 files

4.0.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0

2 files

1.6

2 files

1.5.2

2 files

1.5.0

2 files

1.4.1

2 files

1.4.0

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.6.0

3 files

0.5.5

3 files

0.5.4

3 files

0.5.3

3 files

0.5.2

3 files

0.5.1

3 files

0.5.0

2 files

0.4.3

2 files

0.4.0

2 files

0.3.2

2 files

0.2.7

2 files

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