mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fix style-check errors
This commit is contained in:
parent
16a864171d
commit
d94228b718
@ -9,7 +9,8 @@ check_untyped_defs = True
|
||||
disallow_untyped_decorators = True
|
||||
no_implicit_optional = True
|
||||
warn_redundant_casts = True
|
||||
warn_unused_ignores = True
|
||||
# Unused ignores differs from version to version, so too many noizes
|
||||
warn_unused_ignores = False
|
||||
warn_return_any = True
|
||||
no_implicit_reexport = True
|
||||
strict_equality = True
|
||||
|
@ -289,7 +289,9 @@ close it.
|
||||
"Checking if cherry-pick PR #%s needs to be pinged",
|
||||
self.cherrypick_pr.number,
|
||||
)
|
||||
since_updated = datetime.now() - self.cherrypick_pr.updated_at
|
||||
# The `updated_at` is Optional[datetime]
|
||||
cherrypick_updated_at = self.cherrypick_pr.updated_at or datetime.now()
|
||||
since_updated = datetime.now() - cherrypick_updated_at
|
||||
since_updated_str = (
|
||||
f"{since_updated.days}d{since_updated.seconds // 3600}"
|
||||
f"h{since_updated.seconds // 60 % 60}m{since_updated.seconds % 60}s"
|
||||
@ -298,7 +300,7 @@ close it.
|
||||
logging.info(
|
||||
"The cherry-pick PR was updated at %s %s ago, "
|
||||
"waiting for the next running",
|
||||
self.cherrypick_pr.updated_at.isoformat(),
|
||||
cherrypick_updated_at.isoformat(),
|
||||
since_updated_str,
|
||||
)
|
||||
return
|
||||
|
@ -1,16 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
import logging
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Dict, List, Optional
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
import boto3 # type: ignore
|
||||
from github import Github
|
||||
from github.AuthenticatedUser import AuthenticatedUser
|
||||
from github.NamedUser import NamedUser
|
||||
|
||||
|
||||
@dataclass
|
||||
class Token:
|
||||
user: AuthenticatedUser
|
||||
user: Union[AuthenticatedUser, NamedUser]
|
||||
value: str
|
||||
rest: int
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user