Comments (8)
I'd go with Cheuk's solution here - we report an error if git ls-files
'd files already, and I don't think adding ", maybe due to unexpanded glob pattern?" is a bad thing in the rather unlikely event that it happens.
Checking after we've failed to open and read the file has two other advantages: it's faster due to our multiprocessing, and it avoids time-of-check/time-of-use errors (which are not much of a concern here, but that way lie subtle mistakes when code changes over time).
from shed.
I think printing a "file not found" warning to stderr for each missing file would make sense, and happily that's also easy to implement! Happy to accept a PR; otherwise I'll get to this within the next few weeks.
from shed.
(misclick! Darn mobile interfaces...)
from shed.
@Zac-HD can this be resolved by adding an extra error message here?
Line 67 in 6906329
from shed.
Depends on if you want to raise file-missing errors when auto-detecting files in git repos. I can see the case for either way there.
Alternative would be checking all files here
Lines 128 to 129 in 6906329
from shed.
@tommorris may I know which Make and Bash are you using? I cannot reproduce at mine using:
GNU Make 3.81 and GNU bash, version 3.2.57(1)-release (arm64-apple-darwin22)
shed
will run correctly from the make
command even with the globs
I can still put in a PR with the extra error message when the file name has '*'s in it, but it would be nice to be able to test it with the problem that it is trying to solve
from shed.
I'd probably just use a quoted string to get a non-existent path with an asterisk in it - realistic tests are nice for motivation, but not strictly necessary.
from shed.
Oh nvm me, I skimmed too quickly and didn't see how the returned value was handled. For some reason I thought the error message was ignored when running with git ls-files
from shed.
Related Issues (20)
- Should the readme list >=py38 instead of >=py37 as the autodetected minimum version? HOT 2
- Replacing ~autoflake, isort, and~ black with Ruff HOT 9
- Test on Python 3.11
- Refactor type hints for Python 3.10+ HOT 7
- Stop `shed --refactor` from removing comments in otherwise-pointless parens
- Incorrect refactor when removing nested `sorted`
- add upper bound for black and isort versions HOT 5
- Stop shed from refactoring certain lines? HOT 3
- `shed --refactor` should only convert `== True` to `is True` within an `if` or `while` HOT 5
- Shed requires two passes when removing imports makes it possible to put them on one line HOT 2
- Shed requiring two passes when removing import causes ordering confusion HOT 4
- Replacement of `reversed(sorted(x))` with `sorted(x, reverse=True)` changes stability of sort. HOT 4
- Bugs in `shed --refactor`
- [feature request] some way of passing through options/config to bundled tools HOT 2
- After next `autoflake` release, grab the perf improvement HOT 3
- Coding magic comment deleted HOT 1
- shed --refactor breaks on (incorrect) code involving generator expression HOT 4
- Complicated regex somehow breaks shed --refactor HOT 1
- Proposal: shed should use ast.parse to validate code on errors HOT 4
- `docshed` should only apply in docstrings, not other string literals HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shed.