{"id":27294,"library":"pysen-plugins","title":"pysen-plugins","description":"A collection of plugins for pysen, a Python code formatter and linter orchestrator. Version 2025.12.3 supports Python >=3.8. Plugins include import sorter, formatter wrappers (black, isort, autoflake), and lint plugin helpers. Released on a monthly cadence tied to pysen releases.","status":"active","version":"2025.12.3","language":"python","source_language":"en","source_url":"https://github.com/pfnet/pysen-plugins","tags":["pysen","linter","formatter","plugin","black","isort"],"install":[{"cmd":"pip install pysen-plugins","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Core runtime dependency; pysen-plugins provides plugins for pysen.","package":"pysen","optional":false}],"imports":[{"note":"ImportSortPlugin is located in the import_sort submodule, not directly in pysen_plugins.","wrong":"from pysen_plugins import ImportSortPlugin","symbol":"ImportSortPlugin","correct":"from pysen_plugins.import_sort import ImportSortPlugin"},{"note":"Correct import path.","wrong":"","symbol":"BlackPlugin","correct":"from pysen_plugins.black import BlackPlugin"}],"quickstart":{"code":"from pysen import Plugin, LintSetting, FormatSetting\nfrom pysen_plugins.black import BlackPlugin\nfrom pysen_plugins.isort import IsortPlugin\nfrom pysen_plugins.import_sort import ImportSortPlugin\n\n# Create plugins for a pysen project\nblack_plugin = BlackPlugin()\nisort_plugin = IsortPlugin()\nimport_sort_plugin = ImportSortPlugin()\n\n# Configure pysen settings (simplified)\nsettings = Plugin.create_settings(\n    base_dir=\".\",\n    lint_settings=[LintSetting(name=\"black\", plugin=black_plugin)],\n    format_settings=[FormatSetting(name=\"isort\", plugin=isort_plugin)],\n)\nprint(\"Plugins configured successfully\")","lang":"python","description":"Basic configuration of pysen-plugins for formatting with black and isort."},"warnings":[{"fix":"Update imports to use pysen_plugins.import_sort.ImportSortPlugin.","message":"Version 2025.12.0 changed the import path for ImportSortPlugin from pysen_plugins.import_sort_plugin to pysen_plugins.import_sort.","severity":"breaking","affected_versions":">=2025.12.0"},{"fix":"Use from pysen_plugins.import_sort import ImportSortPlugin.","message":"Direct import from pysen_plugins (e.g., from pysen_plugins import ImportSortPlugin) is deprecated in favor of submodule imports.","severity":"deprecated","affected_versions":">=2025.12.0"},{"fix":"Always pass plugin=<instance> when creating settings.","message":"Plugin configuration requires explicit use of LintSetting/FormatSetting with the plugin instance; omitting the plugin argument silently does nothing.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install pysen-plugins","cause":"pysen-plugins is not installed or the Python environment is incorrect.","error":"ModuleNotFoundError: No module named 'pysen_plugins'"},{"fix":"Use: from pysen_plugins.import_sort import ImportSortPlugin","cause":"Importing directly from the top-level package instead of the submodule (changed in 2025.12.0).","error":"ImportError: cannot import name 'ImportSortPlugin' from 'pysen_plugins'"},{"fix":"Pass the plugin to LintSetting or FormatSetting, e.g., LintSetting(..., plugin=my_plugin).","cause":"Attempting to call a plugin instance instead of using it in settings.","error":"TypeError: 'Plugin' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}