Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mattermost-matchmaker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
Open Source
mattermost-matchmaker
Commits
021af9e3
Commit
021af9e3
authored
Mar 8, 2022
by
Tamas Kiss
Browse files
Options
Downloads
Patches
Plain Diff
fixup: small typing related changes
parent
c0c86a88
Branches
own-vm
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mattermost_matchmaker/matchmaking.py
+4
-5
4 additions, 5 deletions
mattermost_matchmaker/matchmaking.py
mattermost_matchmaker/run.py
+1
-1
1 addition, 1 deletion
mattermost_matchmaker/run.py
mypy.ini
+8
-0
8 additions, 0 deletions
mypy.ini
with
13 additions
and
6 deletions
mattermost_matchmaker/matchmaking.py
+
4
−
5
View file @
021af9e3
import
copy
import
random
from
typing
import
Generator
,
Iterable
,
Tuple
,
List
import
mattermost
from
typing
import
Generator
,
Iterable
,
Tuple
,
Optional
,
List
import
mattermost
# type: ignore
#pylint: disable=invalid-name
...
...
@@ -11,7 +10,7 @@ def random_nonrepeating_tuples(population: Iterable, n: int) -> Generator[tuple,
Generates a random sequence of n-tuples, using every element in population only once
"""
population_copy
=
copy
.
copy
(
population
)
population_copy
=
list
(
population
)
random
.
shuffle
(
population_copy
)
buffer
=
list
()
...
...
@@ -52,7 +51,7 @@ def matching_in_channel(client: mattermost.MMApi, channel_id: str,
client
.
create_post
(
channel_id
=
channel_id
,
message
=
left_out_message
.
format
(
user
=
user_data
))
def
create_group
(
client
:
mattermost
.
MMApi
,
ids
:
Iterable
[
str
])
->
None
:
def
create_group
(
client
:
mattermost
.
MMApi
,
ids
:
Iterable
[
str
])
->
str
:
"""
Creating a group-message for the group
"""
...
...
This diff is collapsed.
Click to expand it.
mattermost_matchmaker/run.py
+
1
−
1
View file @
021af9e3
#!/usr/bin/env python3
import
argparse
import
mattermost
import
mattermost
# type: ignore
from
mattermost_matchmaker.matchmaking
import
matching_in_channel
#pylint: disable=too-many-arguments
...
...
This diff is collapsed.
Click to expand it.
mypy.ini
0 → 100644
+
8
−
0
View file @
021af9e3
[mypy]
[mypy-mattermost.*]
ignore_missing_imports
=
True
[mypy-pylint.*]
ignore_missing_imports
=
True
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