mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-21 13:48:19 +00:00
🐛 修复配队推荐未拥有旅行者
This commit is contained in:
parent
345edb9fe5
commit
be8bca8011
27
.git-blame-ignore-revs
Normal file
27
.git-blame-ignore-revs
Normal file
@ -0,0 +1,27 @@
|
||||
# This file contains a list of commits with
|
||||
# mass changes for exclusion by `git blame`.
|
||||
#
|
||||
# Passing `--ignore-revs-file .git-blame-ignore-revs` as a flag will
|
||||
# tell git to "ignore changes made by the revision when assigning
|
||||
# blame, as if the change never happened".
|
||||
#
|
||||
# For example:
|
||||
# git blame --ignore-revs-file .git-blame-ignore-revs ...
|
||||
#
|
||||
# For extra hot sauce, ignore white space changes too:
|
||||
# git blame -w --ignore-revs-file .git-blame-ignore-revs ...
|
||||
#
|
||||
# You can make this a default for your repo using:
|
||||
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
#
|
||||
# Also, if you use the GitLens extension for Visual Studio Code, you
|
||||
# can add "-w" as a value to "gitlens.advanced.blame.customArguments".
|
||||
#
|
||||
# Note that `git blame` does not use any file by default, and
|
||||
# the filename `.git-blame-ignore-revs` is just a convention.
|
||||
|
||||
345edb9fe55fb91f9f2b2dbd93c9fedbb9f371c2
|
||||
# Author: Chuangbo Li <im@chuangbo.li>
|
||||
# Date: Mon Oct 10 19:07:28 2022 +0800
|
||||
#
|
||||
# 🎨 使用 black 格式化所有代码
|
@ -10,10 +10,6 @@ class Member(BaseModel):
|
||||
attr: str
|
||||
name: str
|
||||
|
||||
@validator("name")
|
||||
def name_validator(cls, v): # pylint: disable=R0201
|
||||
return "空" if v == "旅行者" else v
|
||||
|
||||
|
||||
class TeamRate(BaseModel):
|
||||
rate: float
|
||||
|
@ -64,11 +64,12 @@ class AbyssTeam(Plugin, BasePlugin):
|
||||
|
||||
for lane in ["up", "down"]:
|
||||
for member in getattr(i, lane).formation:
|
||||
name = member.name
|
||||
temp = {
|
||||
"icon": (await self.assets_service.avatar(roleToId(member.name)).icon()).as_uri(),
|
||||
"name": member.name.replace("空", "旅行者"),
|
||||
"icon": (await self.assets_service.avatar(roleToId(name.replace("旅行者", "空"))).icon()).as_uri(),
|
||||
"name": name,
|
||||
"star": member.star,
|
||||
"hava": (member.name in user_data) if user_data else True,
|
||||
"hava": (name in user_data) if user_data else True,
|
||||
}
|
||||
team[lane].append(temp)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user