Implement usethis show import-linter with --format=toml and --format=ini#1510
Closed
Copilot wants to merge 6 commits into
Closed
Implement usethis show import-linter with --format=toml and --format=ini#1510Copilot wants to merge 6 commits into
usethis show import-linter with --format=toml and --format=ini#1510Copilot wants to merge 6 commits into
Conversation
…ml/ini Adds a new `show import-linter` subcommand that prints the import-linter configuration to the console without side effects. Supports TOML format (for pyproject.toml) and INI format (for .importlinter files). Also fixes plain_print to disable Rich markup interpretation, which was stripping bracket-enclosed text from output. Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/2daf4a1c-b740-4d61-8a65-626982758292
- Rename `format` param to `format_` to avoid shadowing Python builtin - Move deferred imports to top level (PLC0415) - Extract `_get_layered_architecture_by_module_by_root_package` as standalone function to avoid calling private method on ImportLinterToolSpec - Extract `_append_ini_list` helper to reduce branches (PLR0912) - Add noqa: TC001 for Typer-required runtime import Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/2daf4a1c-b740-4d61-8a65-626982758292
…notation Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/2daf4a1c-b740-4d61-8a65-626982758292
Copilot
AI
changed the title
[WIP] Add usethis show import-linter functionality with format options
Implement Mar 25, 2026
usethis show import-linter with --format=toml and --format=ini
nathanjmcdougall
requested changes
Mar 25, 2026
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/f60236e0-9021-49b2-ade6-d3c6faaaace7
nathanjmcdougall
requested changes
Mar 25, 2026
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/48aef893-ac67-4d59-8979-9268edf56808
Collaborator
|
I don't like this approach. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ConfigFormatEnumtype (toml/ini) insrc/usethis/_types/config_format.pyshow_import_linter_config()and related core functions insrc/usethis/_core/show.pyimport-linterCLI subcommand with--formatoption insrc/usethis/_ui/interface/show.pyplain_printto disable Rich markup interpretation (brackets were being stripped)docs/cli/reference.mdOriginal prompt
usethis show import-linter#921✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.