You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ treefmt tracked.py
traversed 1 files
emitted 1 files for processing
formatted 1 files (1 changed) in 107ms
Untracked relative path get formatted (thanks @brianmcgee! this works now because of #438):
$ treefmt untracked.py
traversed 1 files
emitted 1 files for processing
formatted 1 files (0 changed) in 119ms
Tracked absolute paths get skipped:
$ treefmt $(realpath tracked.py)
Error: path /home/jeremy/tmp/2024-10-12-pyhack-1/tracked.py not found within the tree root /home/jeremy/tmp/2024-10-12-pyhack-1
Untracked absolute paths get skipped:
$ treefmt $(realpath untracked.py)
Error: path /home/jeremy/tmp/2024-10-12-pyhack-1/untracked.py not found within the tree root /home/jeremy/tmp/2024-10-12-pyhack-1
This fixes a few issues with both relative and absolute paths:
- Previously, treefmt refused to format any files passed as absolute
paths, regardless of if they were in tree or not: numtide#442
- Previously, treefmt would treat relative paths as relative to the
project root, which is not ideal if you're in a subdirectory and you
just want to format the file you're right next to: numtide#443
- There was even a test asserting this behavior. I changed it to
reflect the updated behavior.
- treefmt's handling of paths outside of the project root was a bit
inconsistent: numtide#444
This fixes a few issues with both relative and absolute paths:
- Previously, treefmt refused to format any files passed as absolute
paths, regardless of if they were in tree or not: numtide#442
- Previously, treefmt would treat relative paths as relative to the
project root, which is not ideal if you're in a subdirectory and you
just want to format the file you're right next to: numtide#443
- There was even a test asserting this behavior. I changed it to
reflect the updated behavior.
- treefmt's handling of paths outside of the project root was a bit
inconsistent: numtide#444
Uh oh!
There was an error while loading. Please reload this page.
Tracked relative paths get formatted:
Untracked relative path get formatted (thanks @brianmcgee! this works now because of #438):
Tracked absolute paths get skipped:
Untracked absolute paths get skipped:
To Reproduce
Here's the setup for the above commands:
Expected behavior
I'd expect treefmt to format these files.
System information
See above. I'm using 659aa0f.
The text was updated successfully, but these errors were encountered: