pylint

Detailed linter that detects errors, bugs, variable naming issues, and other code problems.

PyPI View on PyPI GitHub View on GitHub Conda View on Conda

Example Quarto .qmd file:

1:     ---
2:     title: "Example"
3:     ---
4:     
5:     This file contains some issues for the linter to identify.
6:     
7:     ```{python}
8:     very_long_line = "This long string exceeds the maximum allowed characters per line."
9:     ```
10:    
11:    There's some more issues below...
12:    
13:    ```{python}
14:    def add_numbers(a, b):
15:        return a + b
16:    
17:    add_numbers(3, 5)
18:    
19:    import sys
20:    ```

Run pylint using lintquarto

lintquarto -l pylint -p general_example.qmd
=============================================================
Running pylint...
=============================================================
************* Module general_example
examples/general_example.py:8:0: C0103: Constant name "very_long_line" doesn't conform to UPPER_CASE naming style (invalid-name)
examples/general_example.py:14:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/general_example.py:19:0: C0413: Import "import sys" should be placed at the top of the module (wrong-import-position)
examples/general_example.py:19:0: W0611: Unused import sys (unused-import)

-----------------------------------
Your code has been rated at 2.00/10