Skip to content

Commit

Permalink
Merge pull request #155 from yu-iskw/upgrade-pre-commit-hooks
Browse files Browse the repository at this point in the history
Upgrade pre-commit hooks
  • Loading branch information
z3z1ma authored Jun 12, 2024
2 parents f334d3a + 2858f4b commit 5ac8245
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -9,25 +9,25 @@ repos:
- id: detect-private-key
- id: debug-statements
- repo: https://github.com/rhysd/actionlint
rev: v1.6.26
rev: v1.7.1
hooks:
- id: actionlint-docker
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.4.2
hooks:
- id: black
args: ["--config", "pyproject.toml"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["-sp", "pyproject.toml"]
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
rev: v2.13.0-beta
hooks:
- id: hadolint-docker
# - repo: https://github.com/pycqa/flake8
Expand Down
12 changes: 8 additions & 4 deletions src/dbt_osmosis/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def convert_profile_report_to_html(profile: ydata_profiling.ProfileReport) -> st
compileOptionContainer = st.container()
ideContainer = st.container()

descriptionContainer.markdown("""
descriptionContainer.markdown(
"""
Welcome to the [dbt-osmosis](https://github.com/z3z1ma/dbt-osmosis) workbench 👋.
The workbench serves as a no fuss way to spin up
an environment where you can very quickly iterate on dbt models. In an ideal flow, a developer
Expand All @@ -291,7 +292,8 @@ def convert_profile_report_to_html(profile: ydata_profiling.ProfileReport) -> st
the workbench as a scratchpad 👷‍♀️. In a full day of development, you may never spin down the workbench.
Refreshing the page is enough to reparse the physical dbt project on disk. The instantaneous feedback
rarely experienced with jinja + ability to execute the SQL both synergize to supercharge ⚡️ productivity!
""")
"""
)

if not state[PIVOT_LAYOUT]:
idePart1, idePart2 = ideContainer.columns(2)
Expand Down Expand Up @@ -441,7 +443,8 @@ def convert_profile_report_to_html(profile: ydata_profiling.ProfileReport) -> st
footer1.header("Useful Links 🧐")
footer2.header("RSS Feeds 🚨")
footer1.write("")
footer1.markdown("""
footer1.markdown(
"""
##### dbt docs
- [docs.getdbt.com](https://docs.getdbt.com/)
Expand All @@ -453,7 +456,8 @@ def convert_profile_report_to_html(profile: ydata_profiling.ProfileReport) -> st
- [Gitlab Data Team Wiki](https://about.gitlab.com/handbook/business-technology/data-team/)
- [dbt Best Practices](https://docs.getdbt.com/guides/best-practices/how-we-structure/1-guide-overview)
""")
"""
)


@st.cache(ttl=300.0)
Expand Down
14 changes: 10 additions & 4 deletions src/dbt_osmosis/app_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@


def _get_demo_query() -> str:
return dedent("""
return dedent(
"""
{% set payment_methods = ['credit_card', 'coupon', 'bank_transfer', 'gift_card'] %}
with orders as (
Expand Down Expand Up @@ -93,7 +94,8 @@ def _get_demo_query() -> str:
)
select * from final
""")
"""
)


def _parse_args() -> dict:
Expand Down Expand Up @@ -341,15 +343,19 @@ def main():
feed = feedparser.parse("https://news.ycombinator.com/rss")
feed_contents = []
for entry in feed.entries:
feed_contents.append(dedent(f"""
feed_contents.append(
dedent(
f"""
<div style="padding: 10px 5px 10px 5px; border-bottom: 1px solid #e0e0e0;">
<a href="{entry.link}" target="_blank" style="font-size: 16px; font-weight: bold; color: #FF4136; text-decoration: none;">{entry.title}</a>
<div style="font-size: 12px; color: #9e9e9e; padding-top: 3px;">{entry.published}
<span style="color: #FF4136;">|</span>
<a href="{entry.comments}" target="_blank" style="color: #FF4136; text-decoration: none;">Comments</a>
</div>
</div>
"""))
"""
)
)
w.feed_contents = "".join(feed_contents)
else:
# Load state
Expand Down
1 change: 1 addition & 0 deletions src/dbt_osmosis/vendored/dbt_core_interface/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Dbt Core Interface."""

from .project import * # noqa: F401, F403
7 changes: 5 additions & 2 deletions src/dbt_osmosis/vendored/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5472,7 +5472,8 @@ def wrapper(*args, **kwargs):
_HTTP_STATUS_LINES = {k: "%d %s" % (k, v) for (k, v) in HTTP_CODES.items()}

#: The default template used for error pages. Override with @error()
ERROR_PAGE_TEMPLATE = """
ERROR_PAGE_TEMPLATE = (
"""
%%try:
%%from %s import DEBUG, request
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Expand Down Expand Up @@ -5510,7 +5511,9 @@ def wrapper(*args, **kwargs):
<b>ImportError:</b> Could not generate the error page. Please add bottle to
the import path.
%%end
""" % __name__
"""
% __name__
)

#: A thread-safe instance of :class:`LocalRequest`. If accessed from within a
#: request callback, this instance always refers to the *current* request
Expand Down

0 comments on commit 5ac8245

Please sign in to comment.