{"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,"search_vec":"'14':84 '2.0.4':17 'autom':64 'check':11,65 'class':52 'common':67 'differenti':55 'ecosystem':62 'enabl':63 'esm':86 'f':40 'f-string':39 'file':23 'format':46 'i18n':13 'ilib':2,7,60,79 'ilib-lint':6,59 'ilib-lint-python':1 'ilib-mono':78 'infrequ':73 'integr':56 'javascript':88 'key':54 'latest':15 'legaci':45 'lint':3,8,61 'local':69 'modul':87 'mono':80 'monorepo':81 'name':42,48 'node':83 'number':44 'paramet':33 'pars':21 'part':75 'pitfal':70 'placehold':49 'plugin':9,20 'po':22 'provid':25 'python':4,12,30,68 'python-styl':29 'releas':71 'requir':82 'resourc':14 'rule':26 'stabl':18 'string':36,41 'style':31 'substitut':32,53 'support':38 'templat':51 'translat':35 'valid':28 'version':16","created_at":"2026-05-01T13:46:22.236994+00:00","updated_at":"2026-05-01T13:46:22.236994+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://ilib-js.github.io/ilib-lint/","github":"https://github.com/iLib-js/ilib-mono","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ilib-lint-python","openapi_spec":null,"status_page":null,"smithery":null,"categories":["llm-agents"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}