Skip to content

Commit 87491ce

Browse files
authored
Merge pull request #412 from dbt-msft/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 57e8808 + 8ee6042 commit 87491ce

10 files changed

Lines changed: 33 additions & 62 deletions

File tree

.github/scripts/verify_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
Exits 0 on match, 1 on mismatch, 2 on usage error.
1111
"""
12+
1213
from __future__ import annotations
1314

1415
import re

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: python3.10
33
repos:
44
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
5-
rev: v4.6.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-yaml
88
args:
@@ -21,7 +21,7 @@ repos:
2121
- id: mixed-line-ending
2222
- id: check-docstring-first
2323
- repo: 'https://github.com/adrienverge/yamllint'
24-
rev: v1.35.1
24+
rev: v1.38.0
2525
hooks:
2626
- id: yamllint
2727
args:
@@ -38,7 +38,7 @@ repos:
3838
args:
3939
- '--all'
4040
- repo: 'https://github.com/pycqa/isort'
41-
rev: 5.13.2
41+
rev: 9.0.0a3
4242
hooks:
4343
- id: isort
4444
args:
@@ -50,7 +50,7 @@ repos:
5050
- '--python-version'
5151
- '39'
5252
- repo: 'https://github.com/psf/black'
53-
rev: 24.8.0
53+
rev: 26.5.1
5454
hooks:
5555
- id: black
5656
args:
@@ -66,7 +66,7 @@ repos:
6666
- '--check'
6767
- '--diff'
6868
- repo: 'https://github.com/pycqa/flake8'
69-
rev: 7.1.1
69+
rev: 7.3.0
7070
hooks:
7171
- id: flake8
7272
args:
@@ -78,7 +78,7 @@ repos:
7878
stages:
7979
- manual
8080
- repo: 'https://github.com/pre-commit/mirrors-mypy'
81-
rev: v1.11.1
81+
rev: v2.1.0
8282
hooks:
8383
- id: mypy
8484
args:

tests/functional/adapter/dbt/test_caching.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ class TestCachingLowercaseModel(BaseCachingLowercaseModel):
1212
pass
1313

1414

15-
@pytest.mark.skip(
16-
reason="""
15+
@pytest.mark.skip(reason="""
1716
Fails because of case sensitivity.
1817
MODEL is coereced to model which fails the test as it sees conflicting naming
19-
"""
20-
)
18+
""")
2119
class TestCachingUppercaseModel(BaseCachingUppercaseModel):
2220
pass
2321

tests/functional/adapter/dbt/test_hooks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ def project_config_update(self):
196196
"models": {
197197
"test": {
198198
"hooked": {
199-
"post-hook": [
200-
"""
199+
"post-hook": ["""
201200
insert into {{this.schema}}.on_model_hook select
202201
test_state,
203202
'{{ target.dbname }}' as target_dbname,
@@ -211,8 +210,7 @@ def project_config_update(self):
211210
'{{ run_started_at }}' as run_started_at,
212211
'{{ invocation_id }}' as invocation_id,
213212
'{{ thread_id }}' as thread_id
214-
from {{ ref('post') }}""".strip()
215-
],
213+
from {{ ref('post') }}""".strip()],
216214
}
217215
},
218216
}

tests/functional/adapter/dbt/test_persist_docs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
from dbt.tests.adapter.persist_docs.test_persist_docs import BasePersistDocs
44

55

6-
@pytest.mark.skip(
7-
reason="""
6+
@pytest.mark.skip(reason="""
87
Persisted docs are not implemented in SQLServer.
98
Could be implemented with sp_addextendedproperty
10-
"""
11-
)
9+
""")
1210
class TestPersistDocs(BasePersistDocs):
1311
pass

tests/functional/adapter/dbt/test_relations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ class TestChangeRelationTypeValidator(BaseChangeRelationTypeValidator):
88
pass
99

1010

11-
@pytest.mark.xfail(
12-
reason="""
11+
@pytest.mark.xfail(reason="""
1312
Test fails as its not passing Use[] properly.
1413
`Use[None]` is called, should be `User[TestDB]`
1514
Unclear why the macro doens't pass it properly.
16-
"""
17-
)
15+
""")
1816
class TestDropSchemaNamed(BaseDropSchemaNamed):
1917
pass

tests/functional/adapter/dbt/test_simple_seed.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -163,25 +163,21 @@ def test_simple_seed_with_disabled(self, clear_test_schema, project):
163163
check_table_does_not_exist(project.adapter, "seed_disabled")
164164
check_table_does_exist(project.adapter, "seed_tricky")
165165

166-
@pytest.mark.skip(
167-
reason="""
166+
@pytest.mark.skip(reason="""
168167
Running all the tests in the same schema causes the tests to fail
169168
as they all share the same schema across the tests
170-
"""
171-
)
169+
""")
172170
def test_simple_seed_selection(self, clear_test_schema, project):
173171
results = run_dbt(["seed", "--select", "seed_enabled"])
174172
assert len(results) == 1
175173
check_table_does_exist(project.adapter, "seed_enabled")
176174
check_table_does_not_exist(project.adapter, "seed_disabled")
177175
check_table_does_not_exist(project.adapter, "seed_tricky")
178176

179-
@pytest.mark.skip(
180-
reason="""
177+
@pytest.mark.skip(reason="""
181178
Running all the tests in the same schema causes the tests to fail
182179
as they all share the same schema across the tests
183-
"""
184-
)
180+
""")
185181
def test_simple_seed_exclude(self, clear_test_schema, project):
186182
results = run_dbt(["seed", "--exclude", "seed_enabled"])
187183
assert len(results) == 1
@@ -208,12 +204,10 @@ def clear_test_schema(self, project):
208204
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
209205
project.run_sql(f"drop schema if exists {project.test_schema}")
210206

211-
@pytest.mark.skip(
212-
reason="""
207+
@pytest.mark.skip(reason="""
213208
Running all the tests in the same schema causes the tests to fail
214209
as they all share the same schema across the tests
215-
"""
216-
)
210+
""")
217211
def test_simple_seed_with_disabled(self, clear_test_schema, project):
218212
results = run_dbt(["seed"])
219213
assert len(results) == 2
@@ -228,12 +222,10 @@ def test_simple_seed_selection(self, clear_test_schema, project):
228222
check_table_does_not_exist(project.adapter, "seed_disabled")
229223
check_table_does_not_exist(project.adapter, "seed_tricky")
230224

231-
@pytest.mark.skip(
232-
reason="""
225+
@pytest.mark.skip(reason="""
233226
Running all the tests in the same schema causes the tests to fail
234227
as they all share the same schema across the tests
235-
"""
236-
)
228+
""")
237229
def test_simple_seed_exclude(self, clear_test_schema, project):
238230
results = run_dbt(["seed", "--exclude", "seed_enabled"])
239231
assert len(results) == 1
@@ -260,25 +252,21 @@ def clear_test_schema(self, project):
260252
project.run_sql(f"drop view if exists {project.test_schema}.seed_tricky")
261253
project.run_sql(f"drop schema if exists {project.test_schema}")
262254

263-
@pytest.mark.skip(
264-
reason="""
255+
@pytest.mark.skip(reason="""
265256
Running all the tests in the same schema causes the tests to fail
266257
as they all share the same schema across the tests
267-
"""
268-
)
258+
""")
269259
def test_simple_seed_with_disabled(self, clear_test_schema, project):
270260
results = run_dbt(["seed"])
271261
assert len(results) == 2
272262
check_table_does_exist(project.adapter, "seed_enabled")
273263
check_table_does_not_exist(project.adapter, "seed_disabled")
274264
check_table_does_exist(project.adapter, "seed_tricky")
275265

276-
@pytest.mark.skip(
277-
reason="""
266+
@pytest.mark.skip(reason="""
278267
Running all the tests in the same schema causes the tests to fail
279268
as they all share the same schema across the tests
280-
"""
281-
)
269+
""")
282270
def test_simple_seed_selection(self, clear_test_schema, project):
283271
results = run_dbt(["seed", "--select", "seed_enabled"])
284272
assert len(results) == 1

tests/functional/adapter/dbt/test_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,10 @@ class TestStringLiteral(BaseStringLiteral):
364364
pass
365365

366366

367-
@pytest.mark.skip(
368-
reason="""
367+
@pytest.mark.skip(reason="""
369368
comment here about why this is skipped.
370369
https://github.com/dbt-labs/dbt-adapters/blob/f1987d4313cc94bac9906963dff1337ee0bffbc6/dbt/include/global_project/macros/adapters/timestamps.sql#L39
371-
"""
372-
)
370+
""")
373371
class TestCurrentTimestamps(BaseCurrentTimestamps):
374372
pass
375373

tests/functional/adapter/mssql/test_index.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@
106106
)
107107
"""
108108

