mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
style
Automatic style fix Automatic style fix
This commit is contained in:
parent
9f1520ae21
commit
578d22ae94
1
.github/actionlint.yml
vendored
1
.github/actionlint.yml
vendored
@ -7,3 +7,4 @@ self-hosted-runner:
|
||||
- stress-tester
|
||||
- style-checker
|
||||
- style-checker-aarch64
|
||||
- release-maker
|
||||
|
4
.github/workflows/create_release.yml
vendored
4
.github/workflows/create_release.yml
vendored
@ -89,8 +89,8 @@ jobs:
|
||||
--volume=".:/ClickHouse" clickhouse/style-test \
|
||||
/ClickHouse/tests/ci/changelog.py -v --debug-helpers \
|
||||
--gh-user-or-token="$GH_TOKEN" --jobs=5 \
|
||||
--output="/ClickHouse/docs/changelogs/${RELEASE_TAG}.md" "${RELEASE_TAG}"
|
||||
git add ./docs/changelogs/${RELEASE_TAG}.md
|
||||
--output="/ClickHouse/docs/changelogs/${{ env.RELEASE_TAG }}.md" ${{ env.RELEASE_TAG }}
|
||||
git add ./docs/changelogs/${{ env.RELEASE_TAG }}.md
|
||||
echo "Generate Security"
|
||||
python3 ./utils/security-generator/generate_security.py > SECURITY.md
|
||||
git diff HEAD
|
||||
|
@ -17,6 +17,8 @@ src_paths = ["src", "tests/ci", "tests/sqllogic"]
|
||||
[tool.pylint.'MESSAGES CONTROL']
|
||||
# pytest.mark.parametrize is not callable (not-callable)
|
||||
disable = '''
|
||||
pointless-string-statement,
|
||||
line-too-long,
|
||||
missing-docstring,
|
||||
too-few-public-methods,
|
||||
invalid-name,
|
||||
|
@ -40,7 +40,7 @@ class ShellRunner:
|
||||
return 0, ""
|
||||
print(f"Running shell command: [{command}]")
|
||||
if async_:
|
||||
subprocess.Popen(command.split(" "))
|
||||
subprocess.Popen(command.split(" ")) # pylint:disable=consider-using-with
|
||||
return 0, ""
|
||||
result = subprocess.run(
|
||||
command + " 2>&1",
|
||||
@ -316,9 +316,9 @@ class PackageDownloader:
|
||||
def __init__(self, release, commit_sha, version):
|
||||
assert version.startswith(release), "Invalid release branch or version"
|
||||
major, minor = map(int, release.split("."))
|
||||
self.package_names = self.PACKAGES
|
||||
self.package_names = list(self.PACKAGES)
|
||||
if major > 24 or (major == 24 and minor > 3):
|
||||
self.package_names += self.EXTRA_PACKAGES
|
||||
self.package_names += list(self.EXTRA_PACKAGES)
|
||||
self.release = release
|
||||
self.commit_sha = commit_sha
|
||||
self.version = version
|
||||
|
@ -376,10 +376,10 @@ def main():
|
||||
repo_urls = {}
|
||||
direct_urls: Dict[str, List[str]] = {}
|
||||
if pr_info.event_type == EventType.PULL_REQUEST:
|
||||
release_or_pr = pr_info.number
|
||||
release_or_pr = str(pr_info.number)
|
||||
sha = pr_info.sha
|
||||
elif pr_info.event_type == EventType.PUSH and pr_info.is_master:
|
||||
release_or_pr = 0
|
||||
release_or_pr = str(0)
|
||||
sha = pr_info.sha
|
||||
else:
|
||||
release_or_pr = f"{args.version.major}.{args.version.minor}"
|
||||
|
@ -16,7 +16,15 @@ from docker_images_helper import get_docker_image, pull_image
|
||||
from env_helper import IS_CI, REPO_COPY, TEMP_PATH, GITHUB_EVENT_PATH
|
||||
from git_helper import GIT_PREFIX, git_runner
|
||||
from pr_info import PRInfo
|
||||
from report import ERROR, FAILURE, SUCCESS, JobReport, TestResults, read_test_results
|
||||
from report import (
|
||||
ERROR,
|
||||
FAILURE,
|
||||
SUCCESS,
|
||||
JobReport,
|
||||
TestResults,
|
||||
read_test_results,
|
||||
FAIL,
|
||||
)
|
||||
from ssh import SSHKey
|
||||
from stopwatch import Stopwatch
|
||||
|
||||
@ -204,8 +212,8 @@ def main():
|
||||
autofix_description = ""
|
||||
fail_cnt = 0
|
||||
for result in test_results:
|
||||
if result.status == FAILURE:
|
||||
# do not autofix if not only back failed
|
||||
if result.status in (FAILURE, FAIL):
|
||||
# do not autofix if not only black failed
|
||||
fail_cnt += 1
|
||||
|
||||
if args.push and fail_cnt == 1:
|
||||
|
@ -711,9 +711,9 @@ def get_localzone():
|
||||
|
||||
class SettingsRandomizer:
|
||||
settings = {
|
||||
"max_insert_threads": lambda: 12
|
||||
if random.random() < 0.03
|
||||
else random.randint(1, 3),
|
||||
"max_insert_threads": lambda: (
|
||||
12 if random.random() < 0.03 else random.randint(1, 3)
|
||||
),
|
||||
"group_by_two_level_threshold": threshold_generator(0.2, 0.2, 1, 1000000),
|
||||
"group_by_two_level_threshold_bytes": threshold_generator(
|
||||
0.2, 0.2, 1, 50000000
|
||||
|
Loading…
Reference in New Issue
Block a user