core: ruff format
This commit is contained in:
parent
b452f0598e
commit
9780721347
6 changed files with 43 additions and 62 deletions
|
|
@ -726,17 +726,12 @@ class User(Base, BaseModel):
|
|||
|
||||
cutoff_date = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=older_then_days)
|
||||
|
||||
last_activity_long_ago_or_no_activity_since_creation = (
|
||||
(cls.last_activity < cutoff_date) | ((cls.last_activity == None) & (cls.created_on < cutoff_date))
|
||||
last_activity_long_ago_or_no_activity_since_creation = (cls.last_activity < cutoff_date) | (
|
||||
(cls.last_activity == null()) & (cls.created_on < cutoff_date)
|
||||
)
|
||||
exclude_system_users = ~cls.username.in_([
|
||||
cls.GHOST_USER, cls.AI_USER, cls.DEFAULT_USER
|
||||
])
|
||||
exclude_system_users = ~cls.username.in_([cls.GHOST_USER, cls.AI_USER, cls.DEFAULT_USER])
|
||||
|
||||
query = query.filter(
|
||||
exclude_system_users,
|
||||
last_activity_long_ago_or_no_activity_since_creation
|
||||
)
|
||||
query = query.filter(exclude_system_users, last_activity_long_ago_or_no_activity_since_creation)
|
||||
|
||||
return query.all()
|
||||
|
||||
|
|
@ -4505,10 +4500,8 @@ class _PullRequestBase(BaseModel):
|
|||
|
||||
ai_code_review_state = Column(
|
||||
"ai_code_review_state",
|
||||
MutationObj.as_mutable(
|
||||
JsonType(dialect_map=dict(mysql=UnicodeText(DEFAULT_JSON_OBJ_SIZE)))
|
||||
),
|
||||
default=dict
|
||||
MutationObj.as_mutable(JsonType(dialect_map=dict(mysql=UnicodeText(DEFAULT_JSON_OBJ_SIZE)))),
|
||||
default=dict,
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue