Show absolute paths in skipped file messages#2416
Conversation
When files are skipped, isort now displays their absolute paths in verbose mode, consistent with the "Fixing" messages. This improves debugging by making it clear which files are being skipped. Changes: - isort/main.py:1178 - Convert file_name to absolute path before appending - isort/files.py:24 - Use full_path instead of just dirname - isort/files.py:35 - Use absolute filepath instead of just filename Fixes PyCQA#2412 Signed-off-by: Pranav Lawate <pran.lawate@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2416 +/- ##
=======================================
Coverage 99.19% 99.19%
=======================================
Files 40 40
Lines 3101 3101
Branches 680 680
=======================================
Hits 3076 3076
Misses 14 14
Partials 11 11 🚀 New features to boost your workflow:
|
DanielNoord
left a comment
There was a problem hiding this comment.
Do you have a particular reason for using os.path and Path?
|
Thanks for reviewing this PR. I tried to use what's present in the nearby lines of where I changed the code. In files.py line 34 uses os.path so I used the same on 35th and in main.py 1177 line uses Path so I used that on 1178. I generally like using Path myself so I can make both lines use that or if you would prefer os.path, then I can use that as well. |
DanielNoord
left a comment
There was a problem hiding this comment.
Could indeed be nice to do a followup to use Path everywhere.
If you do so, please make sure to do not do everything in a big PR. Those are more likely to stall due to maintainers never having enough time to review big PRs.
Small PRs like this can be easily reviewed with little effort and merged to main soon :)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [isort](https://github.com/PyCQA/isort) ([changelog](https://github.com/PyCQA/isort/releases)) | `<6.1.1,>=6.1.0` -> `<7.0.1,>=7.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>PyCQA/isort (isort)</summary> ### [`v7.0.0`](https://github.com/PyCQA/isort/releases/tag/7.0.0) [Compare Source](PyCQA/isort@6.1.0...7.0.0) #### Changes #### 💥 Breaking Changes - Drop support for Python 3.9 ([#​2430](PyCQA/isort#2430)) [@​DanielNoord](https://github.com/DanielNoord) #### 🚀 Features - Show absolute paths in skipped file messages ([#​2416](PyCQA/isort#2416)) [@​pranlawate](https://github.com/pranlawate) #### 🪲 Fixes - Some fixes for Python 3.14 ([#​2433](PyCQA/isort#2433)) [@​DanielNoord](https://github.com/DanielNoord) - Test on `3.14` and fix any bugs ([#​2425](PyCQA/isort#2425)) [@​DanielNoord](https://github.com/DanielNoord) - Update CHANGELOG.md + Fix Formatting and Grammar ([#​2419](PyCQA/isort#2419)) [@​lukbrew25](https://github.com/lukbrew25) - Fix output of hanging indent for long lines with noqa ([#​2407](PyCQA/isort#2407)) [@​matan1008](https://github.com/matan1008) #### :construction\_worker: Continuous Integration - Format with `ruff` instead of `black` ([#​2432](PyCQA/isort#2432)) [@​DanielNoord](https://github.com/DanielNoord) - Target 3.10 for `ruff` ([#​2431](PyCQA/isort#2431)) [@​DanielNoord](https://github.com/DanielNoord) - Update development dependencies to latest version ([#​2426](PyCQA/isort#2426)) [@​DanielNoord](https://github.com/DanielNoord) - docs: update pre-commit examples to version 6.1.0 ([#​2413](PyCQA/isort#2413)) [@​pranlawate](https://github.com/pranlawate) - Small cleanup for developer environment ([#​2418](PyCQA/isort#2418)) [@​DanielNoord](https://github.com/DanielNoord) #### 📦 Dependencies - Bump actions/setup-python from 5 to 6 in the github-actions group ([#​2411](PyCQA/isort#2411)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDYuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE0Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tainton.uk/repos/roboluke/pulls/383 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk> Co-committed-by: renovate[bot] <renovate-bot@git.tainton.uk>
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [isort](https://github.com/PyCQA/isort) ([changelog](https://github.com/PyCQA/isort/releases)) | `<6.1.1,>=6.1.0` -> `<7.0.1,>=7.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>PyCQA/isort (isort)</summary> ### [`v7.0.0`](https://github.com/PyCQA/isort/releases/tag/7.0.0) [Compare Source](PyCQA/isort@6.1.0...7.0.0) #### Changes #### 💥 Breaking Changes - Drop support for Python 3.9 ([#​2430](PyCQA/isort#2430)) [@​DanielNoord](https://github.com/DanielNoord) #### 🚀 Features - Show absolute paths in skipped file messages ([#​2416](PyCQA/isort#2416)) [@​pranlawate](https://github.com/pranlawate) #### 🪲 Fixes - Some fixes for Python 3.14 ([#​2433](PyCQA/isort#2433)) [@​DanielNoord](https://github.com/DanielNoord) - Test on `3.14` and fix any bugs ([#​2425](PyCQA/isort#2425)) [@​DanielNoord](https://github.com/DanielNoord) - Update CHANGELOG.md + Fix Formatting and Grammar ([#​2419](PyCQA/isort#2419)) [@​lukbrew25](https://github.com/lukbrew25) - Fix output of hanging indent for long lines with noqa ([#​2407](PyCQA/isort#2407)) [@​matan1008](https://github.com/matan1008) #### :construction\_worker: Continuous Integration - Format with `ruff` instead of `black` ([#​2432](PyCQA/isort#2432)) [@​DanielNoord](https://github.com/DanielNoord) - Target 3.10 for `ruff` ([#​2431](PyCQA/isort#2431)) [@​DanielNoord](https://github.com/DanielNoord) - Update development dependencies to latest version ([#​2426](PyCQA/isort#2426)) [@​DanielNoord](https://github.com/DanielNoord) - docs: update pre-commit examples to version 6.1.0 ([#​2413](PyCQA/isort#2413)) [@​pranlawate](https://github.com/pranlawate) - Small cleanup for developer environment ([#​2418](PyCQA/isort#2418)) [@​DanielNoord](https://github.com/DanielNoord) #### 📦 Dependencies - Bump actions/setup-python from 5 to 6 in the github-actions group ([#​2411](PyCQA/isort#2411)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDYuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE0Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tainton.uk/repos/epage/pulls/167 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk> Co-committed-by: renovate[bot] <renovate-bot@git.tainton.uk>
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [isort](https://github.com/PyCQA/isort) ([changelog](https://github.com/PyCQA/isort/releases)) | `<6.1.1,>=6.1.0` -> `<7.0.1,>=7.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>PyCQA/isort (isort)</summary> ### [`v7.0.0`](https://github.com/PyCQA/isort/releases/tag/7.0.0) [Compare Source](PyCQA/isort@6.1.0...7.0.0) #### Changes #### 💥 Breaking Changes - Drop support for Python 3.9 ([#​2430](PyCQA/isort#2430)) [@​DanielNoord](https://github.com/DanielNoord) #### 🚀 Features - Show absolute paths in skipped file messages ([#​2416](PyCQA/isort#2416)) [@​pranlawate](https://github.com/pranlawate) #### 🪲 Fixes - Some fixes for Python 3.14 ([#​2433](PyCQA/isort#2433)) [@​DanielNoord](https://github.com/DanielNoord) - Test on `3.14` and fix any bugs ([#​2425](PyCQA/isort#2425)) [@​DanielNoord](https://github.com/DanielNoord) - Update CHANGELOG.md + Fix Formatting and Grammar ([#​2419](PyCQA/isort#2419)) [@​lukbrew25](https://github.com/lukbrew25) - Fix output of hanging indent for long lines with noqa ([#​2407](PyCQA/isort#2407)) [@​matan1008](https://github.com/matan1008) #### :construction\_worker: Continuous Integration - Format with `ruff` instead of `black` ([#​2432](PyCQA/isort#2432)) [@​DanielNoord](https://github.com/DanielNoord) - Target 3.10 for `ruff` ([#​2431](PyCQA/isort#2431)) [@​DanielNoord](https://github.com/DanielNoord) - Update development dependencies to latest version ([#​2426](PyCQA/isort#2426)) [@​DanielNoord](https://github.com/DanielNoord) - docs: update pre-commit examples to version 6.1.0 ([#​2413](PyCQA/isort#2413)) [@​pranlawate](https://github.com/pranlawate) - Small cleanup for developer environment ([#​2418](PyCQA/isort#2418)) [@​DanielNoord](https://github.com/DanielNoord) #### 📦 Dependencies - Bump actions/setup-python from 5 to 6 in the github-actions group ([#​2411](PyCQA/isort#2411)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDYuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE0Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tainton.uk/repos/webexmemebot/pulls/514 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk> Co-committed-by: renovate[bot] <renovate-bot@git.tainton.uk>
This MR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [isort](https://github.com/PyCQA/isort) ([changelog](https://github.com/PyCQA/isort/releases)) | dev | major | `^5.13.2` → `^7.0.0` | [](https://securityscorecards.dev/viewer/?uri=github.com/PyCQA/isort) | --- ### Release Notes <details> <summary>PyCQA/isort (isort)</summary> ### [`v7.0.0`](https://github.com/PyCQA/isort/releases/tag/7.0.0) [Compare Source](PyCQA/isort@6.1.0...7.0.0) #### Changes #### 💥 Breaking Changes - Drop support for Python 3.9 ([#​2430](PyCQA/isort#2430)) [@​DanielNoord](https://github.com/DanielNoord) #### 🚀 Features - Show absolute paths in skipped file messages ([#​2416](PyCQA/isort#2416)) [@​pranlawate](https://github.com/pranlawate) #### 🪲 Fixes - Some fixes for Python 3.14 ([#​2433](PyCQA/isort#2433)) [@​DanielNoord](https://github.com/DanielNoord) - Test on `3.14` and fix any bugs ([#​2425](PyCQA/isort#2425)) [@​DanielNoord](https://github.com/DanielNoord) - Update CHANGELOG.md + Fix Formatting and Grammar ([#​2419](PyCQA/isort#2419)) [@​lukbrew25](https://github.com/lukbrew25) - Fix output of hanging indent for long lines with noqa ([#​2407](PyCQA/isort#2407)) [@​matan1008](https://github.com/matan1008) #### :construction\_worker: Continuous Integration - Format with `ruff` instead of `black` ([#​2432](PyCQA/isort#2432)) [@​DanielNoord](https://github.com/DanielNoord) - Target 3.10 for `ruff` ([#​2431](PyCQA/isort#2431)) [@​DanielNoord](https://github.com/DanielNoord) - Update development dependencies to latest version ([#​2426](PyCQA/isort#2426)) [@​DanielNoord](https://github.com/DanielNoord) - docs: update pre-commit examples to version 6.1.0 ([#​2413](PyCQA/isort#2413)) [@​pranlawate](https://github.com/pranlawate) - Small cleanup for developer environment ([#​2418](PyCQA/isort#2418)) [@​DanielNoord](https://github.com/DanielNoord) #### 📦 Dependencies - Bump actions/setup-python from 5 to 6 in the github-actions group ([#​2411](PyCQA/isort#2411)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) ### [`v6.1.0`](https://github.com/PyCQA/isort/blob/HEAD/CHANGELOG.md#610-October-1-2025) [Compare Source](PyCQA/isort@6.0.1...6.1.0) - Add python 3.14 classifier and badge ([#​2409](PyCQA/isort#2409)) [@​staticdev](https://github.com/staticdev) - Drop use of non-standard pkg\_resources API ([#​2405](PyCQA/isort#2405)) [@​dvarrazzo](https://github.com/dvarrazzo) ### [`v6.0.1`](https://github.com/PyCQA/isort/blob/HEAD/CHANGELOG.md#601-Febuary-26-2025) [Compare Source](PyCQA/isort@6.0.0...6.0.1) - Add OSError handling in find\_imports\_in\_file ([#​2331](PyCQA/isort#2331)) [@​kobarity](https://github.com/kobarity) ### [`v6.0.0`](https://github.com/PyCQA/isort/blob/HEAD/CHANGELOG.md#600-January-27-2025) [Compare Source](PyCQA/isort@5.13.2...6.0.0) - Remove support for Python 3.8 ([#​2327](PyCQA/isort#2327)) [@​DanielNoord](https://github.com/DanielNoord) - Python 3.13 support ([#​2306](PyCQA/isort#2306)) [@​mayty](https://github.com/mayty) - Speed up exists\_case\_sensitive calls ([#​2264](PyCQA/isort#2264)) [@​correctmost](https://github.com/correctmost) - Ensure that split\_on\_trailing\_comma works with as imports ([#​2340](PyCQA/isort#2340)) [@​DanielNoord](https://github.com/DanielNoord) - Black profile: enable magic comma ([#​2236](PyCQA/isort#2236)) [@​MrMino](https://github.com/MrMino) - Update line\_length and single\_line\_exclusions in google profile ([#​2149](PyCQA/isort#2149)) [@​jagapiou](https://github.com/jagapiou) - Allow --diff to be used with --jobs ([#​2302](PyCQA/isort#2302)) [@​mnakama](https://github.com/mnakama) - Fix wemake profile to have correct character limit ([#​2241](PyCQA/isort#2241)) [@​sobolevn](https://github.com/sobolevn) - Fix sort\_reexports code mangling ([#​2283](PyCQA/isort#2283)) [@​Helveg](https://github.com/Helveg) - Fix correct group by package tokenization ([#​2136](PyCQA/isort#2136)) [@​glasnt](https://github.com/glasnt) </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yLjQiLCJ1cGRhdGVkSW5WZXIiOiI0My4yNS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> See merge request swiss-armed-forces/cyber-command/cea/loom!284 Co-authored-by: Loom MR Pipeline Trigger <group_103951964_bot_9504bb8dead6d4e406ad817a607f24be@noreply.gitlab.com> Co-authored-by: shrewd-laidback palace <shrewd-laidback-palace-736-c41-2c1-e464fc974@swiss-armed-forces-open-source.ch>
chore(deps): update isort (major) This MR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [isort](https://github.com/PyCQA/isort) ([changelog](https://github.com/PyCQA/isort/releases)) | dev | major | `^5.13.2` → `^7.0.0` | [](https://securityscorecards.dev/viewer/?uri=github.com/PyCQA/isort) | --- ### Release Notes <details> <summary>PyCQA/isort (isort)</summary> ### [`v7.0.0`](https://github.com/PyCQA/isort/releases/tag/7.0.0) [Compare Source](PyCQA/isort@6.1.0...7.0.0) #### Changes #### 💥 Breaking Changes - Drop support for Python 3.9 ([#​2430](PyCQA/isort#2430)) [@​DanielNoord](https://github.com/DanielNoord) #### 🚀 Features - Show absolute paths in skipped file messages ([#​2416](PyCQA/isort#2416)) [@​pranlawate](https://github.com/pranlawate) #### 🪲 Fixes - Some fixes for Python 3.14 ([#​2433](PyCQA/isort#2433)) [@​DanielNoord](https://github.com/DanielNoord) - Test on `3.14` and fix any bugs ([#​2425](PyCQA/isort#2425)) [@​DanielNoord](https://github.com/DanielNoord) - Update CHANGELOG.md + Fix Formatting and Grammar ([#​2419](PyCQA/isort#2419)) [@​lukbrew25](https://github.com/lukbrew25) - Fix output of hanging indent for long lines with noqa ([#​2407](PyCQA/isort#2407)) [@​matan1008](https://github.com/matan1008) #### :construction\_worker: Continuous Integration - Format with `ruff` instead of `black` ([#​2432](PyCQA/isort#2432)) [@​DanielNoord](https://github.com/DanielNoord) - Target 3.10 for `ruff` ([#​2431](PyCQA/isort#2431)) [@​DanielNoord](https://github.com/DanielNoord) - Update development dependencies to latest version ([#​2426](PyCQA/isort#2426)) [@​DanielNoord](https://github.com/DanielNoord) - docs: update pre-commit examples to version 6.1.0 ([#​2413](PyCQA/isort#2413)) [@​pranlawate](https://github.com/pranlawate) - Small cleanup for developer environment ([#​2418](PyCQA/isort#2418)) [@​DanielNoord](https://github.com/DanielNoord) #### 📦 Dependencies - Bump actions/setup-python from 5 to 6 in the github-actions group ([#​2411](PyCQA/isort#2411)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) ### [`v6.1.0`](https://github.com/PyCQA/isort/blob/HEAD/CHANGELOG.md#610-October-1-2025) [Compare Source](PyCQA/isort@6.0.1...6.1.0) - Add python 3.14 classifier and badge ([#​2409](PyCQA/isort#2409)) [@​staticdev](https://github.com/staticdev) - Drop use of non-standard pkg\_resources API ([#​2405](PyCQA/isort#2405)) [@​dvarrazzo](https://github.com/dvarrazzo) ### [`v6.0.1`](https://github.com/PyCQA/isort/blob/HEAD/CHANGELOG.md#601-Febuary-26-2025) [Compare Source](PyCQA/isort@6.0.0...6.0.1) - Add OSError handling in find\_imports\_in\_file ([#​2331](PyCQA/isort#2331)) [@​kobarity](https://github.com/kobarity) ### [`v6.0.0`](https://github.com/PyCQA/isort/blob/HEAD/CHANGELOG.md#600-January-27-2025) [Compare Source](PyCQA/isort@5.13.2...6.0.0) - Remove support for Python 3.8 ([#​2327](PyCQA/isort#2327)) [@​DanielNoord](https://github.com/DanielNoord) - Python 3.13 support ([#​2306](PyCQA/isort#2306)) [@​mayty](https://github.com/mayty) - Speed up exists\_case\_sensitive calls ([#​2264](PyCQA/isort#2264)) [@​correctmost](https://github.com/correctmost) - Ensure that split\_on\_trailing\_comma works with as imports ([#​2340](PyCQA/isort#2340)) [@​DanielNoord](https://github.com/DanielNoord) - Black profile: enable magic comma ([#​2236](PyCQA/isort#2236)) [@​MrMino](https://github.com/MrMino) - Update line\_length and single\_line\_exclusions in google profile ([#​2149](PyCQA/isort#2149)) [@​jagapiou](https://github.com/jagapiou) - Allow --diff to be used with --jobs ([#​2302](PyCQA/isort#2302)) [@​mnakama](https://github.com/mnakama) - Fix wemake profile to have correct character limit ([#​2241](PyCQA/isort#2241)) [@​sobolevn](https://github.com/sobolevn) - Fix sort\_reexports code mangling ([#​2283](PyCQA/isort#2283)) [@​Helveg](https://github.com/Helveg) - Fix correct group by package tokenization ([#​2136](PyCQA/isort#2136)) [@​glasnt](https://github.com/glasnt) </details> --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yLjQiLCJ1cGRhdGVkSW5WZXIiOiI0My4yNS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> See merge request swiss-armed-forces/cyber-command/cea/loom!284 Co-authored-by: Loom MR Pipeline Trigger <group_103951964_bot_9504bb8dead6d4e406ad817a607f24be@noreply.gitlab.com> Co-authored-by: open-source Pipeline <group_90701827_bot_ed04ae348bc5f40af9966fb8b6867e99@noreply.gitlab.com>
When files are skipped, isort now displays their absolute paths in verbose mode, consistent with the "Fixing" messages. This improves debugging by making it clear which files are being skipped.
Changes:
Fixes #2412