aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-01-22Use the SVG badge on the READMEGravatar Matteo Bertucci-1/+1
2021-01-22Update badges on the README fileGravatar Matteo Bertucci-4/+3
2021-01-21Fix aliases of shadow tempbanGravatar Joe Banks-1/+1
2021-01-21Added slowmode tracking to dpy and ot0Gravatar Boris Muratov-2/+12
2021-01-21Use inspect.unwrap instead of manually unwrappingGravatar Numerlor-3/+1
2021-01-21Changed slowmode reset testsGravatar mbaruh-12/+4
2021-01-21Added slowmode stat for python-general.Gravatar mbaruh-4/+8
2021-01-21Slowmode reset now uses slowmode setGravatar mbaruh-10/+1
2021-01-20Prevent bot from sending DMs to itselfGravatar Joe Banks-0/+4
Fixes BOT-KX
2021-01-19Remove additional embed messageGravatar Boris Muratov-9/+1
2021-01-19Replace in_whitelist check with commands.has_any_role checkGravatar ks129-2/+1
in_whitelist allow normal users also run commands in bot commands, but branding commands should be mod+ only, so we need to use has_any_role instead from discord.py.
2021-01-18Sync: test chunking of user requestsGravatar MarkKoz-11/+18
2021-01-18Sync: chunk user requestsGravatar MarkKoz-2/+8
The site can't handle huge syncs. Even a bulk patch of 10k users will crash the service. Chunk the requests into groups of 1000 users and await them sequentially. Testing showed that concurrent requests are not scalable and would also crash the service.
2021-01-18Update config-default.ymlGravatar Boris Muratov-0/+4
Whitelisted mod_meta and mod_tools as mod channels
2021-01-17Stop Tag Matching On SuggestionGravatar Hassan Abouelela-6/+1
2021-01-17Checks If Similar Command Is NoneGravatar Hassan Abouelela-0/+3
2021-01-17Adds Return On Tag MatchesGravatar Hassan Abouelela-4/+9
2021-01-17Update to use Member.pending instead of bot.http.get_memberGravatar Joe Banks-3/+1
2021-01-16Removed 'Channels' import, unused.Gravatar xithrius-1/+1
2021-01-16Relock PipfileGravatar Karlis S-17/+7
2021-01-16Add startup and daemon tasks canceling on cog unloadGravatar ks129-0/+6
2021-01-16Remove unwatch reason from the !nominate outputGravatar Matteo Bertucci-2/+1
As the watch reason can contain private information, we shouldn't share it with the whole staff.
2021-01-15Use a defaultdict for item futuresGravatar Numerlor-2/+2
To be able to set the attribute at the start of the coro we need to be able to access the item's future before we know about all the other items. This also saves us from having to add them all as the queue parser or get_markdown will create the futures for us dynamically
2021-01-14Prevent an inventory refresh while waiting for item cacheGravatar Numerlor-0/+7
If an inventory refresh was started while the symbol embed coroutine was suspended, it could cause the parser to try to fetch a non existent future if the markdown was requested after it was cleared but before new inventories were loaded in.
2021-01-14Raise an error or log a warning if there's a global name conflictGravatar Numerlor-5/+35
When wrapper uses a global name, which conflicts with a global name from wrapped's module that wrapped uses for its annotations, we run into a situation that can't be solved without changing one of the names, so an error is raised to give this clearer meaning. The check may be erroneous in some edge cases or the objects the conflicting names refer to can be functionally identical, so the error can be turned into a logged warning.
2021-01-14Ensure footer is actually max 100 charsGravatar Numerlor-2/+3
Shortening the renamed symbols string to 100 chars is not accurate as the footer also contains a string before that, subtracting its length fixes this.
2021-01-14Set the user_requested attribute at the start of the coroutineGravatar Numerlor-1/+1
A context switch may occur when we're waiting for the web page response, during which a clear could be triggered. If the event is not set before that we could end up with the dictionary changing sizes, or if a copy was made, a future that'd never finish as it'd be cleared from the queue and the futures dict
2021-01-14Reuse the redis key instead of creating a new string for the expires setGravatar Numerlor-2/+2
2021-01-14Change typehint name casing to PascalCaseGravatar Numerlor-8/+9
2021-01-14Keep trakck of the init task and cancel it when the cog is unloadedGravatar Numerlor-1/+2
2021-01-14Simplify control flowGravatar Numerlor-3/+2
Co-authored-by: MarkKoz <[email protected]>
2021-01-14Use different task ids for every inventory reschedule attemptsGravatar Numerlor-6/+6
The scheduler can't keep track of multiple tasks with the same id, and rescheduling the update task using the same id within an already scheduled update task caused the new task to get ignored as the old task only got deleted from the scheduler after it was finished
2021-01-14Correct return type annotationGravatar Numerlor-1/+1
2021-01-14Turn update_single into a normal functionGravatar Numerlor-3/+3
The method no longer runs anything asynchronous
2021-01-11Update discord.py to the 1.6 releaseGravatar MarkKoz-17/+27
2021-01-11Fix docstringGravatar Numerlor-1/+1
The decorator works in revers to what the docstring explained
2021-01-11Return whitespace to its previous stateGravatar Numerlor-1/+1
2021-01-11Make REFRESH_EVENT an instance variableGravatar Numerlor-6/+6
2021-01-11Remove old reference to CachedParser and unused constGravatar Numerlor-4/+1
2021-01-11Check for containment instead of always getting the value from the dictGravatar Numerlor-2/+3
Getting the value from a defaultdict will always create the key for it, creating unnecessary entries every time a symbol is fetched from the bot
2021-01-11Notify the user that inventories were refreshed on cache clearsGravatar Numerlor-1/+1
2021-01-11Don't convert package names into lowercaseGravatar Numerlor-1/+1
The converter used to set them already ensures this for us, making the call redundant
2021-01-11Ensure footer fits into messageGravatar Numerlor-3/+8
The footer also now says Moved: at the start to clarify the meaning of the symbols to the user
2021-01-11Use a dictionary of lists instead of set for renamed symbolsGravatar Numerlor-8/+7
A dictionary allows us to grab the original symbol name and then get all the renamed symbols from it, with the improvements to `ensure_unique_symbol_name` we can also use lists instead of sets as each symbol we add should be unique
2021-01-11Handle renaming conflicting symbols in ensure_unique_symbol_nameGravatar Numerlor-15/+14
Previously update_single looped this function until there were no duplicates and when creating new symbols the function had to check if the symbol to create a new name from started with a group/package to avoid redundancy. The new approach ensures a new symbol is always unique when returning by handling the containment check inside and outputting a symbol name in the format of package.group.symbol which should always be unique
2021-01-11Update outdated docstringGravatar Numerlor-1/+1
2021-01-11Send a message to devlog instead of logging a warningGravatar Numerlor-1/+30
2021-01-11Annihilate all traces of Developer and Unverified rolesGravatar mbaruh-720/+14
2021-01-10Resolve wrapped command callbacks in the source commandGravatar Numerlor-1/+4
Without this the command will fetch the source of the wrapper
2021-01-10Create decorator for update_wrapper_globals mimicking functools.wrapsGravatar Numerlor-9/+30