mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +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
|
import magic
|
||||||
|
|
||||||
from docker_images_helper import get_docker_image, pull_image
|
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 git_helper import GIT_PREFIX, git_runner
|
||||||
from pr_info import PRInfo
|
from pr_info import PRInfo
|
||||||
from report import (
|
from report import (
|
||||||
ERROR,
|
ERROR,
|
||||||
|
FAIL,
|
||||||
FAILURE,
|
FAILURE,
|
||||||
SUCCESS,
|
SUCCESS,
|
||||||
JobReport,
|
JobReport,
|
||||||
TestResults,
|
TestResults,
|
||||||
read_test_results,
|
read_test_results,
|
||||||
FAIL,
|
|
||||||
)
|
)
|
||||||
from ssh import SSHKey
|
from ssh import SSHKey
|
||||||
from stopwatch import Stopwatch
|
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:
|
def is_python(file: Union[Path, str]) -> bool:
|
||||||
"""returns if the changed file in the repository is python script"""
|
"""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:
|
def is_shell(file: Union[Path, str]) -> bool:
|
||||||
|
Loading…
Reference in New Issue
Block a user