Skip to content

Commit

Permalink
fix ruff isort
Browse files Browse the repository at this point in the history
  • Loading branch information
hofbi committed Feb 1, 2024
1 parent 25176a2 commit 3afddce
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 14 deletions.
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ repos:
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
Expand All @@ -104,7 +99,7 @@ repos:
additional_dependencies: [cmakelang]
exclude: cmake/.*
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.14
rev: v0.1.15
hooks:
- id: ruff
- id: ruff-format
Expand Down Expand Up @@ -135,7 +130,7 @@ repos:
hooks:
- id: shellcheck
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.27.4
hooks:
- id: check-github-workflows
- repo: https://github.com/crate-ci/typos
Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/code_evaluation/evaluate_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
from datetime import date

import git
from tqdm import tqdm

from sel_tools.code_evaluation.jobs.common import EvaluationJob
from sel_tools.code_evaluation.jobs.factory import EvaluationJobFactory
from sel_tools.code_evaluation.report import EvaluationReport
from sel_tools.utils.repo import GitlabProject
from tqdm import tqdm


def evaluate_code(
Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/diff_creation/create_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

import git
from git.objects.commit import Commit
from sel_tools.diff_creation.report import Diff, DiffReport
from tqdm import tqdm

from sel_tools.diff_creation.report import Diff, DiffReport


def create_diff(
repo_paths: list[Path],
Expand Down
1 change: 1 addition & 0 deletions tools/sel_tools/gitlab_api/attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

from gitlab.v4.objects.projects import Project

from sel_tools.config import REPO_DIR


Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/gitlab_api/comment_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

import gitlab
from gitlab.v4.objects.projects import Project
from tqdm import tqdm

from sel_tools.config import GITLAB_SERVER_URL
from sel_tools.gitlab_api.attachments import (
replace_file_paths_with_urls,
upload_attachments,
)
from sel_tools.utils.comment import Comment
from tqdm import tqdm


def comment_issues(
Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/gitlab_api/create_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import git
import gitlab
from gitlab.v4.objects.projects import Project
from tqdm import tqdm

from sel_tools.config import GIT_MAIN_BRANCH, GITLAB_SERVER_URL
from sel_tools.utils.files import FileTree, FileVisitor
from tqdm import tqdm


def commit_changes(repo_paths: list[Path], message: str) -> None:
Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/gitlab_api/create_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

import gitlab
from gitlab.v4.objects.projects import Project
from tqdm import tqdm

from sel_tools.config import GITLAB_SERVER_URL
from sel_tools.gitlab_api.attachments import (
replace_file_paths_with_urls,
upload_attachments,
)
from sel_tools.utils.task import Task
from tqdm import tqdm


def create_issues(
Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/gitlab_api/create_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

import gitlab
from gitlab.v4.objects.projects import Project
from tqdm import tqdm

from sel_tools.config import AVATAR_PATH, GIT_MAIN_BRANCH, GITLAB_SERVER_URL, RUNNER_ID
from sel_tools.gitlab_api.create_commit import create_commit
from tqdm import tqdm


def create_repos(
Expand Down
3 changes: 2 additions & 1 deletion tools/sel_tools/gitlab_api/fetch_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

import gitlab
from gitlab.v4.objects.projects import Project
from tqdm import tqdm

from sel_tools.config import GIT_MAIN_BRANCH, GITLAB_SERVER_URL
from sel_tools.utils.repo import GitlabProject, GitRepo
from tqdm import tqdm


def fetch_repos(
Expand Down
1 change: 1 addition & 0 deletions tools/sel_tools/utils/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import git
from gitlab.v4.objects.projects import Project

from sel_tools.config import GIT_MAIN_BRANCH


Expand Down
1 change: 1 addition & 0 deletions tools/tests/code_evaluation/jobs/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
run_shell_command_with_output,
)
from sel_tools.code_evaluation.report import EvaluationResult

from tests.helper import ComplexJob, SimpleFailingJob, SimplePassingJob


Expand Down
1 change: 1 addition & 0 deletions tools/tests/code_evaluation/jobs/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

from sel_tools.code_evaluation.jobs.factory import EvaluationJobFactory

from tests.helper import SimplePassingJob


Expand Down
1 change: 1 addition & 0 deletions tools/tests/code_evaluation/test_evaluate_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from sel_tools.code_evaluation.evaluate_code import CodeEvaluator
from sel_tools.utils.repo import GitlabProject

from tests.helper import ComplexJob, GitlabProjectFake, GitTestCase, SimplePassingJob


Expand Down
1 change: 1 addition & 0 deletions tools/tests/code_evaluation/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
write_evaluation_reports,
)
from sel_tools.utils.repo import GitlabProject

from tests.helper import GitlabProjectFake


Expand Down
1 change: 1 addition & 0 deletions tools/tests/diff_creation/test_create_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path

from sel_tools.diff_creation.create_diff import DiffCreator, create_diff

from tests.helper import GitTestCase


Expand Down
1 change: 1 addition & 0 deletions tools/tests/gitlab_api/test_create_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
get_repo_settings,
store_student_repo_info_to_config_file,
)

from tests.helper import GitlabGroupFake


Expand Down
1 change: 1 addition & 0 deletions tools/tests/utils/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from sel_tools.config import GIT_MAIN_BRANCH
from sel_tools.utils.repo import GitRepo

from tests.helper import GitTestCase


Expand Down

0 comments on commit 3afddce

Please sign in to comment.