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(ci): Fix ruff being skipped in CI by prefixing destinations with skore/ after #440 #545

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ repos:
rev: v0.6.9
hooks:
- id: ruff
files: ^(src|tests)/
files: ^skore/(src|tests)/
args: [--fix]
- id: ruff-format
files: ^(src|tests)/
files: ^skore/(src|tests)/

- repo: local
hooks:
Expand Down
4 changes: 1 addition & 3 deletions skore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,11 @@ select = [
convention = "numpy"

[tool.ruff.lint.per-file-ignores]
"src/*" = ["UP007"]
"tests/*" = ["D"]
"examples/*" = [
"D",
# It's fine not to put the import at the top of the file in the examples
# folder.
"E402",
# Useless expressions are useful!
"B018",
]

Expand Down
2 changes: 1 addition & 1 deletion skore/src/skore/cli/launch_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import webbrowser
from contextlib import asynccontextmanager
from pathlib import Path
from typing import Union

import uvicorn
from fastapi import FastAPI

from skore.cli import logger
from skore.project import load
from skore.ui.app import create_app
from typing import Union


class ProjectNotFound(Exception):
Expand Down
3 changes: 2 additions & 1 deletion skore/src/skore/persistence/abstract_storage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Abstract storage interface."""

from abc import ABC, abstractmethod
from typing import Any, Iterator
from collections.abc import Iterator
from typing import Any


class AbstractStorage(ABC):
Expand Down
3 changes: 2 additions & 1 deletion skore/src/skore/persistence/disk_cache_storage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""In-memory storage."""

from collections.abc import Iterator
from pathlib import Path
from typing import Any, Iterator
from typing import Any

from diskcache import Cache

Expand Down
3 changes: 2 additions & 1 deletion skore/src/skore/persistence/in_memory_storage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""In-memory storage."""

from typing import Any, Iterator
from collections.abc import Iterator
from typing import Any

from .abstract_storage import AbstractStorage

Expand Down
3 changes: 2 additions & 1 deletion skore/src/skore/ui/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""FastAPI factory used to create the API to interact with stores."""

from typing import Optional

from fastapi import APIRouter, FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
Expand All @@ -8,7 +10,6 @@
from skore.project import Project, load
from skore.ui.dependencies import get_static_path
from skore.ui.project_routes import router as project_router
from typing import Optional


def create_app(
Expand Down