Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#147)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/bandit: 1.7.6 → 1.7.7](PyCQA/bandit@1.7.6...1.7.7)
- [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.2](astral-sh/ruff-pre-commit@v0.1.14...v0.2.2)
- [github.com/psf/black: 23.12.1 → 24.2.0](psf/black@23.12.1...24.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Specify directory to skip assert_used for Bandit differently

See PyCQA/bandit#1106

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pieter Gijsbers <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and PGijsbers authored Feb 21, 2024
1 parent f007308 commit b65096a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
# - id: no-commit-to-branch

- repo: https://github.com/PyCQA/bandit
rev: '1.7.6'
rev: '1.7.7'
hooks:
- id: bandit
args: [-c, pyproject.toml]
Expand All @@ -33,12 +33,12 @@ repos:
- pytest

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.2.0
hooks:
- id: black
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docs = [
"Bug Tracker" = "https://github.com/openml/server-api/issues"

[tool.bandit.assert_used]
skips = ["tests/*"]
skips = ["./tests/*"]

[tool.black]
line-length = 100
Expand Down
1 change: 1 addition & 0 deletions src/database/datasets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Translation from https://github.com/openml/OpenML/blob/c19c9b99568c0fabb001e639ff6724b9a754bbc9/openml_OS/models/api/v1/Api_data.php#L707"""

import datetime
from collections import defaultdict
from typing import Iterable
Expand Down
1 change: 1 addition & 0 deletions src/routers/openml/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
We add separate endpoints for old-style JSON responses, so they don't clutter the schema of the
new API, and are easily removed later.
"""

import http.client
import re
from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions src/schemas/datasets/dcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
make public sector data better searchable across borders and sectors. This can be
achieved by the exchange of descriptions of data sets among data portals.
"""

import datetime
from abc import ABC
from typing import Literal, Union
Expand Down
7 changes: 4 additions & 3 deletions src/schemas/datasets/mldcat_ap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
originally envisaged for the description of a machine learning process,
developed in collaboration with OpenML.
"""

from __future__ import annotations

from abc import ABC
Expand Down Expand Up @@ -270,9 +271,9 @@ class DataService(JsonLDObject):

class JsonLDGraph(BaseModel):
context: str | dict[str, HttpUrl] = Field(default_factory=dict, serialization_alias="@context")
graph: list[
Distribution | DataService | Dataset | Quality | Feature | Agent | MD5Checksum
] = Field(default_factory=list, serialization_alias="@graph")
graph: list[Distribution | DataService | Dataset | Quality | Feature | Agent | MD5Checksum] = (
Field(default_factory=list, serialization_alias="@graph")
)

model_config = {"populate_by_name": True, "extra": "forbid"}

Expand Down

0 comments on commit b65096a

Please sign in to comment.