109-
index_count = (
110-
base_validation
111-
+ """
109+
index_count = base_validation + """
112110
select
113111
index_type,
114112
count(*) index_count
@@ -118,11 +116,8 @@
118116
schema_name='{schema_name}'
119117
group by index_type
120118
"""
121-
)
122119

123-
other_index_count = (
124-
base_validation
125-
+ """
120+
other_index_count = base_validation + """
126121
SELECT
127122
*
128123
FROM
@@ -133,7 +128,6 @@
133128
table_view='{schema_name}.{table_name}'
134129
135130
"""
136-
)
137131

138132

139133
class TestIndex:

tests/functional/adapter/mssql/test_reserved_keywords_schema.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,15 @@ def project_config_update(self):
3131

3232
@pytest.fixture(scope="class")
3333
def macros(self):
34-
return {
35-
"generate_schema_name.sql": """
34+
return {"generate_schema_name.sql": """
3635
{% macro generate_schema_name(custom_schema_name, node) -%}
3736
{%- if custom_schema_name -%}
3837
{{ custom_schema_name | trim }}
3938
{%- else -%}
4039
{{ target.schema }}
4140
{%- endif -%}
4241
{%- endmacro %}
43-
"""
44-
}
42+
"""}
4543

4644
@pytest.fixture(autouse=True, scope="class")
4745
def cleanup_schema(self, project):

0 commit comments

Comments
 (0)