#dev-log
1 messages ยท Page 42 of 1
Build 20200229.6 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
This looks neat and, with the upcoming changes you're proposing to schedulers in #800, I think we should prioritize merging this, since it's going to block other advancements.
[python-discord/bot] New review comment on pull request #755: Don't suppress all errors in scheduler
This is a smart way of doing it and it handles the three cases I can think of nicely. I also like the logging approach we've got here and I think it's best we can do for now. We could look into signalling an exception back to the user directly, but, honestly, the people that matter get to see it anyway as long as we're using Sentry because if exceptions are raised within a task, they should either be handled or it's a bug waiting to be fixed.
I'm sure we as core-devs can contact the user i...
Build 20200229.7 succeeded
Requested by
GitHub
Duration
00:01:40
Build pipeline
Bot
95fd351 Scheduler: fix #754 - only suppress CancelledError - MarkKoz
f905f73 Scheduler: remove create_task function - MarkKoz
f5cd7e3 Scheduler: correct schedule_task's docstring - MarkKoz
0d05be3 Scheduler: remove loop parameter from schedule_... - MarkKoz
6b7c0a7 Scheduler: raise task exceptions besides Cancel... - MarkKoz
[python-discord/bot] branch deleted: bug/backend/b754/scheduler\-suppresses\-errors
Build 20200229.8 succeeded
Requested by
GitHub
Duration
00:03:18
Build pipeline
Bot
Connected!
Was fixed in #797 through requiring tag names to require a letter and will become irrelevant after #777 is resolved
Currently, it can be difficult to find the specific command for a tag even if you know it exists. A command to allow you to search through tag bodies would help with finding the right tags. For example doing !tag-search backtick would return !code-block (and any other tags that include the word backtick).
This is an intersting idea, and this is very feasible since we already fetch all tags into a dictionary of Dict[str, str] for tag['title'].lower(): tag - and so we can make a command to search on the contents of the tag instead of just purely the name of the tag ( incase we forgot the name! )
@F4zii @RohanJnr please address this in #803
Relevant Issues
Closes #360
Closes #359
Closes #358
Closes #357
Description
I added .apod , .nasa, .mars and .earth command. Note: Mars command have date limitations.
Reasoning
Due their issues got approved.
Screenshots


Besides the colours, the other notable difference is the omission of milliseconds from the timestamp. This is coloredlog's default behaviour. It can be changed, but...
Build 20200301.1 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Bot
Also made some fixes with variable names, comments and moved Total roles from footer to title. Closes #791
Build 20200301.2 failed
Requested by
GitHub
Duration
00:01:17
Build pipeline
Bot
Build 20200301.3 succeeded
Requested by
GitHub
Duration
00:01:40
Build pipeline
Bot
hell yeah. This is awesome.
Build 20200301.1 succeeded
Requested by
GitHub
Duration
00:02:05
Build pipeline
Site
Build 20200301.2 succeeded
Requested by
Leon Sandรธy
Duration
00:03:32
Build pipeline
Site
Let's wait with writing unittests until #783 is merged.
This should no longer be stalled. The PR mentioned by Mark has been merged, which means we don't suffer from that changed behavior of the CancelledError anymore.
I think we should get this merged.
Agreed. This doesn't need to be a separate pull request. In fact, this has already been addressed in the current version of #803, so I will just close this PR.
Wouldn't the AssertionError message for an assertEqual test already contain both values?
Bot doesn't check if the reddit have any post in it.
Such reddit can be /r/makemyideas
Bot fails silently
I found this on private testing
03/01/20 09:29:29 - bot.seasons.evergreen.error_handler ERROR: Unhandled command error: list index out of range
Traceback (most recent call last):
File "/home/ag/.local/share/virtualenvs/seasonalbot-0Ba-uPuk/lib/python3.8/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/a...
@Numerlor Are you working on it? When not, can I work with it?
[python-discord/bot] branch deleted: feat/frontend/b000/coloured\-logs
Build 20200301.4 succeeded
Requested by
GitHub
Duration
00:03:07
Build pipeline
Bot
Connected!
Approved on the basis that we are sure that we only need to check for pure white.
4b25725 Infractions: fix UniqueTogetherValidator incorr... - MarkKoz
6b99214 Add regression test for the UniqueTogetherValid... - MarkKoz
a0ea44f Add fixtures to create infractions in serialize... - MarkKoz
8d49389 Test that new infractions pass validation - MarkKoz
309acd3 Output errors more clearly for infraction seria... - MarkKoz
Build 20200301.3 succeeded
Requested by
GitHub
Duration
00:01:51
Build pipeline
Site
[python-discord/site] branch deleted: deleted\-messages\-visible\-line\-endings
Build 20200301.4 succeeded
Requested by
GitHub
Duration
00:03:25
Build pipeline
Site
What you describe is a common situation and using composition to do object delegation is imho the correct solution.
The issue is caused by a small oversight in how ModLog.upload_log handles empty attachment lists. Normally, attachments is a list of lists, with each sublist containing the attachments for that particular message
However, if the attachments kwarg isn't used (i.e., gets the default None value), we initialize attachments with an empty outer list. That results in us adding None from the default value of zip_longests in the request part instead of an empty list indicating that a me...
Build 20200301.5 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
While testing locally it appears that contextlib.suppress is not stopping CancelledError from being raised.
bot_1 | 2020-02-25 19:23:16,017 | asyncio | ERROR | Exception in callback _silent_exception(>) at /bot/bot/utils/scheduling.py:71
bot_1 | handle: <Handle _silent_exception(>) at /bot/bot/utils/scheduling.py:71>
bot_1 | Traceback (most recent call last):
bot_1 | File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
bot_1 | s...
Can start working on this, but may take longer as I'll be fresh to tests in general
8c2871f Make it easier for user to search for tags - ikuyarihS
4e87b4e Use trashcan emoji for message deletion - kosayoda
30ba84e Differentiate clear and delete emoji in help cog - kosayoda
56696b3 Remove dev-test limit for filtering debugging - kosayoda
af0e532 Revert "Remove dev-test limit for filtering deb... - kosayoda
[bot] Branch feat/frontend/o200/help\-channels was force-pushed to `dff31b2`
Build 20200301.6 succeeded
Requested by
GitHub
Duration
00:02:20
Build pipeline
Bot
This change optimizes the docker build by ensuring cached layer of installing dependencies, instead of installing dependencies every build.
Yeah, I put the except here in order to avoid uncaught exception, I think rescheduling them seems like the way to go.
I'm not sure about unremoveable messages you're talking about though. Are you talking about errors not caused by a discord downtime, but by an actual error that will not solve with time? If so, yeah, it could be an issue. We could also delete them anyway if the deletion failed more than 3 times for instance.
That's okay, there's no rush. Keep in mind that the pending PR to upgrade our bot to Python 3.8 (#783) will bring some changes to our test suite.
Build 20200301.7 succeeded
Requested by
GitHub
Duration
00:01:52
Build pipeline
Bot
Build 20200301.8 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
And what if the dependencies changed? I had to rebuild the image earlier today because new dependencies were added, maybe that's not the intended way, is it?
If the dependencies change, the pipfile/pipfile.lock file needs to change. When either of those files change, the cached layer will not be used and the layer will be built the same way it is today.
This has no benefits in CI because the agent is new for every build, thus does not have previous layers cached. Furthermore, contributors using Docker would only need to build this image if dependencies change (cause their source code on the host gets mounted inside the container), so this change doesn't benefit them.
Still, I don't see why not. Maybe it will save someone time somehow.
Yeah, I'm pretty sure CI won't leverage caching. GitLab can do that, but not sure about ADO.
Mostly it's beneficial for local development :)
Build 20200301.9 succeeded
Requested by
GitHub
Duration
00:01:59
Build pipeline
Bot
Build 20200301.10 succeeded
Requested by
GitHub
Duration
00:03:16
Build pipeline
Bot
Connected!
def _get_tag(self, tag_name: str) -> list:
Similarly, this is no longer required to be async
Since we are no longer doing any API call and simply reading from local files, the function get_tags() is no longer needed to be async and so you can do this
self.get_tags()
def get_tags(self) -> None:
founds = self._get_tag(tag_name)
Build 20200301.11 failed
Requested by
GitHub
Duration
00:01:08
Build pipeline
Bot
Build 20200301.12 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Bot
Build 20200301.13 succeeded
Requested by
GitHub
Duration
00:01:19
Build pipeline
Bot
db1f746 Add grabify (IP logger) domains to banned domains - jos-b
[python-discord/bot] New branch created: ban\-grabify\-urls
This bans Grabify URLs which are used to track IPs as a domain shortener.
Build 20200301.14 succeeded
Requested by
GitHub
Duration
00:01:50
Build pipeline
Bot
Build 20200301.15 succeeded
Requested by
GitHub
Duration
00:03:16
Build pipeline
Bot
Connected!
This was not resolved by #790, which only makes the AntiMalware filter ignore staff.
We want AntiSpam and Filtering to also ignore staff.
@ks129, would you mind opening a new pull request to address the remaining two cogs?
Build 20200301.16 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Build 20200301.1 succeeded
Requested by
GitHub
Duration
00:00:37
Build pipeline
Seasonal Bot
Looks good. :ok_hand:
The context switching black magic is particularly clever.
f"Argument(argname={self.argname!r}, lineno={self.lineno}, col_offset={self.col_offset}, " # noqa: E501
f"annotation_type={self.annotation_type}, has_type_annotation={self.has_type_annotation}, " # noqa: E501
f"has_3107_annotation={self.has_3107_annotation}, has_type_comment={self.has_type_comment})" # noqa: E501
PEP8 allows this, and I really like it. Maybe you don't, that's fine too.
Build 20200301.17 succeeded
Requested by
GitHub
Duration
00:01:22
Build pipeline
Bot
Relevant Issues
Closes #244
Description
Added a ConnectFour cog which includes a connectfour command (with several different aliases) to allow users to play a Connect Four game in a specific channel
Also includes an ai subcommand to allow a user to play against a "CPU" player
Reasoning
This was part of the retro gaming season we had. Better late than never!
Screenshots
 so you d...
10b63ed Strip references to seasonalbot chat - sco1
[python-discord/seasonalbot] New branch created: tidy\-seasonal\-channels
Redirect any output to seasonalbot commands, where relevant.
Build 20200301.3 succeeded
Requested by
GitHub
Duration
00:00:47
Build pipeline
Seasonal Bot
Hi @neonsea, any interest in updating the implementation here?
Closing for inactivity, feel free to reopen if you'd like to continue working on this
Thanks for getting to this so quickly! Just upgraded, and this issue appears to be fixed.
Thanks for fixing this so quickly! Confirming that this works for me.
Thanks for fixing this so quickly! Just checked on my projects and it's working as expected now.
Postgres backup completed!
I've had a look around the files as well and I think you've got them all.
Once this is merged, I'll remove the references from salt/pillar as well.
NASA uses the title "Astronomy Picture of the Day", although it leaves the t out of the initialism they use (apod) in the url.
Additionally, the "in" in "Astronomy Picture of the Day in [date here]" doesn't sound right to me, but I'm not a native speaker of English. I think we sidestep the issue by using a separator (e.g., -) here instead of a word. Still, we do have a few native speakers in the core dev team, so maybe you'll get another opinion on this soon.
...
As a general question, I noticed that we're only using the image urls we get back from the API; do the API responses also include image data? And, if so, do you have an idea about the size of these responses? Are we talking KBs? MB? Multiple MB per request?
Those first 50 pages, are they guaranteed to always exist?
item = random.choice(result["photos"])
Now it will never happen that we have 0 or 1 role. and adding a role/roles pluralization check will just mess up the unit test. but if it is ever needed you could do something like
f"{'s'*0 if True else 's'}"
Where True here is the result of a check for len(roles) being 1 or lower.
I think this PR is fine without this addition, this comment is just meant as a reference.
Do we ever need to save the default values after they have been overwritten? then dict-merging might not be the best option. ChainMap would fix this issue as long as you have an empty dict as the first dict in the chain.
I would love to see these fixed. I also need to test the code as the PR is too large for me to understand whats going on.
I do not find the offset, in this case, to be self-documented. Had to track down the get_games_list function to understand what it does. Maybe a clarification of why the offset is picked at random could be written as a comment?
I would love keyword arguments so that I would know that this was a random offset. Same as the other ones
It's not self-documented so I have to look up get_companies_list to see what it is. As the other comments for similar methods, I still do not know why the offset is generated randomly.
The comment refers to movies. should be changed to games.
Couple of minor issues, but overall this looks good to me. The only important thing to address before we merge, in my opinion, is rescheduling the failures.
This function name does not seem descriptive enough.
What if the message was manually deleted after the filter trigger? This is quite likely to happen a lot, and perhaps warning is not the right log level to use for this if we're going to be seeing it every time somone has deleted the message manually. I mean, as long as the message is gone, that's a good thing and no warning is necessary.
If we rescheduled these so that they would at least attempt to delete the message twice, then we could safely assume that if it fails twice, it's not due ...
No no. aroundfuckery is one word. Well, I mean, technically it isn't a word at all, but it makes zero sense as two words.
# Remove backslashes to prevent escape character aroundfuckery like
It's because it's an override/implementation of the abstract method defined in the Scheduler base class:
Oh, all right. Let's resolve this then.
Looks like you're right. It appears for AntiSpam, this is already solved, but on Filtering we have a config option with a role whitelist where not all staff members are on the whitelist.
I kind of feel like this is logic duplication, though. We probably be using the same whitelist for all three of these cogs, rather than solving the problem in three different ways. Perhaps we should refactor the approach taken in AntiMalware and AntiSpam to use the same role whitelist that Filtering does, ...
What if the message was manually deleted after the filter trigger? This is quite likely to happen a lot,
There's a special except NotFound clause with an info-level log message. This clause seems to be specifically for messages that the bot either could not fetch for other reasons that NotFound (whatever that may be, it could be a temporary API fluke at Discord's end) or where the deletion action fails (for whatever reason).
In that case, I suppose this is fine as a warning. I still think rescheduling is something we should probably do. At least once.
@lemonsaurus there is an except block just above for NotFound with an appropriate info message
cec9d77 Adding helpers to the Filtering whitelist - lemonsaurus
Either way, I've added the Helpers now to the Filtering whitelist which should resolve this issue, but I still think we should consider refactoring this so that we use the same approach for all three of these related cogs.
Build 20200302.1 succeeded
Requested by
Leon Sandรธy
Duration
00:03:21
Build pipeline
Bot
Connected!
Replace "fuckery" with something temporarily to help you understand:
Around something like [example]
Vs
Aroundsomething like [example]
I will implement functionality to check for invalid channels on startup and warn if there are any.
[python-discord/seasonalbot] Pull request opened: #367 Python Bot help command adding to SeasonalBot
Relevant Issues
Closes #295
Description
I copy-pasted help command from Python bot and made this working in SeasonalBot. Added loading to __main__.py, ignoring to SeasonalBot.load_extensions.
Reasoning
Due there is issue about it, what is approved.
Screenshots

