Skip to content

Commit

Permalink
chore(deps): update pre-commit hook ruff and pydoclint (#1852)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Håkon V. Treider <[email protected]>
  • Loading branch information
renovate[bot] and haakonvt authored Jul 18, 2024
1 parent 252e737 commit 6775fce
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.5.2
hooks:
- id: ruff
args:
Expand Down Expand Up @@ -48,7 +48,7 @@ repos:
require_serial: true # avoid possible race conditions

- repo: https://github.com/jsh9/pydoclint # Run after 'custom-checks' as these may auto-fix
rev: 0.4.2
rev: 0.5.6
hooks:
- id: pydoclint
require_serial: true # Spammy in run-all scenarios (more than fast enough already)
Expand All @@ -57,3 +57,4 @@ repos:
- --exclude=tests/|scripts/
- --quiet # otherwise prints all checked files that are ok...
- --skip-checking-raises=true
- --check-class-attributes=false
13 changes: 6 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ def test_apply_dm_raise_top_level_error(self, cognite_client: CogniteClient, int
def test_wipe_and_regenerate_dml(self, cognite_client: CogniteClient, data_model: DataModel) -> None:
res = cognite_client.data_modeling.graphql._unsafely_wipe_and_regenerate_dml(data_model.as_id())
expected = """
type SomeType @view(version: "31e24bb338352b") {
type SomeType {
someProp: String!
}
type AnotherType @view(version: "855f080c9de22f") {
type AnotherType {
anotherProp: String!
}
"""
Expand Down
12 changes: 6 additions & 6 deletions tests/tests_integration/test_api/test_entity_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ def test_fit_retrieve_update(self, cognite_client, fitted_model):
# Update model
model.name = "new_name"
updated_model = cognite_client.entity_matching.update(model)
assert type(updated_model) == EntityMatchingModel
assert type(updated_model) is EntityMatchingModel
assert updated_model.name == "new_name"

updated_model2 = cognite_client.entity_matching.update(
EntityMatchingModelUpdate(id=model.id).description.set("new description")
)
assert type(updated_model2) == EntityMatchingModel
assert type(updated_model2) is EntityMatchingModel
assert updated_model2.description == "new description"

def test_refit(self, cognite_client, fitted_model):
Expand Down Expand Up @@ -123,8 +123,8 @@ def test_extra_options(self, cognite_client):
def test_list(self, cognite_client):
models_list = cognite_client.entity_matching.list()
assert len(models_list) > 0
assert type(models_list) == EntityMatchingModelList
assert all([type(x) == EntityMatchingModel for x in models_list])
assert type(models_list) is EntityMatchingModelList
assert all([type(x) is EntityMatchingModel for x in models_list])
# Add filter
models_list = cognite_client.entity_matching.list(feature_type="bigram")
assert {model.feature_type for model in models_list} == {"bigram"}
Expand All @@ -133,8 +133,8 @@ def test_list(self, cognite_client):
def test_list_jobs(self, cognite_client):
jobs_list = cognite_client.entity_matching.list_jobs()
assert len(jobs_list) > 0
assert type(jobs_list) == ContextualizationJobList
assert all([type(x) == ContextualizationJob for x in jobs_list])
assert type(jobs_list) is ContextualizationJobList
assert all([type(x) is ContextualizationJob for x in jobs_list])

def test_direct_predict(self, cognite_client, fitted_model):
job = cognite_client.entity_matching.predict(external_id=fitted_model.external_id)
Expand Down

0 comments on commit 6775fce

Please sign in to comment.