Registry / llm-agents / ilib-lint-python

ilib-lint-python

JSON →
library2.0.4jsnpmunverified

An ilib-lint plugin for checking Python i18n resources. Latest version 2.0.4 (stable). This plugin parses PO files and provides rules to validate Python-style substitution parameters in translated strings. It supports f-strings (named and numbered), legacy %-formatting with named placeholders, and Template class substitution. Key differentiator: integrates with the ilib-lint ecosystem, enabling automated checks for common Python localization pitfalls. Releases are infrequent as part of the ilib-mono monorepo. Requires Node >=14 and ESM modules.

npm install ilib-lint-python
INSTALL
IMPORT
SIG · ILIB-LINT-PYTHON
I
ilib-lint-python
llm-agentsjavascriptv2.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import ilibLintPython from 'ilib-lint-python'
const ilibLintPython = require('ilib-lint-python')
ESM-only since v1.0.0; requires Node >=14
rules
import { rules } from 'ilib-lint-python'
Named export for accessing individual rules
ruleSets
import { ruleSets } from 'ilib-lint-python'
Named export for the 'python' ruleset

Shows how to install and configure the python plugin for ilib-lint.

// Install: npm install --save-dev ilib-lint ilib-lint-python // ilib-lint-config.json: { "plugins": ["python"], "rulesets": { "python": true } } // Then run: npx ilib-lint
Debug
Known issues
breakingESM-only: Cannot use require() or CommonJS imports.
fix
Use import syntax and ensure Node >=14.
affects: >=1.0.0
gotchaPlugin name in config must be 'python' not 'ilib-lint-python'.
fix
Set '"plugins": ["python"]' in ilib-lint-config.json.
affects: >=2.0.0
deprecatedLegacy %-formatting rules may be less used; f-string rules recommended.
fix
Prefer resource-python-fstrings-match and resource-python-fstrings-numbered.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() to import ESM-only package.
fix
Switch to import syntax or set type: 'module' in package.json.
Plugin not found: python
Plugin name in config does not match the package name.
fix
Use '"plugins": ["python"]' instead of '"plugins": ["ilib-lint-python"]'.
Upgrade
Version history
2.0.4latest on npm
Audit
Dependencies
ilib-lintoptionalpeer dependency, the core linting framework
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
ilib-lint-python — npm install ilib-lint-python · libregistry