Skip to content
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

Fix: Add missing init file to sqlfluff.core.templaters.slicers #1826

Merged
merged 4 commits into from Nov 5, 2021

Conversation

CrossNox
Copy link
Contributor

@CrossNox CrossNox commented Nov 4, 2021

Brief summary of the change made

Running sqlfluff --help (or any CLI command) fails with ModuleNotFoundError: No module named 'sqlfluff.core.templaters.slicers' due to a missing __init__.py file on src/sqlfluff/core/templaters/slicers.

Are there any other side effects of this change that we should be aware of?

None

@CrossNox
Copy link
Contributor Author

CrossNox commented Nov 4, 2021

I just noticed that 1788 adds this file, but IMHO this quick fix can be isolated into a small PR and then merge those changes, so that main has a runnable version.

@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #1826 (560dbc2) into main (8719730) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #1826   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          138       138           
  Lines         9832      9832           
=========================================
  Hits          9832      9832           
Impacted Files Coverage Δ
src/sqlfluff/core/templaters/jinja.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8719730...560dbc2. Read the comment docs.

@tunetheweb
Copy link
Member

Can you add the comment like #1788 does to prevent linting failures.

@barrywhart you happy for this to go ahead of your PR?

@barrywhart
Copy link
Member

Sure, go ahead. Not sure when mine will be finished.

@CrossNox
Copy link
Contributor Author

CrossNox commented Nov 4, 2021

Can you add the comment like #1788 does to prevent linting failures.

@barrywhart you happy for this to go ahead of your PR?

Added! @barrywhart I couldn't find a way to checkout the file from your fork so that it appeared as authored by you, sorry.

@barrywhart
Copy link
Member

No worries!

@WittierDinosaur
Copy link
Contributor

Perhaps it's worth adding a test case for this?

@CrossNox
Copy link
Contributor Author

CrossNox commented Nov 5, 2021

@WittierDinosaur do you mean testing the CLI or testing imports?

@tunetheweb
Copy link
Member

Presume he means to prevent this issue happening again in the future where a new module is added without a __init__.py when it's needed?

Would be good if we could add that. But think out of scope of this PR so let's merge this.

@tunetheweb tunetheweb merged commit 8c9c442 into sqlfluff:main Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants