{"id":25749,"library":"ilib-lint-python","title":"ilib-lint-python","description":"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.","status":"active","version":"2.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/iLib-js/ilib-mono","tags":["javascript"],"install":[{"cmd":"npm install ilib-lint-python","lang":"bash","label":"npm"},{"cmd":"yarn add ilib-lint-python","lang":"bash","label":"yarn"},{"cmd":"pnpm add ilib-lint-python","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, the core linting framework","package":"ilib-lint","optional":true}],"imports":[{"note":"ESM-only since v1.0.0; requires Node >=14","wrong":"const ilibLintPython = require('ilib-lint-python')","symbol":"default","correct":"import ilibLintPython from 'ilib-lint-python'"},{"note":"Named export for accessing individual rules","symbol":"rules","correct":"import { rules } from 'ilib-lint-python'"},{"note":"Named export for the 'python' ruleset","symbol":"ruleSets","correct":"import { ruleSets } from 'ilib-lint-python'"}],"quickstart":{"code":"// Install: npm install --save-dev ilib-lint ilib-lint-python\n// ilib-lint-config.json:\n{\n  \"plugins\": [\"python\"],\n  \"rulesets\": {\n    \"python\": true\n  }\n}\n// Then run: npx ilib-lint","lang":"javascript","description":"Shows how to install and configure the python plugin for ilib-lint."},"warnings":[{"fix":"Use import syntax and ensure Node >=14.","message":"ESM-only: Cannot use require() or CommonJS imports.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Set '\"plugins\": [\"python\"]' in ilib-lint-config.json.","message":"Plugin name in config must be 'python' not 'ilib-lint-python'.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Prefer resource-python-fstrings-match and resource-python-fstrings-numbered.","message":"Legacy %-formatting rules may be less used; f-string rules recommended.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to import syntax or set type: 'module' in package.json.","cause":"Using CommonJS require() to import ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Use '\"plugins\": [\"python\"]' instead of '\"plugins\": [\"ilib-lint-python\"]'.","cause":"Plugin name in config does not match the package name.","error":"Plugin not found: python"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}