mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add pyproject.toml to is_python for style checks
This commit is contained in:
parent
4955aa82f0
commit
117a846f87
@ -13,17 +13,17 @@ from typing import List, Tuple, Union
|
||||
import magic
|
||||
|
||||
from docker_images_helper import get_docker_image, pull_image
|
||||
from env_helper import IS_CI, REPO_COPY, TEMP_PATH, GITHUB_EVENT_PATH
|
||||
from env_helper import GITHUB_EVENT_PATH, IS_CI, REPO_COPY, TEMP_PATH
|
||||
from git_helper import GIT_PREFIX, git_runner
|
||||
from pr_info import PRInfo
|
||||
from report import (
|
||||
ERROR,
|
||||
FAIL,
|
||||
FAILURE,
|
||||
SUCCESS,
|
||||
JobReport,
|
||||
TestResults,
|
||||
read_test_results,
|
||||
FAIL,
|
||||
)
|
||||
from ssh import SSHKey
|
||||
from stopwatch import Stopwatch
|
||||
@ -130,7 +130,11 @@ def _check_mime(file: Union[Path, str], mime: str) -> bool:
|
||||
|
||||
def is_python(file: Union[Path, str]) -> bool:
|
||||
"""returns if the changed file in the repository is python script"""
|
||||
return _check_mime(file, "text/x-script.python") or str(file).endswith(".py")
|
||||
return (
|
||||
_check_mime(file, "text/x-script.python")
|
||||
or str(file).endswith(".py")
|
||||
or str(file) == "pyproject.toml"
|
||||
)
|
||||
|
||||
|
||||
def is_shell(file: Union[Path, str]) -> bool:
|
||||
|
Loading…
Reference in New Issue
Block a user