Comments (3)
Thanks for the report!
This sounds more like #138 and #176 to me.
I have a few questions, since I can't reproduce:
- Did you install sqlfmt with the jinjafmt extra? (
pip install sqlfmt[jinjafmt]
) and/or do you otherwise have black installed? - Does this still happen if you run sqlfmt with the
--no-jinjafmt
option? e.g.,sqlfmt --no-jinjafmt myfile.sql
? - Rather than making small changes to your file, can you reproduce if you pass the
-k
option to sqlfmt? This clears the cache and forces reformatting, even if the source file is unchanged.sqlfmt -k myfile.sql
- Are you sure you're running
0.9.0
? This was absolutely a bug in a previous release. You may have multiple versions installed? I would runwhich sqlfmt
andsqlfmt --version
to make sure that it's 0.9.0 that is producing this result
from sqlfmt.
Sorry, this was an issue with the version specified in my pre-commit hook (forgot that pre-commit had it's own config and it was using v0.5.1
). Realized this after just using the sqlfmt
command directly.
Thanks for the quick response and for providing the different commands that will be helpful to my team in the future. Keep up the great work!
from sqlfmt.
Ah yes, I wish there was a better way to keep pre-commit in sync with other dependencies. Thanks for using sqlfmt!
from sqlfmt.
Related Issues (20)
- CREATE EXTERNAL FUNCTION
- Unterminated Jinja block...Expected end tag: ({% endfor %}) HOT 1
- sql "is [not] distinct from" expressions are incorrectly split by "from" HOT 6
- Tokenize output for equivalence check
- Issue with jinja call and endcall syntax with v0.14.0 HOT 8
- Issue with nested jinja call and endcall syntax with v0.14.1 HOT 3
- RecursionError: maximum recursion depth exceeded HOT 2
- Line order of comments and code is not preserved HOT 9
- Error when special unicode characters are used in source code on Windows HOT 4
- Issue with jinja call methods with arguments in v0.14.3 HOT 1
- Match against files *.sql suffix HOT 1
- Incorrect formatting of bun placeholders (e.g. `?1`) HOT 2
- Only merge multiline jinja with operators
- Adding space to comment breaks bun migrations HOT 2
- Docker builds failing with Docker driver error HOT 4
- Space inserted into column name causes syntax error HOT 2
- Reading File with UTF-8 BOM produce Syntax Error HOT 4
- UnicodeDecodeError on Windows: charmap codec HOT 3
- Improve verbose logging
- Support Tornado Templates
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 sqlfmt.