Not going to add more screenshots. It's same help comm...
Build 20200302.1 succeeded
Requested by
GitHub
Duration
00:00:41
Build pipeline
Seasonal Bot
Do we ever need to save the default values after they have been overwritten?
No. The merged dictionary being created is one useful once since the session_kwargs as passed as an argument and may be different each call.
With recent changes to the scheduler, tasks no longer need to cancel themselves. In fact, it's bad for them to do so.
schedule_task no longer takes the loop as an argument. Go through the cog and remove the loop argument from all calls to this function.
Build 20200302.2 succeeded
Requested by
GitHub
Duration
00:00:45
Build pipeline
Seasonal Bot
Build 20200302.2 succeeded
Requested by
GitHub
Duration
00:01:31
Build pipeline
Bot
Build 20200302.3 succeeded
Requested by
GitHub
Duration
00:00:43
Build pipeline
Seasonal Bot
@SebastiaanZ First, .nasa command always have at least 50 pages (I think they might have thousands pages). And all responses is in KBs. Some commands is just slow due API latency or image size. Images is always URLs, never anything else.
New hooks were added for pre-commit and they will run in CI too. The pipenv run lint script will now run all the new hooks, including flake8.
Hooks added
A couple of these hooks automatically apply fixes. However, they still report failure and leave any changes they make uncommitted. Therefore, the user has to commit the automatic fixes.
check-merge-conflict- Check for files that contain merge conflict strings.check-toml- Attempts to load all toml files to verify sy...
Build 20200302.3 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Bot
[bot] Branch feat/deps/o138/pre\-commit\-hooks was force-pushed to `e6c4887`
Build 20200302.4 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
closes: #661
Adds silencer cog with requested capabilities.
- [x]
!hushrestricts Developers role in invoked or specified channel. - [x]
silence/unsilencealiases - [x] custom duration, including
forever - [x] ping mods periodically with channels that are hushed forever.
- [ ] list hushed channels
- [ ]
!shh/!unshhwith arbitrary amount ofhs after for specifying duration - [ ] tests
Does pinging mods and setting up the 15 minute alerts sound good when the bot restarts with active hushed channels?
Build 20200302.5 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Build 20200303.1 succeeded
Requested by
GitHub
Duration
00:02:01
Build pipeline
Bot
[python-discord/bot] New branch created: feat/ci/b000/cache\-pipenv
Testing caching of the site-packages directory to reduce frequency of using pipenv to install dependencies in CI.
Build 20200303.2 succeeded
Requested by
GitHub
Duration
00:01:50
Build pipeline
Bot
Build 20200303.3 succeeded
Requested by
GitHub
Duration
00:02:43
Build pipeline
Bot
Build 20200303.4 succeeded
Requested by
GitHub
Duration
00:01:50
Build pipeline
Bot
Build 20200303.5 failed
Requested by
GitHub
Duration
00:00:35
Build pipeline
Bot
Build 20200303.6 failed
Requested by
GitHub
Duration
00:00:35
Build pipeline
Bot
Build 20200303.7 succeeded
Requested by
GitHub
Duration
00:02:28
Build pipeline
Bot
By above I mean like this:
# The name of the ship and its size
SHIPS = {
Postgres backup completed!
I found the same amount of changes as this PR when I searched.
[python-discord/seasonalbot] branch deleted: tidy\-seasonal\-channels
Build 20200303.1 succeeded
Requested by
GitHub
Duration
00:01:52
Build pipeline
Seasonal Bot
Active Season: Evergreen
Commit history does not show that you copy-pasted and then made changes. it shows a made-changes version you copy-pasted in.
What is the change between this and the original?
fuckaroundery will do. even around-fuckery is okay, just please god not around fuckery. Anything but that.
# Because discord.py recreates the HTTPClient session, may as well follow suit and recreate
I think this looks like a good approach, but I too lack confidence in this problem domain to say for sure.
This is also an oldschool way of reading files. In the pathlib world, you can simply use the .read_text method on a Path object, no context manager needed.
Why are you using listdir when you've got pathlib.Path.iterdir()?
tag_files = Path("bot/resources/tags")
for file in tag_files.iterdir():
Don't use pathlib for half the problems and os.path for the other. You only need one of these.
If you want the title of the file without the extension for a Path, just use the .stem property of a Path object.
Please rewrite this to make full use of pathlib instead of leaning on the os module to solve most of the problems for you. we shouldn't need to import os at all for this file.
[python-discord/bot] New comment on pull request #811: Add more pre\-commit hooks and run them in CI
It's worth noting that moving flake8 out of the virtual environment also comes with a disadvantage for local development. While it's still going to be possible to run the linter from the command line using pre-commit, it will break editors that use flake8 to lint within the editor. There may be ways to deal with this, as I haven't looked into whether or not it's possible to configure editors in such a way that they're able to use pre-commit's flake8, but this will be a more complicated an...
[python-discord/bot] New comment on pull request #811: Add more pre\-commit hooks and run them in CI
I think what @SebastiaanZ is saying here is a dealbreaker for removing these dependencies from the pipfile.
I think it would be better to maintain duplicate dependencies in two files than to require a weird non-standard setup to get linting working on sublime or vscode. These are popular editors, and it should be frictionless to set up linting in our repos.
Build 20200303.8 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Build 20200303.9 succeeded
Requested by
GitHub
Duration
00:02:26
Build pipeline
Bot
Build 20200303.10 succeeded
Requested by
GitHub
Duration
00:01:16
Build pipeline
Bot
Build 20200303.11 succeeded
Requested by
GitHub
Duration
00:01:27
Build pipeline
Bot
Build 20200303.12 succeeded
Requested by
GitHub
Duration
00:01:40
Build pipeline
Bot
14b3c09 CI: prepend venv/bin to PATH - MarkKoz
edffd9b API: accept additional session kwargs for recre... - MarkKoz
b19e6aa Bot: avoid DeprecationWarning for aiohttp.Async... - MarkKoz
253073a Bot: add warning for when connector is a specif... - MarkKoz
9b6c9e8 Bot: fix error trying to close a None session - MarkKoz
a21f4e6 Bot: override login() instead of start() - MarkKoz
[python-discord/bot] branch deleted: bug/backend/b748/resolver\-in\-coro
Build 20200303.14 failed
Requested by
GitHub
Duration
00:00:42
Build pipeline
Bot
Build 20200303.13 succeeded
Requested by
GitHub
Duration
00:03:01
Build pipeline
Bot
Connected!
Build 20200303.15 succeeded
Requested by
GitHub
Duration
00:01:20
Build pipeline
Bot
[python-discord/bot] New comment on pull request #811: Add more pre\-commit hooks and run them in CI
OK. What do you all think of using this hack in CI?
printf '%s\n%s' '#!/bin/bash' '"${@:2}"' >> pipenv && chmod +x pipenv
It creates a mock pipenv run executable. It will ignore the first arg (i.e. ignore the run in pipenv run) and interpret the rest as if it was a command. It'll get prepended to PATH somewhere so that when pre-commit runs the flake8 hook, it will prefer it as the pipenv executable over the normal one.
Build 20200303.16 succeeded
Requested by
GitHub
Duration
00:02:47
Build pipeline
Bot
Build 20200303.17 succeeded
Requested by
GitHub
Duration
00:01:08
Build pipeline
Bot
- Add generic handling for multi-file uploads
- Add logging of user, their ID, and extension that triggered the filter
- Provide the full list of attachment filenames as a logging extra
- Provide feedback to the user on all blacklisted file types uploaded
Build 20200304.1 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
eddd515 Prevent exception if a watched user sends a DM ... - sco1
[python-discord/bot] New branch created: watchchannel\-dm
The previous embed assumed that the messages would be sent on the server, where the channel would have a name and the message would have a jump URL.
For a DM, neither of these are present and an exception will be raised when attempting to construct the embed for the webhook to send.
Build 20200304.2 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Build 20200304.3 succeeded
Requested by
GitHub
Duration
00:01:30
Build pipeline
Bot
await LinePaginator.paginate(role_list, ctx, embed, empty=False)
Setting the empty kwarg to False will remove the newline in between every role.
Before:

After:

I'll add this in with #811 since we're already making other linting changes.
Running against the branch in its current state yields the following errors:
$ flake8 .
.\bot\utils\__init__.py:57:40: N803 argument name 'F' should be lowercase
.\tests\base.py:34:10: N802 function name 'assertNotLogs' should be lowercase
.\tests\base.py:84:10: N802 function name 'assertHasPermissionsCheck' should be lowercase
.\tests\bot\cogs\test_snekbox.py:92:56: N803 argument name 'mock_Signal...
[bot] Branch feat/deps/o138/pre\-commit\-hooks was force-pushed to `93f29f8`
Build 20200304.4 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Bot
Build 20200304.5 succeeded
Requested by
GitHub
Duration
00:01:15
Build pipeline
Bot
Build 20200304.6 succeeded
Requested by
GitHub
Duration
00:01:27
Build pipeline
Bot
Build 20200304.8 failed
Requested by
GitHub
Duration
00:00:29
Build pipeline
Bot
[python-discord/bot] New comment on pull request #811: Add more pre\-commit hooks and run them in CI
Per #775 I've also added pep8-naming to the linting toolchain and updated the codebase to fix the handful of new linting issues.
Build 20200304.7 succeeded
Requested by
GitHub
Duration
00:01:45
Build pipeline
Bot
Build 20200304.9 failed
Requested by
GitHub
Duration
00:01:49
Build pipeline
Bot
Build 20200304.10 failed
Requested by
GitHub
Duration
00:00:53
Build pipeline
Bot
Build 20200304.11 failed
Requested by
GitHub
Duration
00:01:02
Build pipeline
Bot
Build 20200304.12 failed
Requested by
GitHub
Duration
00:00:38
Build pipeline
Bot
Build 20200304.13 failed
Requested by
GitHub
Duration
00:00:41
Build pipeline
Bot
Build 20200304.14 failed
Requested by
GitHub
Duration
00:00:37
Build pipeline
Bot
You can further shorten this by doing
's' * (number_of_roles > 1)
since 's' * 0 is ''
Build 20200304.15 failed
Requested by
GitHub
Duration
00:02:07
Build pipeline
Bot
Build 20200304.16 failed
Requested by
GitHub
Duration
00:02:10
Build pipeline
Bot
Build 20200304.17 succeeded
Requested by
GitHub
Duration
00:02:30
Build pipeline
Bot
Build 20200304.18 failed
Requested by
GitHub
Duration
00:00:59
Build pipeline
Bot
games = await self.get_games_list(amount, self.genres[genre], offset=random.randint(0, 150))
Since we only do _get_genres() once, if this fails we have to reload the entire cog everytime, so I suggest turning self.genres into a property instead like so
@property
def gernes(self):
...
This way, we can also add another command to refresh genres whenever we want to.
Or, you can create a discord.ext.tasks that loop every x amount that will fetch the genres, and of course, a command to refresh self.genres.
since genres is a dictionary, you can loop over it's .items() to avoid having to do genres[genre] every time, something like
for genre_name, genre in genres.items():
....
self.genres[alias] = genre
Build 20200304.19 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
Build 20200304.20 succeeded
Requested by
GitHub
Duration
00:01:23
Build pipeline
Bot
Not sure if saving 24 seconds is worth it since the cache restoration performance seems unstable. Can be 8s, 10s, 16s, 18s, or even bug out and be over a minute.
Postgres backup completed!
Since we only allow invoking commands in a TextChannel, player2 is guaranteed to be a discord.Member
player2: typing.Optional[discord.Member] = None
Since this is a temporary cache to see which channels are playing, you can make this more clear and better via the usage of set
self._playing_channels: typing.Set[discord.TextChannel] = set()
self.player2 = player2 or AI(game=self)
To make it a bit more clear, this is a minor suggestion.
Looks good and this works well with local linting set-ups.
This PR does make me realize that I badly need to update the tests README.
[python-discord/bot] branch deleted: watchchannel\-dm
Build 20200304.21 succeeded
Requested by
GitHub
Duration
00:03:23
Build pipeline
Bot
Connected!
c12b8e8 Use raw strings for docstrings with forward sla... - SebastiaanZ
[python-discord/bot] New branch created: extensions\-cog\-docstring\-deprecation\-warning
edffd9b API: accept additional session kwargs for recre... - MarkKoz
b19e6aa Bot: avoid DeprecationWarning for aiohttp.Async... - MarkKoz
253073a Bot: add warning for when connector is a specif... - MarkKoz
9b6c9e8 Bot: fix error trying to close a None session - MarkKoz
a21f4e6 Bot: override login() instead of start() - MarkKoz
A few docstrings in bot.cogs.extensions use forward slashed to escape Markdown rendering when the docstrings are used in our bot's help feature. However, forward slashes are also interpreted as escape sequences in Python and since these ones are not valid, they will now raise a DeprecationWarning:
/home/sebastiaan/pydis/repositories/bot/bot/cogs/extensions.py:72: DeprecationWarning: invalid escape sequence \*
[PEP 257 -- Docstring Conventions](https://www.python.org/dev/...
Build 20200304.22 succeeded
Requested by
GitHub
Duration
00:01:59
Build pipeline
Bot
Build 20200304.23 succeeded
Requested by
GitHub
Duration
00:01:45
Build pipeline
Bot
Build 20200304.1 succeeded
Requested by
GitHub
Duration
00:00:50
Build pipeline
Seasonal Bot
Build 20200304.24 succeeded
Requested by
GitHub
Duration
00:03:41
Build pipeline
Bot
Connected!
[python-discord/bot] New comment on pull request #811: Add more pre\-commit hooks and run them in CI
@MarkKoz I like it. It's hacky and clever and I don't mind at all because you've documented it well and it only happens in the CI. Excellent work.
Consider adding a cog_unload() so you can cancel the task as well.
Right now difflib.get_close_matches() is having inconsistent results, for example it cannot find hack and slash in hack-and-slashes so maybe you need a different way to suggest it?


Right now there are way too many blank lines between games, consider using the keyword empty

Thanks @sco1 for finding out about that!
Also right now it is impossible to find genres with spaces between them, consider using Greedy or parse the arguments manually instead

Build 20200304.25 succeeded
Requested by
GitHub
Duration
00:02:06
Build pipeline
Bot
[python-discord/bot] branch deleted: extensions\-cog\-docstring\-deprecation\-warning
Build 20200304.26 succeeded
Requested by
GitHub
Duration
00:03:28
Build pipeline
Bot
Connected!
Build 20200304.2 succeeded
Requested by
GitHub
Duration
00:01:27
Build pipeline
Seasonal Bot
@ikuyarihS I don't added auto recalling fetch for games when 1 item in possibilities, due this have conflict with cutoff.
The problem lies in the f.read() - it can be a giant string greater than 2048, in theory, yes you can paginate it, and so liberate the limitation of length for each tag.
Overall works fine, and is ready to be merged.
This is a minor issue, can be ignored and addressed later - right now there is no space between each results, so either move the rating up to the name or add a space in between.

WIth cutoff=0.4 the results seems a bit wild, so maybe increasing this back?

Build 20200304.29 succeeded
Requested by
GitHub
Duration
00:02:40
Build pipeline
Bot
Build 20200304.3 succeeded
Requested by
GitHub
Duration
00:00:38
Build pipeline
Seasonal Bot
A couple minor additional points in addition to @kwzrd's broader comments.
For the longer string concatenation, you can use the main bot's information cog as an example how to mix multiline fstrings and, if necessary, template strings into something that's much easier to follow.
There's a lot of mixing of double and single quotes here as well. The prevailing code styl...
Build 20200304.4 succeeded
Requested by
GitHub
Duration
00:00:47
Build pipeline
Seasonal Bot
b30bcb9 Added .games command with all it's subcommands,... - ks129
829d32c Added .games command with all it's subcommands,... - ks129
6c2acbd Merge remote-tracking branch 'origin/games-comm... - ks129
21ea3e0 Remove keys() from total_rating count (Games Cog) - ks129
bd5a4d0 Added .games command with all it's subcommands,... - ks129
Build 20200304.5 succeeded
Requested by
GitHub
Duration
00:01:48
Build pipeline
Seasonal Bot
Active Season: Evergreen
Build 20200304.30 succeeded
Requested by
GitHub
Duration
00:02:08
Build pipeline
Bot
Build 20200304.31 succeeded
Requested by
GitHub
Duration
00:03:56
Build pipeline
Bot
Connected!
Build 20200304.32 failed
Requested by
GitHub
Duration
00:01:15
Build pipeline
Bot
Build 20200304.33 failed
Requested by
GitHub
Duration
00:01:10
Build pipeline
Bot
Hey @RohanJnr, recently more pre-commit hooks were added. I'm not sure if you don't have the pre-commit hook installed or if it just failed to update and include the new hooks for you. CI is failing because the new hooks remove trailing whitespaces and ensure final newlines in files. Some of the tag markdown files you added have those issues. If you run pipenv run lint and commit the changes, it should fix all those issues.
The new hooks have been merged & the tag files updated for the new linting. Please be sure to pull down the changes before making more commits, and ensure that your linting environment has been updated appropriately.
Build 20200304.34 succeeded
Requested by
GitHub
Duration
00:01:54
Build pipeline
Bot
[python-discord/seasonalbot] New branch created: feat/deps/355/pep8\-naming
Relevant Issues
Resolves #355
python-discord/organisation#138
Description
New hooks were added for pre-commit and they will run in CI too. The pipenv run lint script will now run all the new hooks, including flake8.
Hooks added
A couple of these hooks automatically apply fixes. However, they still report failure and leave any changes they make uncommitted. Therefore, the user has to commit the automatic fixes.
check-merge-conflict- Check for files that c...
Build 20200305.1 succeeded
Requested by
GitHub
Duration
00:02:11
Build pipeline
Seasonal Bot
This repo already has pep8-naming.
[seasonalbot] Branch feat/deps/355/pep8\-naming was force-pushed to `31483f9`
Build 20200305.2 succeeded
Requested by
GitHub
Duration
00:01:28
Build pipeline
Seasonal Bot
[seasonalbot] Branch feat/deps/355/pep8\-naming was force-pushed to `b785d46`
Build 20200305.3 succeeded
Requested by
GitHub
Duration
00:01:15
Build pipeline
Seasonal Bot
[python-discord/site] New branch created: feat/deps/o138/pre\-commit\-hooks
Relevant Issues
python-discord/organisation#138
Description
New hooks were added for pre-commit and they will run in CI too. The pipenv run lint script will now run all the new hooks, including flake8. As a side effect of running in CI, flake8's output will now be shown in stdout in addition to the XML that's published.
Hooks added
A couple of these hooks automatically apply fixes. However, they still report failure and leave any changes they make uncommitted. The...
Description
Right now when searching for a genre, the genre has to be 100% similar to the genre listed, otherwise it will be regarded as not correct. The code responsible for getting the searched genre and suggesting genres can be seen here:
https://github.com/python-discord/seasonalbot/blob/ce8fb0f8f541ade993d6c93bdcefa33a63287311/bot/seasons/evergreen/game.py#L194-L199
Some example of not being able to find the genre can be seen here:
- All the genres:
.
Build 20200305.1 succeeded
Requested by
GitHub
Duration
00:01:49
Build pipeline
Bot
Build 20200305.2 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
This seems fragile as it means these values have to synchronized across two files each time a change is made. I don't think changes are likely to happen, but it would be better to avoid such duplication altogether. The first one should be accessible directly from the bot.cogs.moderation.utils namespace; the second one is slightly more complicated.
A partial review for now, but I'm not sure when I'm able to finish it, so I decided to submit it for now. I'll continue later.
This test currently depends on the working of two separate units of code: the coroutines notify_infraction and send_private_embed. In fact, you currently assert whether or not notify_infraction works by looking at something that send_private_embed produces. That means that we're not testing those units independently from each other and, if the test fails, we don't know which unit caused it to fail.
While it obviously happens that one unit uses another unit in its execution, I think...
Since we patch the get method and set its return value manually, there currently is no test for if we're actually supplying the arguments correctly. I think we could add an assert_awaited_once_with here, since
querying the API correctly is quite essential (and we only want to do it once per run of this coroutine). It does require the mock to be reset for each iteration, otherwise the...
I am facing a little issue. The OffensiveMessage model of the site database doesnโt allow PATCH requests, and the PR adding it was merged. I think we have two options:
Option 1
Open a new PR to allow PATCH requests and a new deletion attempts field.
Option 2
When the deletion needs to be retried, delete the current object from the database and create a new one. To check if we should still retry later, we could check if the message was posted DELETION_TIME * 2 ago.
...
Abstract
Syncing the channels, roles, emojis and webhooks from the production server to a personal development server is quite a tedious task. This cog can be used to do this task for us.
Specification
The cog will be based around snapshots, which will be json serialized objects containing all the guild metadata, such as categories, channels ordering, emojis, channels topic..., along with their production IDs. At each bot restart, a new snapshot will be created and pushed to the s...
70e5c11 Add one second padding to format_infraction_wit... - Akarys42
[python-discord/bot] New branch created: format\-infraction\-with\-duration\-one\-sec
It caused the message to be rounded one second down, for example 59 minutes and 59 seconds instead of 1 hour, because of the way humanize_delta works. This PR simply add a one second padding in order to make the infraction message proper.
Build 20200305.3 failed
Requested by
GitHub
Duration
00:01:42
Build pipeline
Bot
245c570 Add padding to the delta, not the returned value - Akarys42
This won't work if it is not just a second, sometimes it can be up to 5 seconds later, and so adding a simple second will not fix the issue.
It is better to check the actual time and try to round it to round it up if the seconds is close enough to 60.
Build 20200305.4 failed
Requested by
GitHub
Duration
00:01:43
Build pipeline
Bot
Closing this PR as the fix will take more work than that.
[python-discord/bot] branch deleted: format\-infraction\-with\-duration\-one\-sec
Build 20200305.5 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
It's now been adjusted to use converters as suggested.
This section has been tidied a little and now raises a BadArgument for the global error handler to deal with.
After the adjustment to use converters, this no longer raises a ValueError, as it just falls back to being taken as a string.
Build 20200305.6 succeeded
Requested by
GitHub
Duration
00:01:44
Build pipeline
Bot
Shouldn't we use a threshold below which we say "Sorry, I couldn't find anything matching you query."? The current mechanism always returns something, even if the string you specify has nothing to do with any of the lines in the zen of Python.
It does lead to interesting responses.

I actually agree with you, and I pondered over it for a while. A particularly nice one is:

In the end, it's become obvious that we need to implement a decent difflib based partial matching solution that's used as a utility across the entire project(s), and honestly I don't find it absolutely essential for it to be implemented in this PR to get it merged and dealt with for later e...
That's fair. We're now using fuzzy matching in a lot of different places.
ded89e8 !roles Command: Added pagination (LinePaginator... - ks129
fc2224f !roles Command Test: Applied !roles command cha... - ks129
e5566eb Merge branch 'master' into roles-command-pagina... - sco1
25369cb (Information Cog, !roles command): Added empty ... - ks129
5579f2d (Information Cog, !roles command test): Applied... - ks129
ded89e8 !roles Command: Added pagination (LinePaginator... - ks129
fc2224f !roles Command Test: Applied !roles command cha... - ks129
e5566eb Merge branch 'master' into roles-command-pagina... - sco1
25369cb (Information Cog, !roles command): Added empty ... - ks129
5579f2d (Information Cog, !roles command test): Applied... - ks129
Build 20200305.9 succeeded
Requested by
GitHub
Duration
00:01:53
Build pipeline
Bot
Build 20200305.8 succeeded
Requested by
GitHub
Duration
00:03:27
Build pipeline
Bot
Connected!
Build 20200305.10 succeeded
Requested by
GitHub
Duration
00:03:35
Build pipeline
Bot
Connected!
af2a59f CI: name the use Python version task - MarkKoz
[python-discord/seasonalbot] New branch created: feat/deps/355/pep8\-naming
Relevant Issues
#368
Description
The name is needed to be able to retrieve its output variable, pythonLocation. It's used by the pre-commit cache and the pipenv mock steps. I forgot to include it in the original PR.
Did you:
- [x] Join the Python Discord Community?
- [ ] If dependencies have been added or updated, run
pipenv lock? - [x] Lint your code (
pipenv run lint)? - [x] Set the PR to **allow edits from contribut...
[seasonalbot] Branch feat/deps/355/pep8\-naming was force-pushed to `326e5d4`
Build 20200305.6 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Seasonal Bot
Build 20200305.7 succeeded
Requested by
GitHub
Duration
00:02:24
Build pipeline
Seasonal Bot
Active Season: Evergreen
[python-discord/bot] New branch created: feat/ci/pre\-commit\-tweaks
As discussed internally, showing the diff after pre-commit isn't very useful - it's just clutter. I also removed the pre-commit excludes since they are redundant.
Build 20200305.11 succeeded
Requested by
GitHub
Duration
00:02:10
Build pipeline
Bot
Build 20200305.12 failed
Requested by
GitHub
Duration
00:03:14
Build pipeline
Bot
Build 20200305.13 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
As stated in the issues this PR covers, these should all be implemented as subcommands of a single command, rather than as individual commands.
As also stated in the issues this PR covers, there should be some more customization available for the commands to make queries more interesting.
For example:
- The NASA Image API supports quite a few search options, including a free text search, keyword search, description search, and year start/end constraints
- The Earth API endpoint s...
2bb0fa0 Test conditional azure script - sco1
[python-discord/flake8-annotations] New branch created: azure\-playground
[python-discord/flake8-annotations] branch deleted: azure\-playground
Postgres backup completed!
Build 20200306.1 succeeded
Requested by
GitHub
Duration
00:03:36
Build pipeline
Bot
Connected!
Looks good. There's one diff I don't quite get, the last line of CONTRIBUTING.MD, but that's just because I don't see a difference; I'm probably overlooking something and there's nothing wrong with the changed version.
the last line of CONTRIBUTING.MD
It's removed an empty line from the end of file.
the last line of CONTRIBUTING.MD
It's removed an empty line from the end of file.
That's what I suspected; the GitHub diff just isn't showing that. It shows that difference for other removed lines at the end of files, but for this one it shows up as if the line the diff is referencing has been removed and inserted unchanged.
This:

vs:
![2020-03-06_12-...
Yep. I had to download the raw files to confirm it just in case; github wasn't showing the correct diff for it as you said.
Accidentally hit a button and destroyed all the things here for a moment, sorry about that!
Build 20200306.2 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Changelog
[v2.1.0]
Added
- #68 Add
--suppress-dummy-argsconfiguration option to suppress ANN000 level errors for dummy arguments, defined as"_"
Additional Details
This release adds the opinionated --suppress-dummy-args flag, as requested by #68. If this flag is set, TYP000-level errors are suppressed for "dummy" arguments, defined as _.
For example:
def foo(a: int, _) -> None:
"""This is a test function."""
...
Would not yield an ...
c840863 Reword inline comment on dummy arg skipping for... - sco1
You don't want to cache the pre-commit cache in CI?
Pretty sure succeeded() is not implicit when specifying custom conditions.
condition: eq(succeeded(), variables['python.version'], '3.8')
03e0c9d Add the actual pre-commit caching step that was... - sco1
Dropped this in with the cache change
I guess that would probably be helpful, oops :)
The UsePythonVersion task needs to be given a name with name: PythonVersion so that this output variable can be referenced.
93f5166 Add name to Python Version task so it can be re... - sco1
76a9a03 Added BigBrother Helper Methods - LordHemlock
[python-discord/bot] New branch created: hemlock\-perma\-ban\-watch\-removal
Previously we had the bot set up so that when a user was permanently banned. This originally worked just fine, but the issue was that there was no embed being sent telling us about this. However, after the big rewrite, that automated functionality was lost in the process. This PR is intended to restore it.
The discussed solution was to move most of the current unwatch command's functionality into a helper method and allow for a flag to be set when it's sent from a permanent ban. Th...
Build 20200306.3 succeeded
Requested by
GitHub
Duration
00:01:57
Build pipeline
Bot
Postgres backup completed!
@Numerlor
How are you planning to detect that there are active hushed channels on restart? It does sound like a good solution to just setup the mod ping cycle, though, yes.
I don't think we need to take channel as an arg for any of these commands. This command should only be invoked in the channel we are currently in.
I'm not sure what you're asking about regarding keeping remaining durations. are you suggesting some sort of storage for these things? I was hoping to keep this command as si...
I'll close this now, due I started working in new branch, where I added better information. New PR after close.
Relevant Issues
Closes #295
Description
I copy-pasted file from Python bot + made changes (can be seen in commit history)
Reasoning
Due there is issue what is approved
Screenshots
Check #367 for images
Did you:
- [x] Join the Python Discord Community?
- [x] If dependencies have been added or updated, run
pipenv lock? - [x] Lint your code (
pipenv run lint)? - [x] Set the PR to **allow edits from cont...
Build 20200307.1 succeeded
Requested by
GitHub
Duration
00:00:47
Build pipeline
Seasonal Bot
6ccf0be Calculate seconds as n_hours * seconds_in_hour - kwzrd
fe74128 Add icon cycle frequency constant - kwzrd
9330b40 Cycle icons within season in configured interva... - kwzrd
b30bcb9 Added .games command with all it's subcommands,... - ks129
829d32c Added .games command with all it's subcommands,... - ks129
Build 20200307.2 succeeded
Requested by
GitHub
Duration
00:01:00
Build pipeline
Seasonal Bot
@Numerlor
How are you planning to detect that there are active hushed channels on restart? It does sound like a good solution to just setup the mod ping cycle, though, yes.
I don't think we need to take channel as an arg for any of these commands. This command should only be invoked in the channel we are currently in.
I'm not sure what you're asking about regarding keeping remaining durations. are you suggesting some sort of storage for these things? I was hoping to kee...
Build 20200307.3 succeeded
Requested by
GitHub
Duration
00:00:49
Build pipeline
Seasonal Bot
Build 20200307.4 succeeded
Requested by
GitHub
Duration
00:00:59
Build pipeline
Seasonal Bot
@sco1 Should be now done. I added some new query customisation where is possible.
personally I think both listing commands and optional channel selection are probably overkill, but maybe someone else can give their opinion too.
I also am not sure how you plan to differentiate between staff channels and hushed channels, since just developers not having speaking permissions is not a very unusual configuration.
Ah right, I kinda mixed up some permission things in my mind. Could be done by checking read permissions (if the public channels are set up in a way that makes it easy or are then removed) but it indeed looks a bit overkill there with the list with the above logic being required behind it
some channels even have read but not write permissions by default, like announcements and devlog. and I don't wanna be adding lots of exceptions to some list.
The only way I can think of for a restarted bot to discover hushed channels would be if we somehow marked these channels
Avoid importing so many things. Just import utils and qualify the names you need with it e.g. utils.RULES_URL.
It's unnecessary to use a real-world value for the mock. It can return the minimum amount of data needed for the test to pass.
The arguments are always going to be the same so they could be hard-coded once rather than being repeated in every test case.
The docstrings for the tests do not describe the tests.
return correct value
create correct result
work correctly
The act of testing already implies that we're testing for correct behaviour. Writing "correct x" doesn't actually define what "correct" means in that context. If correct means returning True if x and False if y, then try to be more specific and mention that instead. Of course, it doesn't have to be ultra specific (e.g. describing the expected value of eve...
There were plans (not sure if there's an issue open) to re-work the config system. It'd be able to follow some pre-defined schema and automatically create the channels, categories, and roles needed in a guild. The config system needs a rework anyway and the approach I mentioned makes more sense than syncing things to the site because it's a simpler implementation.
e7dde8f ModLog: fix posting null attachments for delete... - MarkKoz
[python-discord/bot] New branch created: bug/mod/792/null\-attachments
If attachments are not given to upload_log, an empty list is used. By default, zip_longest uses None ass the fill value, so each message was getting paired with a None (AKA null) attachment. The filed in the DB is non-nullable so an empty list must be used instead.
Fixes #792
Note that the clean command still won't send attachments. This PR just fixes the error so at least the clean command can post messages to the API.
Build 20200308.1 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Build 20200308.1 succeeded
Requested by
GitHub
Duration
00:01:20
Build pipeline
Seasonal Bot
[python-discord/bot] New branch created: tag\-search\-searches\-tags\-via\-content\-instead\-of\-names
2e81f05 Implemented search as a subcommand for tag ... - ikuyarihS
Closes #804
This PR introduces two new subcommands to !tag that will allow searching for tags via contents instead of names:
!tag searchwill search for multiple keywords, separated by comma, and return tags that has ALL of these keywords.!tag search anyis the same as!tag searchbut it return tags that has ANY of the keyword instead.
Examples:

Build 20200308.2 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
if result:
await ctx.send(embed=result)
if not result:
await ctx.send(embed=result)
Callable[[Iterable], bool] would be a more accurate annotation.
Nice, thank you, I've never used Callable from typing before!
76fccc1 Refactored tag searching via keywords in contents - ikuyarihS
Build 20200308.3 succeeded
Requested by
GitHub
Duration
00:01:52
Build pipeline
Bot
This title is a bit misleading. It may be interpreted as a list of search terms being suggested, rather than a list of search results (tag names). It should be clear what is being listed are tag names results for the search.
Or another way to look at it is that it may suggest that the command is meant to search the names of tags rather than their contents.
Hmm, that is a good catch, it does sound like the following terms are what you are looking for.
How does Are you perhaps looking for the following tags? sound?
Or maybe a simple Are you looking for these tags??
The following tags have {keywords} in their description, perhaps you are looking for one of these? sounds pretty descriptive, but it might be too long, what do you think?
That sounds OK. What do you think of Here are the tags containing the given keyword(s):?
Yep, that definitely sounds better and shorter, thank you!
Are you looking for these tags? was fine too. I don't think the actual keywords should be included as it may make the title too long.
89f86f8 Fixed searching for , returing all tags. Made... - ikuyarihS
Build 20200308.4 succeeded
Requested by
GitHub
Duration
00:02:06
Build pipeline
Bot
Postgres backup completed!
Is like for one should I use random avatar_hash, but for second 0, same for discriminator and name?
How I should do all these other checks? It's confusing for me.
Build 20200308.5 succeeded
Requested by
GitHub
Duration
00:01:50
Build pipeline
Bot
Mostly high quality code, but I have a few objections before I can approve.
if founds feels semantically weird. Maybe this variable can be renamed so that this line sounds more semantically correct. I would've used something like matching_tags or matches.
This whole block is incredibly dense. I have a number of objections to it and think you should simplify and refactor the entire block.
- Why are you using type annotations here? It's perfectly obvious that the first line is a tuple from the
tuple()call, and that the last line is a list from the fact that it's wrapped in square brackets. Please only use inline type annotations in cases where they add clarity, such as surprising types and cases in which the reader would otherwise have a h...
wait, can you explain the or any(kw.count(' ') for kw in keywords_processed) part of this for me?
Also, this line is dense, too, and while I don't mind the type annotation here as much, I think the excellent variable name makes it intuitively clear that this is a boolean.
Thank you for very detailed reviews!
It does hit me now that you say "If you can't fit your list comprehension on a single line, this is usually a sign that you should consider refactoring." - it is a very good point, and I will definitely refactor it as well as the other dense part of the code.
Since I am allowing searching with multiple keywords, separated by comma at the same time, simply counting for ' ' will not work, for example if use search for code,block - there will be no space at all in the keywords
After thinking about this more, it is definitely over kill with my original intention to check if any separated query has any space in it, so the line can be reduced to
is_plural = len(keywords_processed) > 1 or keywords.strip().count(' ')
Since it was a simple search and return I decided to name it founds - which indeed hide away what it is unintentionally, when in reality it is a simple list of tag.
I really like your suggestion of matching_tags!
Build 20200308.6 succeeded
Requested by
GitHub
Duration
00:01:57
Build pipeline
Bot
With these changes, I've got no objections. Looks good, nice work!
It should be indicated somewhere in the embed that results are being truncated.
I think this should be 0, not 1. Otherwise, something like "word1 word2" will be singular and only at "word1 word2 word3" will it become plural.
is_plural = len(keywords_processed) > 1 or keywords.strip().count(' ') > 0
Oh you are right, originally I wanted it to be just
is_plural = len(keywords_processed) > 1 or keywords.strip().count(' ')
Thank you for the catch!
139a714 Fixed is_plural counting 1 less space. - ikuyarihS
Build 20200308.7 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
696327a Deseasonify: allow get_extensions to find cog... - kwzrd
dfb9f65 Deseasonify: implement SeasonBase for new sea... - kwzrd
9961a0b Deseasonify: remove Evergreen season - kwzrd
34dd2e2 Deseasonify: adjust inheriting seasons in accor... - kwzrd
eb8ebdb Deseasonify: lock daily tasks to their seasons'... - kwzrd
Build 20200308.2 succeeded
Requested by
GitHub
Duration
00:00:58
Build pipeline
Seasonal Bot
By dynamic do you mean allowing users to pick the size of their grid (using a command arg)? I could do that
Yes, and we can have a min max threshold for it, that will allow shorter / longer games.
So in this scenario would it be better to not create the constant outside since the number will be dynamic?
Hmm, in this case we should not create a constant, and instead create it inside - there is no benefit of creating a constant outside anymore in this case.
33a6aac Fix filtered extension string out of scope for ... - sco1
[python-discord/bot] New branch created: antimalware\-fix
A bug was introduced by #814 where the event listener for the antimalware cog would raise an exception for *.py files because the log message attempts to call the string representation of the blocked extensions, which is only in scope if something other than a *.py file is found. This fixes that.
Build 20200308.8 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
With bot and snekbox now being bumped to 3.8, we should also look into bumping Seasonalbot.
This is a fairly self-explanatory issue.
As explained in https://github.com/python-discord/bot/issues/758, one of the motivations for upgrading were the improvements to unittesting asynchronous code. We do not have a testing suite for Seasonalbot, which means that we won't benefit from those improvements here, but it also means that we can more or less expect everything to work out-of-the-box...
[python-discord/snekbox] New branch created: sentry\-integration
Integrates Sentry with Snekbox.
Adds the FalconIntegration as well to handle Internal Server errors.
Note: This could not be tested locally because Docker & Pipenv on MacOS are hyper-broken for me.
Build 20200308.1 failed
Requested by
GitHub
Duration
00:00:34
Build pipeline
Snekbox
You didn't lock pipenv:
Your Pipfile.lock (69cca1) is out of date. Expected: (829e3b).
This looks incorrect, but haven't tested. Either way it's a good idea to pin it a bit more loosely.
sentry-sdk = {extras = ["falcon"], version = "~= 0.14.2"}
Build 20200308.2 failed
Requested by
GitHub
Duration
00:00:33
Build pipeline
Snekbox
pipenv is broken.
the world is crumbling.
Will someone else need to lock and push it?
I'm locking it now, I fixed pipenv by deleting all my .DS_Store files since pipenv cannot handle it.
[python-discord/seasonalbot] New branch created: python38
This PR essentially replicated the efforts of https://github.com/python-discord/bot/pull/783.
Bumps Python to 3.8 in Pipfile & lock, Azure and Docker.
Bumps the Ubuntu image in CI to 18.04.
So far it appears that Seasonalbot is fully compatible with 3.8 (tested on 3.8.2) as is, without any required adjustments. I will test some more tomorrow before taking this out of draft status.
Closes #372
c87d41d Relock pipfile.lock with new dependancy. - scragly
Build 20200308.3 succeeded
Requested by
GitHub
Duration
00:01:23
Build pipeline
Seasonal Bot
Build 20200308.3 succeeded
Requested by
GitHub
Duration
00:01:43
Build pipeline
Snekbox
8cf851b Refactor token detection to check all potential... - sco1
[python-discord/bot] New branch created: token\-detection\-fix
[python-discord/snekbox] branch deleted: sentry\-integration
Occasionally it's been noticed that the bot token filter has been missing seemingly valid tokens without any obvious reason. Upon closer inspection of some recent messages, it appears that the bug has been identified.
The current filter implementation utilizes re.search, which matches only the first location of our token pattern, which is essentially ... However, certain chained method calls can potentially also match this pattern and generally appear before the token in the bot code, ...
Build 20200308.4 succeeded
Requested by
GitHub
Duration
00:02:19
Build pipeline
Snekbox
The venv image doesn't actually create a venv anymore; dependencies are installed into the system's site. However, because the image uses pipenv run snekbox, a virtual environment is still created:
snekbox | Creating a virtualenv for this projectโฆ
snekbox | Pipfile: /snekbox/Pipfile
snekbox | Using /usr/local/bin/python (3.8.0) to create virtualenvโฆ
snekbox | created virtual environment in 303ms CPython3Posix(dest=/root/.local/share/virtualenvs/snekbox--1TroHYA, clear...
Build 20200308.9 succeeded
Requested by
GitHub
Duration
00:01:34
Build pipeline
Bot
You'll probably want to wait for #803 to be merged first.
Description
The text in the .snakes about command has the wrong prefix for the commands you should try. It uses ! as a prefix instead of .
Steps to Reproduce
- Do
.snakes about - Read the embed and notice the bot's command has a prefix with
!not.
Expected Behaviour
It talks about the bot then says
The bot says
Make sure you check out
.snakes sal,.snakes drawand.snakes hatchto see what they came up with.
in the embed
Actual Behaviou...
Improper Lines: https://github.com/python-discord/seasonalbot/blob/master/bot/seasons/evergreen/snakes/snakes_cog.py#L953-L954
Just change them to:
"walked away as grand champions. Make sure you check out
.snakes sal,.snakes draw"
"and.snakes hatchto see what they came up with."
You are right, the truncating was copied over from !tags where if multiple results are found, they are already sorted by matching scores, which is not the case for this.
I've added paginator for it just like in !tags
8bf5ce5 Refactored to use paginator like normal !tag - ikuyarihS
Build 20200309.1 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Right now there is a rare chance that it can be a tag instead, can we move it up to check for commands, specially if invoker is a mod+?
@ikuyarihS, I think it's enough to check if the Command was invoked with arguments since if that's a single tag, no following arguments will be provided
Using a paginator slipped my mind! Yes, that is a better solution than adding a truncation message somewhere. Creating a separate function to send the results was a good idea. I like that you changed the footer to explain how to show a tag - I think that's more useful than showing the keywords used.
2e81f05 Implemented search as a subcommand for tag ... - ikuyarihS
76fccc1 Refactored tag searching via keywords in contents - ikuyarihS
89f86f8 Fixed searching for , returing all tags. Made... - ikuyarihS
dd70718 Refactored dense codes, removed obvious type hint. - ikuyarihS
139a714 Fixed is_plural counting 1 less space. - ikuyarihS
[python-discord/bot] branch deleted: tag\-search\-searches\-tags\-via\-content\-instead\-of\-names
Connected!
Build 20200309.2 succeeded
Requested by
GitHub
Duration
00:03:26
Build pipeline
Bot
Not testing it before approving was a foolish mistake I made the first time. This time, I have tested and confirmed it functions.
2e81f05 Implemented search as a subcommand for tag ... - ikuyarihS
76fccc1 Refactored tag searching via keywords in contents - ikuyarihS
89f86f8 Fixed searching for , returing all tags. Made... - ikuyarihS
dd70718 Refactored dense codes, removed obvious type hint. - ikuyarihS
139a714 Fixed is_plural counting 1 less space. - ikuyarihS
Postgres backup completed!
Build 20200309.3 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Build 20200309.4 succeeded
Requested by
GitHub
Duration
00:03:30
Build pipeline
Bot
Connected!
[python-discord/bot] New branch created: vote
Description
The vote command takes a given list of options and generates a simple message and corresponding reactions for each so members can quickly take a vote on a subject during in-server discussions and meetings.
The title and options require double quotes to be used for multiple-word entries. It would be impossible to distinguish where titles and options start and stop otherwise without adding some custom separator and parsing, which is just unnecessary for such a simple comman...
Build 20200309.5 succeeded
Requested by
GitHub
Duration
00:01:31
Build pipeline
Bot
Build 20200309.6 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Bot
The prevailing style for breaking up arguments is to put each one on a new line. However, defining the params dict separately will look cleaner.
params = {
"active": "true",
"type": "ban",
"user__id": str(self.member.id)
}
self.bot.api_client.get.assert_awaited_once_with("bot/infractions", params=params)
These embeds really only differ by the icon. Change the test cases so that only the icon is provided. The test can directly create the rest of the embed within the subtest.
You could use the ID from get_return_value to get this value in the test, so including it here feels redundant. If you make the aforementioned ID some uncommon number like 83492, then you could forego having the ** and # too i.e. it'll be safe to just search for the number directly.
Ultimately I'm not sure if this turned out better than what existed before. I'll let the other reviewer(s) have the final say and I'm just gonna accept this as it is.
The code has been changed but I'll leave this unresolved for other reviewers to perhaps discuss.
Yes that is what I meant. It seems to have been implemented correctly.
For the third point, consider that when the loop repeats, post() gets called. It is undesirable for that to be repeated, therefore I phrased it as the loop being exited. But really, think about it as "assert that post() doesn't happen again". Such an assertion can be made by looking at the call_count attribute of the mock.
When a post() is successful, the test should ensure that no error message is sent and no user is posted. If the aforementioned assertions are made, then it effec...
I think it's worth defining 127462 as a variable or some constant so it's clearer what it is. While it's not super esoteric, it isn't immediately obvious either what's going on here.
Is it worth using asyncio.gather()? Maybe not given the rate limits.
Character limit isn't a concern since embeds have 6k limit and a user can only send like 2k in a message, right?
Also worth checking when there are 0 options. It won't explode or anything but it's probably a user error if there are 0 options.
Not at all because in the end it's still limited by the lib and we're not doing anything afterwards such as waiting for reaction adds from users.
But I like it like this! It's super clean! haha. Fine, I'll assign a variable.
Good point, didn't think of that.
Build 20200309.7 succeeded
Requested by
GitHub
Duration
00:02:06
Build pipeline
Bot
I've instead checked if less than 2 options have been provided, as there's no point on voting for a single item.
Connected!
Build 20200309.8 succeeded
Requested by
GitHub
Duration
00:03:20
Build pipeline
Bot
2e81f05 Implemented search as a subcommand for tag ... - ikuyarihS
76fccc1 Refactored tag searching via keywords in contents - ikuyarihS
89f86f8 Fixed searching for , returing all tags. Made... - ikuyarihS
dd70718 Refactored dense codes, removed obvious type hint. - ikuyarihS
139a714 Fixed is_plural counting 1 less space. - ikuyarihS
Build 20200309.9 succeeded
Requested by
GitHub
Duration
00:01:43
Build pipeline
Bot
[python-discord/bot] branch deleted: token\-detection\-fix
2e81f05 Implemented search as a subcommand for tag ... - ikuyarihS
76fccc1 Refactored tag searching via keywords in contents - ikuyarihS
89f86f8 Fixed searching for , returing all tags. Made... - ikuyarihS
dd70718 Refactored dense codes, removed obvious type hint. - ikuyarihS
139a714 Fixed is_plural counting 1 less space. - ikuyarihS
Build 20200309.10 succeeded
Requested by
GitHub
Duration
00:04:16
Build pipeline
Bot
Build 20200309.11 succeeded
Requested by
GitHub
Duration
00:01:49
Build pipeline
Bot
Build 20200309.12 succeeded
Requested by
GitHub
Duration
00:03:16
Build pipeline
Bot
Connected!
@jodth07 For the 4th point, > provide independence day date for specified country , do you expect DD/MM/YYYY or just DD/MM. Because there would have to be a second dictionary if it was by year, I believe. (The first dictionary to only hold all independence days in DD/MM format.)
A mix of the two sounds better to me. Make the API support PATCHing the delete_date (this is a very simple change to make with DRF). Make the client (i.e. the bot) compare the message's timestamp (keep in mind this can be calculated directly from the snowflake if needed) to determine if a deletion should be re-scheduled. A field for a deletion attempts just doesn't feel right to me.
@mathsman5133 any updates on the status of this?
Since there's only one command now, a command group is no longer necessary. Be mindful of existing aliases in alias.py when you go to remove the group.
This is redundant. iterdir() already yields Path objects.
Looks like this could be a static method.
I think you went really overboard on comments when you were moving this cog over from the main bot; there is such a thing as too many comments.
For example, we don't really need comments like these, where the benavior is immediately obvious without the comment:
# show name if query is a cog
if isinstance(self.query, Cog):
paginator.add_line(f'**{self.query.name}**')
Things like this are also unnecessary:
# Original: def unload(bot: Bot) -> None:
def unloa...
The constant from the bot is a Discord provided emoji, how about adding it to Seasonalbot's constants rather than removing it completely?
This line of the docstring doesn't agree with the dates below.
Along with some more specific comments, there's a similar comment to be made here that was made in #371, many of the comments here aren't necessary.
The mission manifest provides a max_date value, how about we cache this, say, at most once per day for each rover rather than having to constantly adjust the docstring of the command as more photos are made available (since Curiosity is still an ongoing mission)?
This embed generation code is essentially identical across every subcommand. How about a helper method to build an Embed from the provided parameters (title, description, image, footer)?
There are two approaches to this:
- Discover all cog definitions in all modules and check their commands. This is more complex, but it means no cogs ever get instantiated. Modules do get imported so any code defined at the module level would still be executed (usually minor things like defining constants, importing, reading files, etc.)
- Let the bot be created and load all extensions. The check commands via
bot.commands. This is very simple and more accurate because commands are not ...
[python-discord/bot] New branch created: feat/test/765/command\-shadowing\-simple
60814ee Cog tests: create boilerplate for command name ... - MarkKoz
d31f7e3 Cog tests: add a function to get all commands - MarkKoz
1c91283 Cog tests: add a function to get all extensions - MarkKoz
95df66d Cog tests: add a function to get all cogs - MarkKoz
33b00fa Cog tests: add a function to get all qualified ... - MarkKoz
[python-discord/bot] New branch created: feat/test/765/command\-shadowing
After some discussion in #dev-contrib I'll be removing the channel params.
Without adding any persistence to the channels or changing their structure
to be able to discover hushed at runtime, we can do an alert with hushed
channels on cog unload.
Only sure thing without persisting it externally is potential loss of a
permissions state for send messages, for an unhush it can only be either
set to allowed or the inherited without knowing what it was on previously,
if that's a concern.
Do we c...
If pipenv supported installing to the user site (or any separate site, really) instead of the global site, then it'd probably be feasible to cache the user site.
Build 20200310.1 failed
Requested by
GitHub
Duration
00:00:00
Build pipeline
Bot
Build 20200310.2 failed
Requested by
GitHub
Duration
00:00:46
Build pipeline
Bot
Build 20200310.3 failed
Requested by
GitHub
Duration
00:00:37
Build pipeline
Bot
Build 20200310.4 failed
Requested by
GitHub
Duration
00:01:21
Build pipeline
Bot
Build 20200310.5 failed
Requested by
GitHub
Duration
00:00:57
Build pipeline
Bot
Build 20200310.6 failed
Requested by
GitHub
Duration
00:01:27
Build pipeline
Bot
Build 20200310.7 succeeded
Requested by
GitHub
Duration
00:02:52
Build pipeline
Bot
Build 20200310.8 failed
Requested by
GitHub
Duration
00:01:01
Build pipeline
Bot
Build 20200310.9 failed
Requested by
GitHub
Duration
00:01:02
Build pipeline
Bot
Build 20200310.10 succeeded
Requested by
GitHub
Duration
00:02:13
Build pipeline
Bot
Build 20200310.11 succeeded
Requested by
GitHub
Duration
00:02:46
Build pipeline
Bot
Build 20200310.12 succeeded
Requested by
GitHub
Duration
00:01:22
Build pipeline
Bot
Build 20200310.13 failed
Requested by
GitHub
Duration
00:01:28
Build pipeline
Bot
Postgres backup completed!
Build 20200310.14 succeeded
Requested by
GitHub
Duration
00:02:28
Build pipeline
Bot
removing channel args sounds good.
Throwing a warning on cog unload for active hushed channels is a bit of an edge case but nice to have. most of the time the docker containers shutdown probably will not be graceful enough to allow that to trigger (I might be wrong about this), and so it will only work for !cog unload, which is rarely used.
beyond that I don't see the need for any of the extras you mention. it doesn't matter that staff channels are hushable - it might actually be nice for t...
On it. I'll get suggestions applied shortly.
Build 20200310.15 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
@atmishra The site-side changes seem to be done, but we still need the bot-side changes to be made. Are you still interested in tackling this part? If so, when do you think you'll be able to open a pull request for it?
I don't want to merge the site-side changes until the bot changes are ready, since that might require us to write another migration for site for any changes made to the whitelists in the space between now and then. It would be better to merge both of these at the same time.
This is basically ready for merge, but like jchrist pointed out, we should wait to merge it until the bot-side changes are ready, so that we don't have write another migration.
So, this is blocked until we've done the bot-side stuff.
The issue for the bot changes can be found in https://github.com/python-discord/bot/issues/639
@scragly any idea when you'll be able to address the reviews here?
Tonight maybe. I only just got the local copy going again today.
excellent. thanks for the quick reply.
Yep, this all looks good. I guess I don't fully understand the newline at end fixer, I thought it would ensure newlines at the end of any kind of file but it seems this is not the case. Can anyone shed some light on this?
Anyway, it looks good enough to merge, and I'm sure the fixer is doing what it should be doing.
Is this a result of running the end-of-file-fixer?
If so, I don't really understand why this file doesn't get a newline at the end of the file. I thought every kind of file was supposed to have one but maybe there's more to it?
Another special rule for css files?
I guess there must be files then that should not have newlines to the end of the file.
Looks fine, I do not really understand the azure-pipelines configuration well enough to comment anything other than what it looks like.
let's upgrade bleach since dependabot could not do it for us.
But we might have some dependencies that require this version of bleach.
Pipfile.lock
"bleach": {
"hashes": [...],
"version": "==2.1.4"
changes that are needed.
bleach = ">=3.1.1"
I'm unaware of how to fix dependabot, that might also be a solution to this issue.
Here are the messages that dependabot gives us.
, the help will be outdated again. At runtime, the prefix is available as a constant here, so this could be made dynamic. This way, when ...
e7dde8f ModLog: fix posting null attachments for delete... - MarkKoz
2e81f05 Implemented search as a subcommand for tag ... - ikuyarihS
76fccc1 Refactored tag searching via keywords in contents - ikuyarihS
89f86f8 Fixed searching for , returing all tags. Made... - ikuyarihS
dd70718 Refactored dense codes, removed obvious type hint. - ikuyarihS
Build 20200310.16 succeeded
Requested by
GitHub
Duration
00:01:49
Build pipeline
Bot
Build 20200310.18 succeeded
Requested by
GitHub
Duration
00:01:47
Build pipeline
Bot
This was an extra newline at the end of the file. It had two final newlines. Now it has one. Some things, like GitHub, git, and neovim, aren't showing the final newline as a separate line, while others, like PyCharm, are.
[python-discord/site] branch deleted: feat/deps/o138/pre\-commit\-hooks
Build 20200310.1 succeeded
Requested by
GitHub
Duration
00:04:36
Build pipeline
Site
I can't get the suggestions to work for category names and it seems difficult to get it to suggest a cog. Only command names seem to consistently suggest anything. Maybe the fuzzy search just needs some tweaking.
- Looks like the
remove_reactionbelongs inside theexceptblock. If moved inside,returnandpasscould be removed and thus make the code easier to understand. - Keep in mind
remove_reactionmay also raise anHTTPException, and that is especially more likely if attempting to delete the message raised an exception. - It shouldn't ignore all
HTTPExceptions. It could ignoreNotFound, the rest should get logged.
Avoids repetition
signature = f" {c.signature}" if c.signature else ""
details += f"\n**`{PREFIX}{c.qualified_name}{signature}`**\n*{c.short_doc or 'No details provided'}*"
Build 20200310.1 succeeded
Requested by
GitHub
Duration
00:00:53
Build pipeline
Seasonal Bot
Some constants were renamed recently.
@redirect_output(destination_channel=Channels.bot_commands, bypass_roles=STAFF_ROLES)
@sco1 Addressed changes. But, this first example:
# show name if query is a cog
if isinstance(self.query, Cog):
paginator.add_line(f'**{self.query.name}**')
this is NOT made by my. This was already there before (and still is) (in Python bot).
c80f5db HelpChannels: remove permission overwrites comp... - MarkKoz
[bot] Branch feat/frontend/o200/help\-channels was force-pushed to `8c1432c`
All seasons load fine, works under Docker too.
Can't really think of anything else to test, so I'm opening this for review.
Build 20200310.19 failed
Requested by
GitHub
Duration
00:00:59
Build pipeline
Bot
Build 20200310.20 succeeded
Requested by
GitHub
Duration
00:01:48
Build pipeline
Bot
@SebastiaanZ I requested your review specifically because you handled the migration for bot, so there may still be some things fresh in memory that had to be adjusted, but I'm fairly sure they're more or less irrelevant for Seasonalbot.
@SebastiaanZ I requested your review specifically because you handled the migration for
bot, so there may still be some things fresh in memory that had to be adjusted, but I'm fairly sure they're more or less irrelevant for Seasonalbot.
I can look at it tomorrow. I don't think there's anything particularly interesting that applies to Seasonal Bot, except maybe the handling of those asyncio exceptions.
Ok, it still doesn't need to be there, and since we have an opportunity here to remove what isn't necessary then let's do that.
@SebastiaanZ That's perfectly fine, there's no need to rush it.
Postgres backup completed!
I don't need this to be solved with ast parsing, it was just an idea.
I like approach 1. The benefit of approach 2 seems to be irrelevant for us, and I'm not 100% comfortable with tests actually loading cogs.
Build 20200311.1 succeeded
Requested by
GitHub
Duration
00:00:59
Build pipeline
Seasonal Bot
Looks fine but I also think that @SebastiaanZ should look over it and do the merge.
c392ff6 CI: rename UsePythonVersion task - MarkKoz
Build 20200311.1 succeeded
Requested by
GitHub
Duration
00:01:09
Build pipeline
Bot
Build 20200311.2 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
I'm in favor of just sending it and seeing how it ends up working out in the long run. It kinda sucks that Azure is so inconsistent on restoring from cache but if it ends up being a net win then why not.
We'll likely have to evaluate any potential issues with partial cache hits as they happen in order to determine whether or not it represents a recurring issue. Just something to be vigilant for in our diagnosis of any potential failures.
cb951a9 implement !zen command. - kingdom5500
abee8a8 apply kosa's requested changes. - kingdom5500
2728473 Merge remote-tracking branch 'origin/master' in... - MarkKoz
edffd9b API: accept additional session kwargs for recre... - MarkKoz
b19e6aa Bot: avoid DeprecationWarning for aiohttp.Async... - MarkKoz
Build 20200311.3 succeeded
Requested by
GitHub
Duration
00:01:44
Build pipeline
Bot
Build 20200311.4 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Build 20200311.5 succeeded
Requested by
GitHub
Duration
00:01:23
Build pipeline
Bot
This pattern is used for expanding a message that may contain a spoilered word, like what gdude mentioned in the issue. For actually getting rid of pipes in watchlist triggers, etc. I'm just using discord.utils.escape_markdown
Build 20200312.1 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Postgres backup completed!
if you do
!zen explicit
it returns
**The Zen of Python (line 10):**
Unless explicitly silenced.
while I do believe that the intent was to have it return line two
**The Zen of Python (line 1):**
Explicit is better than implicit.
I think the issue could be solved by simply checking if the exact query word is inside one of the zen lines (explicit in that case) and returning it, if it is not found, try the fuzzy matching.
Which is what it is doing:
https://github.com/python-discord/bot/blob/190ff0fd2422459674320fa0e096921e38872f2d/bot/cogs/utils.py#L234
Even if we check for word in string, explicit will still be found in two lines and not one, so perhaps we need a better way to handle this case

