liveBook · Manning

Pylint

As explained in Build Financial Software with Generative AI (From Scratch)

pylint is a Python static-analysis tool that detects coding errors, style problems, and maintainability issues.

Pylint is a Python static-analysis tool that detects coding errors, style problems, and maintainability issues. It can also enforce project-specific architecture before code reaches review. section 7.4.1

A custom Pylint plugin can:

  • Inspect imports and report psycopg usage outside designated modules or directories. section 7.4.1
  • Provide an automated guardrail that complements code reviews and technical reviews. section 7.4.1

Restricted database imports

A PsycopgImportChecker subclasses BaseChecker, defines a custom error message, and checks import nodes so psycopg is used only in approved modules. section 7.4.1

How Build Financial Software with Generative AI (From Scratch) covers it

How deep it goes
Extends static analysis with a basic custom checker, while comprehensive detection and further plugin research remain deferred.
Examples
Uses a PsycopgImportChecker that flags psycopg imports outside approved modules.
What it assumes
Assumes familiarity with Python modules and imports while demonstrating the checker structure from its basic components.
What you can do after
Build a custom Pylint checker that detects prohibited psycopg imports across a Python codebase.
How it connects
Connects static analysis with Python imports, database access, code review, and technical review.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Financial Software with Generative AI (From Scratch). The section links point to the parts of the book it draws on.