Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
errbot-karma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRC Team
Errbot Development
errbot-karma
Commits
11ebcc50
Verified
Commit
11ebcc50
authored
3 years ago
by
Bruce Cowan
Browse files
Options
Downloads
Patches
Plain Diff
Fixed type annotations
parent
1b9f5085
No related branches found
No related tags found
No related merge requests found
Pipeline
#3172
passed
3 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
karma.py
+4
-4
4 additions, 4 deletions
karma.py
with
4 additions
and
4 deletions
karma.py
+
4
−
4
View file @
11ebcc50
...
...
@@ -49,7 +49,7 @@ class Karma(errbot.BotPlugin):
return
self
.
_change_karma
(
match
.
group
(
1
),
-
1
)
@errbot.botcmd
def
karma
(
self
,
message
:
errbot
.
Message
,
args
:
str
|
None
)
->
str
:
def
karma
(
self
,
message
:
errbot
.
Message
,
args
:
str
)
->
str
:
"""
Gets karma
"""
if
not
args
:
return
"
**Usage**: !karma <target>
"
...
...
@@ -57,7 +57,7 @@ class Karma(errbot.BotPlugin):
return
f
"
Karma for
'
{
args
}
'
is
{
self
[
'
karma
'
][
args
]
}
"
@errbot.botcmd
def
karma_top
(
self
,
message
:
errbot
.
Message
,
args
:
str
|
None
)
->
str
:
def
karma_top
(
self
,
message
:
errbot
.
Message
,
args
:
str
)
->
str
:
"""
Gets the top n items
"""
if
len
(
self
[
"
karma
"
])
==
0
:
return
"
There are no items with karma
"
...
...
@@ -71,7 +71,7 @@ class Karma(errbot.BotPlugin):
return
"
,
"
.
join
([
f
"
{
k
}
:
{
v
}
"
for
k
,
v
in
top
])
@errbot.botcmd
def
karma_bottom
(
self
,
message
:
errbot
.
Message
,
args
:
str
|
None
)
->
str
:
def
karma_bottom
(
self
,
message
:
errbot
.
Message
,
args
:
str
)
->
str
:
"""
Gets the bottom n items
"""
if
len
(
self
[
"
karma
"
])
==
0
:
return
"
There are no items with karma
"
...
...
@@ -85,7 +85,7 @@ class Karma(errbot.BotPlugin):
return
"
,
"
.
join
([
f
"
{
k
}
:
{
v
}
"
for
k
,
v
in
bottom
])
@errbot.botcmd
def
karma_reset
(
self
,
message
:
errbot
.
Message
,
args
:
str
|
None
)
->
str
:
def
karma_reset
(
self
,
message
:
errbot
.
Message
,
args
:
str
)
->
str
:
args
=
args
.
strip
()
if
args
not
in
self
[
"
karma
"
]:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment