-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Resolve relative URIs in nitpick.styles.include #470
Conversation
30b9cc8
to
be18977
Compare
I’ll have to revisit the file url handling; tomorrow. |
dd33abc
to
d180f45
Compare
d78db90
to
5b946b1
Compare
Gah, I need a better way of running Windows tests locally. |
If you find something, let me know. 😅 I don't have a Windows VM anymore, so last time I was using |
I'm in the middle of a laptop switch, and then I'll try out https://github.com/StefanScherer/windows-docker-machine. |
5b946b1
to
9016205
Compare
I gave up on the vagrant / docker route and used Parallels instead. I have this down to a single failure now, should be able to get this completed tomorrow. |
9cb7a93
to
075e23b
Compare
Aaaand, we have a green build. This is ready for review now. |
Pull Request Test Coverage Report for Build 2044341989
💛 - Coveralls |
075e23b
to
c13925b
Compare
Side note: when refactoring I already was replacing And then flake8-bugbear added a B019 error message because the cache holds a reference to Sooner or later you'll have to deal with the remaining 11 uses of |
c13925b
to
3e61ec0
Compare
Further changes committed addressing:
I'll plug some more at the remaining xfails tomorrow, I’m pretty sure one of these is only failing locally because I haven’t quite configured symlinks correctly yet and the other is probably more proper TOML string escaping (can’t just expect backslashes in paths to work). |
3e61ec0
to
6c5e831
Compare
Okay, this is now definitely, finally, complete. All Windows XFAILs are now gone. @andreoliwa: please review and let me know how this is sitting with you. It's a pretty fundamental feature I'd need for our use of nitpick to be sustainable in the long run! |
6c5e831
to
c6270f7
Compare
- Refactored fetchers to operate on furl parsed objects - Relative URIs are resolved against the URI of the style file they are contained in. - During normalization, `gh://` is mapped to `github://`, and `pypackge://` is mapped to `py://` to avoid loading styles more than once.
c6270f7
to
a6789c9
Compare
I'll review this today after work or latest this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing. You added a feature, improved the code readability, cleaned up, fixed all Windows errors. I'll merge this right away. 🙇🏻♂️
# [0.32.0](v0.31.0...v0.32.0) (2022-03-27) ### Bug Fixes * **deps:** update dependency pytest-socket to a commit hash ([#440](#440)) ([61ac278](61ac278)) * GitHub URL should preserve query args ([#453](#453)) ([a2b97b1](a2b97b1)) * use built-in preset as default style ([#450](#450)) ([68fa2ce](68fa2ce)) ### Features * add --version cli switch (thanks to [@mjpieters](https://github.com/mjpieters)) ([#468](#468)) ([6a85f79](6a85f79)) * resolve relative URIs in nitpick.styles.include ([#470](#470)) ([ec934dc](ec934dc)) * set initial style url(s) with nitpick init ([#473](#473)) ([0100f2b](0100f2b)) * switch to requests-cache for style caching ([#467](#467)) ([c586d7f](c586d7f))
🎉 This PR is included in version 0.32.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Proposed changes
contained in.
gh://
is mapped togithub://
, andpypackge://
is mapped topy://
to avoid loading styles more thanonce.
Fix: #464
Checklist
make
locally before pushing commitsflake8
plugin (normal mode)flake8
plugin (offline mode)