#dev-contrib

1 messages ยท Page 144 of 1

vale ibex
#

rather than waiting to commit

gritty wind
#

On phone but

#

It seems like a few of those liens are going over the line limit

fallen patrol
#

Heads up don't merge bot#1872 until I review ๐Ÿ˜‚
King Arthur had three pull requests for isort stuff

green oriole
gritty wind
#

Neat

green oriole
#

Bear in mind we use a 120 chars limit on the bot

gritty wind
#

Does anything handle unused imports

fallen patrol
gritty wind
#

Handle/fail on

green oriole
#

So here I'd rather not warn inside the IDE, so you don't try to fix them manually

green oriole
gritty wind
#

go to commit, wait half a minute, whatโ€™s that? Failed because import order

patent pivot
#

(are we going to use pre-commit forever)

#

given that we're not using it on API

gritty wind
#

With the warning itโ€™s clear before you have to commit

green oriole
#

So like

#

You just commit and that's it

gritty wind
#

But then you have to commit twice

#

It doesnโ€™t fix stuff for me

#

If pre-commit fails, I have to run it twice

green oriole
#

Depending on how you stage you have to run twice, yes

gritty wind
#

Even if I donโ€™t change anything

green oriole
gritty wind
#

It does it for every single commit for me, even if I have everything stagedโ€ฆ I accidentally checked out in CRLF

green oriole
#

Would you still prefer to manually sort your imports rather than running a command twice?

gritty wind
#

I mean

#

You donโ€™t have to manually sort

#

You just manually run super

thorny obsidian
#

(I would, running a command twice is unintuitive for me)

gritty wind
#

Isort*

green oriole
#

Well, let's keep the plugin then I guess?

gritty wind
#

This isnโ€™t even a problem for me, pycharm sorts everything for me before I even get to pre-commit

#

Iโ€™m fine with keeping it yeah, I just want to keep the flake warning as well

patent pivot
green oriole
#

Fair enough, but then we have a GPL dev dep

patent pivot
#

i would also like to have the flake waring

#

that's fine

gritty wind
#

Tbh pre-commit would be a much better tool if it was configured client side only

patent pivot
#

GPL dev deps are fine, it's about redistribution, we use gcc in some capacity in a bunch of our images

green oriole
gritty wind
#

That way everyone can follow their preferences and needs

green oriole
#

I mean, you can do that

#

Just make your own

gritty wind
#

You mean my own bash script?

green oriole
#

Yes, and hook up into whatever precommit system you want

gritty wind
#

Precommit integrates nicely with venvs and version management, itโ€™s still more convenient than scripts

#

Also that other thing I told you way back when ๐Ÿคก

fallen patrol
green oriole
#

I am too much of a ๐Ÿคก to remember what you said back then

gritty wind
#

I donโ€™t want to learn bash or w/e

green oriole
#

lol I mean you can make a python precommit hook

#

Like, actually pure python

fallen patrol
#

If you want your own hooks on a repo which doesn't use pre commit I can help you set it up

#

Yeah, you can make precommit run anything

green oriole
#

I believe there is also a way to alter the script precommit creates to use your own config file

fallen patrol
#

Probably that too

green oriole
#

So you still have the pyprecommit framework but your own config

fallen patrol
#

Ye

#

Pre commit is super awesome

#

I've written my own scripts to check things and they're great :)

green oriole
#

I knew the way we cache dependencies would bite us in the arse at some point

fallen patrol
#

Wdym

molten perch
#

Yeah, actually why don't we use pre-commit on the API? I just saw that it was removed, but no reason whatsoever.

green oriole
#

Because I cannot install dev packages then normal packages

#

Hmm

#

Or maybe I can (?)

fallen patrol
#

@green oriole do you use black?

green oriole
#

Yeah we only need to check licenses when the cache key changes

#

Cool

#

No I don't use black

fallen patrol
#

ah

green oriole
#

I am a control freak remember

fallen patrol
#

that's why you used an isort configuration that hates black /hj

green oriole
#

I mean, who cares, we don't use black

fallen patrol
#

true, i suppose

#

what you configured does also hate git diffs tho

gritty wind
#

Who checks git diffs on these imports

fallen patrol
#

this is the biggest setting change that I would add TM

gritty wind
#

Why is that just not default

fallen patrol
#

not sure

gritty wind
#

I mean, itโ€™ll still fail later on because of flake but like

fallen patrol
#

i mean, it could be turned off for pre-commit

#

but like

#

for general usage, sorting them with a file that already has errors could cause more :P

gritty wind
#

I mean, that sounds like a pretty niche case unless you have isort on save

#

Which again seems pretty useless

green oriole
#

It generated a 700 lines diff at first

fallen patrol
#

no trailing commas ๐Ÿฅฒ

green oriole
#

Oh, maybe we should add those

#

Well I guess it is very niche here

gritty wind
#

But then you break compatibility with my ide and I actually have to use it ๐Ÿฅฒ

fallen patrol
#

review filed

#

And I cannot look at replies rn

#

Because as soon as I did so, WINDOWS UPDATE

green oriole
#

So do we want trailing commas or not? I know this is in our code style, but it isn't something I personally like, and since isort will try to fill a new line before moving to the next one it is probably something that will only happen every 36th day of the month, sooo

gritty wind
#

Iโ€™m biased, but no

thorny obsidian
#

@static canyon @green oriole
I'm not gonna add periods to the end of the points in where to start because that'll offend my sensibilities

green oriole
#

Hahaha

#

Lgtm

static canyon
#

Do we maybe want to mention about reviewing PRs?

#

That's still participating to OSS and is just as important imo so think it fits the tag

green oriole
#

I don't think a first time contributor should be reviewing in general

vale ibex
#

It's also in the contrib guide

green oriole
thorny obsidian
#

bot#1833 tag speedrun time?

dusky shoreBOT
celest charm
#

@clever wraith yep it's still an issue

#

[nsfw]||python.com|| is the domain we filter

#

yeah, we filter python.com but the filter also catches everything ending with it

thorny obsidian
#

(... why would you intentionally trigger a known filter?)

celest charm
#

sorry, I wasn't sure it was still an issue

slim widget
#

FYI this is not the Python website (and is NSFW). (In case you didn't know.)

celest charm
#

just to make sure

thorny obsidian
celest charm
#

ah

#

lmao

thorny obsidian
#

It does, it pings the mods

celest charm
#

I absolutely agree, @azure loom

thorny obsidian
#

what other tags can I work on now...

molten perch
#

Hey! Could someone take a look at api#22? The issue hasn't been approved.

dusky shoreBOT
green oriole
vocal wolf
#

@molten perch AoC thingy merged.

molten perch
#

๐ŸŽ‰ Thank you! ๐Ÿ˜„

brisk brook
trail pilot
#

Also, I think a first time contributor =/= someone who doesn't know much about code and its quality.

Most first time contributors have adequate experience with Python and even if they can't attest to style as much, they can definitely review on logic, etc.

static canyon
#

I think the issue is more that they won't be familiar with how our codebase works

celest charm
#

I have no idea how the codebase works and I still do occasional reviews somehow ๐Ÿคท

trail pilot
dim pelican
#

Is there any harm with a "bad" review from someone that is just getting started though? Seems like a good place to get started really

celest charm
trail pilot
trail pilot
#

And people learn from their mistakes

austere hornet
summer garden
#

If they have questions about the code, doesn't that mean that maybe the code could be more clear or could use some comments?

summer garden
austere hornet
#

So I'm in favor of having first time contributors leave reviews

austere hornet
summer garden
#

no harm in adding to the conversation innit?

brisk brook
summer garden
brisk brook
#

Ngl I still can't find my way around the bot

static canyon
dim pelican
#

Yeah I can get that, having a bad review could derail the overall PR process.

summer garden
#

In terms of chaos and confusion?

thorny obsidian
static canyon
dim pelican
#

Well let's say I have a PR open and I need some reviews. If there is a "bad" review, it could spawn a chain of conversation that would be more about the errors in the review, rather than focusing on the content of the PR

vocal wolf
thorny obsidian
#

Also, the tag is just an entry point. I don't think it needs to cover all possible ways to contribute. More a way to get people here

dim pelican
#

Which could be a great learning experience for the "new" person leaving the review, but would not be super productive for the person with the open PR

static canyon
#

Speaking of reviews, can I please get a second one on bot#1860? I'd like to get it merged before I work on bot#1864

(CC @brisk brook if you're able to ๐Ÿ‘‰ ๐Ÿ‘ˆ)

dim pelican
#

I'm still in favor of someone trying to get involved with the whole ecosystem with reviewing though

brisk brook
vocal wolf
#

why does github light theme look so bad

sleek steppe
#

I personally like the light mode lol

vocal wolf
#

the labels just don't look right

#

like they're a solid color

static canyon
#

It's then a pain to have to "correct" them

brisk brook
#

I don't see that painful, it's a learning experience for everyone involved

static canyon
#

Can be confusing for the PR author though

#

But I'm not completely against this

clever wraith
vale ibex
#

oh lol sorry @gritty wind clicked disable automerge instead of merge in main

#

so now I get the merge credit instead ๐Ÿ˜…

celest charm
clever wraith
#

I didn't see a \s lemon_eyes lemon_grimace

clever wraith
vocal wolf
thorny obsidian
#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
โ€ข Sir Lancebot - our fun, beginner-friendly bot
โ€ข Python - our utility & moderation bot
โ€ข Site - resources, guides, and more

Where to start

  1. Read our contributing guidelines
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
thorny obsidian
#

yeaaaaaah buddy

vocal wolf
#

We went from 26 to 21 PRs in the span of an hour

#

This PR has been in the works for a while. If anyone's available for reviews, please do so.

vale ibex
#

Hey @static canyon are you around?

#

want to merge bot#1831 but I want to squash the last commit in it

static canyon
vale ibex
#

cool cool

#

I can do it if you're not around

static canyon
#

I can do ๐Ÿ‘

vale ibex
#

๐Ÿ‘Œ

static canyon
#

I'll also merge main into it in case there's any new getLogger that have been added

vale ibex
#

Might as well rebase onto main to avoid another merge commit

static canyon
#

Already done it but can squash

vale ibex
#

Ah no worries

#

you can't squash now since you've got public commits in there

static canyon
#

ah right

#

Well then I messed up lol

thorny obsidian
static canyon
#

I can still do I think

#

Yeah erm I might've fucked up @vale ibex

vale ibex
#

uhhhh

#

ah yea, I see now

#

1 sec

#

What was the changes you made?

#

just squash the last commit?

vocal wolf
#

uh oh

static canyon
#

Yeah, I think so

vocal wolf
#

reflog time?

vale ibex
#

Which commit did you want to sqush it into?

#

I've got a copy locally so I can just fix my end and forcepush

static canyon
#

"Fix Newlines"
"Address Review"

becoming

"Fix newlines and address review"

#

CC @vale ibex

vale ibex
#

kk that should be it

#

if you git pull -f locally it should be fine

static canyon
#

Perfect, thanks lemon_sweat

vale ibex
#

no worries ๐Ÿ˜„

static canyon
#

I believe that's the squash you were after

vale ibex
#

Just fyi I've been down this path before, which is why I never merge main until the very last second lol

#

always prefer to rebase onto main

static canyon
#

Yeah fair enough lol

static canyon
vale ibex
#

while you have main checkedout git pull

#

to make sure your local main is up to date

#

then checkout your branch and git rebase main

static canyon
#

Right, thanks ๐Ÿ‘

#

Rebasing onto Main

  • Checkout main branch

  • git pull to ensure it's upto date

  • Checkout branch you're working on

  • git rebase main to rebase onto main

vale ibex
#

Did you say you wanted to add the rest now too? if not I can merge this pr

static canyon
#

What do you mean by the rest?

static canyon
#

There wasn't any new getLoggers

#

Or at least I didn't see any

vale ibex
#

ah nice

#

Ah, it's ignoring my approval since I forcepushed those commits

#

@vocal wolf could you +1 on my behalf?

vocal wolf
#

ye

vale ibex
#

bot#1831

static canyon
#

Tyty

#

fyi @vale ibex sir-lancebot#889 is just a one-line config change if you could approve that too pls ๐Ÿ‘‰ ๐Ÿ‘ˆ

dusky shoreBOT
static canyon
#

It has 2 approvals but one is non-staff

#

Ah, @vocal prairie beat you to it, thanks ๐Ÿ˜„

vocal prairie
#

Huh, why isn't it merging. Auto merge is on and all checks have passed.

static canyon
#

๐Ÿค”

vocal prairie
#

Oh, maybe it's the "Update Branch" thing?

static canyon
#

It shouldn't be but I can try I guess

vocal prairie
#

Hmm, looks like it was

#

Weird

static canyon
#

Hmm yeah

#

I guess that makes sense (ensures there's no conflicts)

vocal wolf
#

It is because of the update branch button.

static canyon
#

mhm, it got merged when I pressed ๐Ÿ‘

#

Well that's 5 of my PRs merged all at once :p

timid sentinel
stable mountainBOT
#
Okay.

Your reminder will arrive on <t:1634308879:F>!

timid sentinel
#

Will also try and find some time to take a look at bot#1721 and bot#1815, not sure if there might be some conflicts between those

dusky shoreBOT
timid sentinel
#

I've been avoiding the time utilities one because timezones are hard lemon_sweat

thorny obsidian
#

you should totally look at the discord 2.0 migration >_> we already have 2 PRs waiting on it

vale ibex
#

not my fault

trail pilot
#

Oh also a possible feature for sir-lancebot that's waiting for thread support for Python

#

(Hangman mulitplayer in threads)

#

I feel like quiz should be in threads too

timid sentinel
#

i'll probably just take a look at the code there and try out a few core bot features, and leave the rest of the testing to prod py_guido

trail pilot
#

It takes over the entire channel

vale ibex
#

Looking at the d.py 2.0 PR, it seems we've gone for removing the tzinfo from all of the aware datetimes

#

instead I think we should use arrow.utcnow() to get the current time

#

since that can be compared with aware timestamps

#

Anyway I've been testing and looking around for a bit the past few day, and those two missing tzs in my request are all I've found

thorny obsidian
#

has a functionality test of the 2.0 migration happened yet?

vale ibex
#

That's what I was referring to, I've done a functinoality test of sorts

#

not sure if that's what you were referring to

thorny obsidian
#

Just like, spinning it up and running through all the major commands and scenarios

vale ibex
#

yea

thorny obsidian
#

which stuff have you tested specifically?

vale ibex
#

filtering, infractions, otn, help channels, defcon, voice gate, slowmode, silence, modlog, mod pings, clean, reminders, snekbox, talentpool, syncers

thorny obsidian
#

okay cool cool

austere hornet
stable mountainBOT
#
It has arrived!

Here's your reminder: that and that
[Jump back to when you created the reminder](#dev-contrib message)

clever wraith
#

.bm 897962493920567316

dusky shoreBOT
#
That was a mistake.

Your input was invalid: You must either provide a valid message to bookmark, or reply to one.

The lookup strategy for a message is as follows (in order):

  1. Lookup by '{channel ID}-{message ID}' (retrieved by shift-clicking on 'Copy ID')
  2. Lookup by message ID (the message must have been sent after the bot last started)
  3. Lookup by message URL

Usage:```
.bookmark [target_message] [title=Bookmark]

clever wraith
#

.bm 897962493920567316 Question format

dusky shoreBOT
#
That was a mistake.

Your input was invalid: You must either provide a valid message to bookmark, or reply to one.

The lookup strategy for a message is as follows (in order):

  1. Lookup by '{channel ID}-{message ID}' (retrieved by shift-clicking on 'Copy ID')
  2. Lookup by message ID (the message must have been sent after the bot last started)
  3. Lookup by message URL

Usage:```
.bookmark [target_message] [title=Bookmark]

clever wraith
#

shoot

vocal prairie
clever wraith
#

the bot restarted since then

#

so it was being stinky

#

cc @trail pilot

trail pilot
clever wraith
#

lmao

cold moon
#

Idea - could we make @dusky shore react to messages using lemon_halloween when someone write "lemon" during halloween? We already have some much reactions, but currently they are default emojis.

short snow
#

How about allowing several "mods" for the pfpmod? Like first apply 8bitify then spookyavatar?

green oriole
vocal prairie
#

one code review before reviewing
Can you clarify what you mean by that?

brisk brook
#

@static canyon can you remind me what PR did you need me to review again?

static canyon
#

If you'd like to review something I do still have other PRs open needing review

#

bot#1874, bot#1845, sir-lancebot#899 and sir-lancebot#900

static canyon
#

Top priority being probably either the top or bottom ^

brisk brook
#

They all look good other than the few comments I made

#

Just need testing

static canyon
#

Thanks ๐Ÿ‘

#

Will take a look when I get into school

brisk brook
#

Yeah I would test this on my school laptop, but that requires Docker and I am not sure whether I want to install that together with WSL.

static canyon
#

Fair enough

obsidian patio
#

bot#1874

static canyon
#

Ty

#

Have asked a core-dev to merge it ๐Ÿ‘

static canyon
static canyon
obsidian patio
#

Hope we donโ€™t break the bot lol

static canyon
#

lol

#

It wouldn't be my first time

brisk brook
static canyon
#

You made bot#1821 so you've done issues

dusky shoreBOT
static canyon
static canyon
#

hehe

#

Although granted you'd done reviews etc. before then lol

green oriole
#

didn't you contribute to pixels before

brisk brook
#

Oh right, this was like after 80% of my total reviews lol

brisk brook
green oriole
green oriole
#

Woo woo, 2.0 ready to be merged!

green oriole
#

lol, fixing fixing

austere hornet
#

Haha

vale ibex
#

Once d.py 2.0 is merged, I'll rebase my two PRs onto main so that I can use the new get logger function, otherwise @static canyon will be mad at me

#

๐Ÿ˜„

static canyon
#

@vale ibex are you free to help with a query I have RE structuring?

vale ibex
#

I'm semi free, so can answer questions sure

#

Just in a work call

static canyon
# vale ibex I'm semi free, so can answer questions sure

I've got an issue with sir-lancebot#861 in regards to structuring the change of moving all commands to be a subcommand of a new Hacktoberfest cog.

The best thing I've got at the moment (with inspiration from Akarys) is this:```py
...

from hacktoberfest.issues import issues_command
from hacktoberfest.stats import link_stats_command, stats_command, unlink_stats_command
from hacktoberfest.timeleft import timeleft_command

class Hacktoberfest(commands.Cog):
def init(...):
...

@commands.group(...)
async def hacktoberfest(...):
    ...

@hacktoberfest.command(...)
async def issues(...):
    await hacktoberfest_issues(...)

@hacktoberfest.group(...)
async def stats(...):
    await stats_command(...)

@stats.command(...)
async def link(...):
    await stats_link_command(...)

@stats.command(...):
async def unlink(...):
    await stats_unlink_command(...)

@hacktoberfest.command(...)
async def timeleft(...):
    await hacktoberfest_timeleft(...)

def setup(...):
...```Does this look good? The idea is that the actual handling will still be done in the respective files, so that we don't end up with one massive file with everything in it

vale ibex
#

There's nothing inherently wrong with that no

#

If they do start getting big, you could always split it into two cogs

static canyon
#

I mean the idea is that hacktoberfestissues, hacktoberfeststats timeleft becomes hacktoberfest issues hacktoberfest stats hacktoberfest timeleft. All the same top-level command group so really needs to be one cog

#

The above seems to be the best, so will go with it

vale ibex
#

๐Ÿ‘Œ

static canyon
#

Thanks ๐Ÿ‘

#

I'll work on that now since I've got a bit of free time

#

This is actually gonna be more complicated than I thought, because of class attrs etc.

#

Currently all the hacktoberfest commands are their own cog. The way I was planning to move all of these into one parent command (.hacktoberfest) was by importing the main function and calling it, but since the functions are within a class I can't do this.

Should I just remove the class from each file? The issue with that is that I need to figure out what to do with class attributes (the hacktoberfest issues class has a bunch of cache attributes). I guess I could just have the cache variables as global variables?

Alternatively I could have a singleton instance for each class which gets imported, so e.g. from bot.exts.events.hacktoberfest.issues import issues then issues.main_function()

CC @vale ibex

vale ibex
#

you could keep the issues class around as it's own file, remove the commands from it and instantiate it within the cog

#

So it becomes a normal oop class for storing state

static canyon
#

Right, yeah

#

Instantiate within the Hacktoberfest cog __init__?

vale ibex
#

Sure, or have an init task if you need async stuff

static canyon
#

So like```py
class Hacktoberfest(...):
def init(self, ...):
self.issues_cog = HacktoberfestIssues()
self.stats_cog = HacktoberfestStats()
self.timeleft_cog = HacktoberfestTimeleft()
...
@hacktoberfest.command()
async def hacktoberfest_issues(...):
self.issues_cog.main_command(...)

vale ibex
#

That seems overkill

#

I can't imagine time_left is anything complicated

#

it's just calculating a timedelta right?

static canyon
#

It's 3 functions

#
        """
        Calculates the time left until the end of Hacktober.

        Whilst in October, displays the days, hours and minutes left.
        Only displays the days left until the beginning and end whilst in a different month.

        This factors in that Hacktoberfest starts when it is October anywhere in the world
        and ends with the same rules. It treats the start as UTC+14:00 and the end as
        UTC-12.
        """```
vale ibex
#

Yea, those could just be helper functions in another file, no need to have a whole class

static canyon
#

But it's already a class is my point (it's its own cog)

vale ibex
#

There's nothing stopping you from changing that

static canyon
#

Right, okay

vale ibex
#

The goal of this is to merge all 3 cogs into one cog right?

vale ibex
#

So ou have a few things here, there's the main cog class, that you will need

#

then you have the option to have another class which can store state, if needed

#

and you could also have util functions if it's easier, and those could live in the cog itself, or another file

static canyon
#

The thing is I don't want everything in one file

#

If I move all utils into one file then that's basically all the cogs just moved into a utils file

vale ibex
#

Sure, then you could have 3, one for the main cog, one for a class that can store state and have class funcs and then a third for utils funcs that don't live in either

static canyon
#

Wdym by "store state"?

vale ibex
#

You said one of the current cogs has quite a lot of class vars for caching right?

#

That what I was referring to

static canyon
#

Yeah, hacktoberfest issuespy def __init__(self, bot: Bot): self.bot = bot self.cache_normal = None self.cache_timer_normal = datetime.datetime(1, 1, 1) self.cache_beginner = None self.cache_timer_beginner = datetime.datetime(1, 1, 1)

#

Think it's used for caching different issues

vale ibex
#

Take the talentpool in @stable mountain as an example, it has the main cog file in _cog.py, which has all the commands, then it has the _review.py file which has a class for scheduling reviews

#

So for this, you could have a cog which contains all the commands, maybe a few helper utils, then you could have another file with a cache class

static canyon
#

Each cog has its own helpers is the thing

#

So if I only have one utils/helpers file, then I'm basically just merging all the cogs which is exactly what I want to avoid

#

I mean maybe I can semi-tidy by splitting into classes within _utils.py, so like```py

_utils.py

class HacktoberfestIssuesUtils:
...

class HacktoberfestStatsUtils:
...

class HacktoberfestTimeleftUtils:
...```

#

So the three files would be _cache.py, _cog.py and _utils.py:```py

_cache.py

class IssuesCache:
"""Handles cache for .hacktoberfest issues command"""
...

# _cog.py
class Hacktoberfest:
    """Handles hacktoberfest commands."""

    ...
``````py
# _utils.py
class HacktoberfestIssuesUtils:
    """Stores util functions for `.hacktoberfest issues`."""
    ...

class HacktoberfestStatsUtils:
    """Stores util functions for `.hacktoberfest stats`."""
    ...

class HacktoberfestTimeleftUtils:
    """Stores util functions for `.hacktoberfest timeleft`."""
```
static canyon
#

And then have all the util functions as classmethods (think that's the right term) so that I don't need an instance (can just do HacktoberfesIssuesUtils.get_issues(...) etc.)

vale ibex
#

Sure, that could work

static canyon
#

That's what I'll go for then, unless someone says otherwise before I implement tonight (in ~6-8 hours)

#

!remind 8h ^ if not already started

stable mountainBOT
#
I'll allow it.

Your reminder will arrive on <t:1634329176:F>!

brazen charm
#

Is it really necessary to namespace them?

#

It's also preferred to use modules for that instead of abusing classes

static canyon
#

I guess that makes sense, just not sure if that's the tidiest way

brisk brook
#

Why is there a need for namespacing?

#

Isn't it just a handful of utils files?

static canyon
brisk brook
#

I mean methods

#

How many methods are there you need in this utils file?

static canyon
brisk brook
#

Won't the name of the methods give away quite easy what purpose it serves?

I don't mind this being in one file. 400 lines is a quite okay length.

static canyon
#

Not always, e.g. there's in_hacktober, build_embed etc.

#

But I guess I can separate them by just a comment

#
# _utils.py

## Issue utils
...

# Stat utils
...

## Timeleft utils
...```
#

So the three files would be _cache.py, _cog.py and _utils.py:```py

_cache.py

class IssuesCache:
"""Handles cache for .hacktoberfest issues command"""
...

# _cog.py
class Hacktoberfest:
    """Handles hacktoberfest commands."""

    ...
``````py
# _utils.py
## utils for `.hacktoberfest issues`
    ...

## utils for `.hacktoberfest stats`
    ...

## utils for `hacktoberfest timeleft`
    ...
```
brisk brook
static canyon
#

๐Ÿ‘

#

What about constants? @brisk brook

#

Create a _constants.py?

brisk brook
#

Depends on how many, I'd say they may fit in the utils.py file or just cog.py

static canyon
#

There's 11 I think

#

@brisk brook ^

#

I'd be fine with it going at the top of one of those two files

#

Just not sure which

brisk brook
static canyon
#

Yeah, fair enough

#

That would be _cog.py

stable mountainBOT
molten perch
#

Hey! Could a core-dev take a look at api#22? If it's good to go, I'd like to work on it during the weekend.

dusky shoreBOT
gritty wind
#

Is the DB migration part of #22?

#

It seems not, so whatโ€™s the blocker for the migration

vale ibex
#

Hey @cold island would you mind if I merge main into your site#591 PR? or would you rather rebase onto main locally?

dusky shoreBOT
vale ibex
#

mostly for the static preview

molten perch
gritty wind
#

I c

vale ibex
gritty wind
#

The fact you didn't have 3K conflicts is nothing short of a miracle

#

Are the ๏ฟฝ in that PR intentional

#

They appear as question marks for me

vale ibex
#

yes

#

!charinfo ๏ฟฝ

stable mountainBOT
vale ibex
#

It's used as a placeholder to show parts of the config.yml you need to replace

gritty wind
#

lmao that's perfect

#

thanks zig, very cool

fallen patrol
vale ibex
#

There is...

fallen patrol
#

Nope, that's in the guide.

#

I mean at the top of config.yml

vale ibex
#

This is literally on top of the yml

fallen patrol
#

Wait... The config.yml file is not in the bot repo

vale ibex
#

in the same collapsible element

fallen patrol
#

Dumb me

#

Everywhere that file appears it has the explanation at the top

vale ibex
#

it only appears once

stable mountainBOT
molten perch
#

Hey! Could a core-dev take a look at api#22 and possibly approve the issue? ๐Ÿ˜„
(Sorry for the continuous issue bumping ๐Ÿ˜„ )

dusky shoreBOT
solemn kayak
#

Mobile devices place tables of content right at the bottom of the page in the guides on the website (for an example see Hemlockโ€™s code review guide). This makes them sort of pointless for mobile users since they have to scroll through the entire page to click a link on the TOC. Is this something worth making an issue for?

verbal basalt
#

that's funny in python, I really think it's a bug, at least in version 3.8.1:
when I instantiate a class Line, when I call a line.append(token), it instead of appending to the individual list of the instantiated class, it is doing append to the class(object), thus getting all the "line" (instantiated object) with the same elements in the token list.
code:
class Line:
def init(self, number, idx, string, tokens=list()):
self.num, self.idx, self.cols = number, idx, len(string)
self.tokens, self.string = tokens, string
self.ident_level = 0
while string.startswith('\t'):
self.ident_level += 1
string = string[1:]

lines = []
line = Line(1, 0, "test")
line.tokens.append(1)
lines.append(line)
line = Line(2, 0, "test 2")
line.tokens.append(2)
lines.append(line)

for line in lines:
print(line.tokens)

Console:

[1, 2]
[1, 2]

sharp timber
#

!mutable-defaults

stable mountainBOT
#

Mutable Default Arguments

Default arguments in python are evaluated once when the function is
defined, not each time the function is called. This means that if
you have a mutable default argument and mutate it, you will have
mutated that object for all future calls to the function as well.

For example, the following append_one function appends 1 to a list
and returns it. foo is set to an empty list by default.

>>> def append_one(foo=[]):
...     foo.append(1)
...     return foo
...

See what happens when we call it a few times:

>>> append_one()
[1]
>>> append_one()
[1, 1]
>>> append_one()
[1, 1, 1]

Each call appends an additional 1 to our list foo. It does not
receive a new empty list on each call, it is the same list everytime.

To avoid this problem, you have to create a new object every time the
function is called:

>>> def append_one(foo=None):
...     if foo is None:
...         foo = []
...     foo.append(1)
...     return foo
...
>>> append_one()
[1]
>>> append_one()
[1]

Note:

โ€ข This behavior can be used intentionally to maintain state between
calls of a function (eg. when writing a caching function).
โ€ข This behavior is not unique to mutable objects, all default
arguments are evaulated only once when the function is defined.

sharp timber
#

They should show up if you run flake8

#

TLDR the __init__ line is run once, so a list is created only once, and thus the same list is passed to all of the instances of that class as a default argument

fallen patrol
#

it's technically twice tho once in deployment and once in repo

short snow
#

How about moving the explaination of the config to the config on the repo and just embedding that on site?

#

so we won't need to change it at two places

vale ibex
#

This file doesn't appear in the repo, the repo only has the config defaults. There are no replacement chars in that.

We don't want to split the contrib guide up into two places, as that would just make it harder for new contribs

green oriole
molten perch
#

Cool! Thank you! ๐Ÿ˜Ž

short snow
#

Also could we add a go back to top option on the site?

vale ibex
#

Yea, that's the file that we changed, we added replacement chars to highlight what values need to be changed

#

So that if someone tried to load the bot without changing it would error

short snow
#
dev_guild:
    id: &DEV_GUILD_ID   1234536798 # ๏ฟฝ

    categories:
        logs:           &DEV_LOGS               1234536798 # ๏ฟฝ
#

something like this?

#

Or we would need to add a note to the pr template if someone changed the conifg, please change it on site too

vale ibex
#

That could work, but work requires a lot of comments, since we explain a lot of things about this file in the guide

#

Since its different if its running locally or in docker

short snow
#

It won't be a problem to include that on the repo?

#

no just the file, nothing else

#

like the dropdown part of the section

vale ibex
#

That's not all of the explanation

#

Theres more below

#

When helping a new contrib, I'd rather be able to link them to a page on site and have them read properly formatted sentences and paragraphs, rather than comments in a yml file

short snow
#

Yeah i know lemme explain again what i am saying, currently if we add a new variable we would need to change it in two places on the site (after this pr) and the bot. So rather than changing it on two places if we "embed" the dropdown part of the section i linked above to just show the file contents of the default config file present on the github we won't be required to change it at two places then

#

rest of the stuff would remain the same

#

This part of the seciton

#

Like in my enhance incidents pr, i added a webhook config variable, so i would now need to even add it on the site also

vale ibex
#

Ah right, I'm not sure about adding more dynamic content back onto the site

short snow
#

offtopic You are back with your OG profile ๐Ÿ‘€

vale ibex
#

After the effort we made to make it static

short snow
#

Not sure how we would do it ๐Ÿคทโ€โ™‚๏ธ but was just a idea. If it is possible would be awesome

vale ibex
#

Yea it does sound like it would be useful for when new vars are added

#

Just need to weigh that up against the fact that it won't error on boot if a new contrib forgets to change a replacement char

short snow
#

Like it is possible to embed github gists, is it possible for files also?

gritty wind
#

I donโ€™t really think itโ€™s a big deal to have it in two places

#

Itโ€™s edited once every blue moon anyways

#

And the number of times we add something a contrib has to edit is even lower

short snow
#

True ๐Ÿ‘

molten perch
#

I can do it, if no-one else wants to. Have a nice vacation! ๐Ÿ˜„

sand bone
#

!run

#

!code

stable mountainBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

sand bone
#

!run

import request

r = requests.get('https://google.com/%27)
print(r.cookies['1P_JAR'])
vale ibex
gritty wind
#

Hi, please use #bot-commands for testing

#

^^

brazen charm
#

@vale ibex looks like I was a bit slow with the comment on the isort PR, should I open a new one for it?

#

it also looks like isort is only available through it being a dep of flake8-isort which we can depend on but doesn't feel ideal

vale ibex
#

Ah yea, missed that. that makes sense for sure ๐Ÿ˜„

#

Wait, this fails flake8 when running locally

#

How did it pass in the action

#
PS C:\Users\Chris\src\bot> poetry run task lint
Check for merge conflicts................................................Passed
Check Toml...............................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
check blanket noqa.......................................................Passed
isort (python)...........................................................Passed
Flake8...................................................................Failed
- hook id: flake8
- exit code: 1

bot/exts/info/doc/_parsing.py:15:1: I202 Additional newline in a group of imports. 'from . import MAX_SIGNATURE_AMOUNT' is identified as Application Relative and 'from bot.utils.helpers import find_nth_occurrence' is identified as Application.
bot/exts/info/doc/__init__.py:3:1: I202 Additional newline in a group of imports. 'from ._redis_cache import DocRedisCache' is identified as Application Relative and 'from bot.bot import Bot' is identified as Application.
bot/exts/info/doc/_cog.py:26:1: I202 Additional newline in a group of imports. 'from . import NAMESPACE, PRIORITY_PACKAGES, _batch_parser, doc_cache' is identified as Application Relative and 'from bot.utils.scheduling import Scheduler' is identified as Application.
bot/exts/info/doc/_batch_parser.py:18:1: I202 Additional newline in a group of imports. 'from . import _cog, doc_cache' is identified as Application Relative and 'from bot.utils import scheduling' is identified as Application.
bot/api.py:9:1: I202 Additional newline in a group of imports. 'from .constants import Keys, URLs' is identified as Application Relative and 'from bot.log import get_logger' is identified as Application.
bot/exts/info/doc/_html.py:10:1: I202 Additional newline in a group of imports. 'from . import MAX_SIGNATURE_AMOUNT' is identified as Application Relative and 'from bot.log import get_logger' is identified as Application.
#

Running the exact command from the action ```
PS C:\Users\Chris\src\bot> poetry run flake8 --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'
::error file=.\bot\api.py,line=9,col=1::[flake8] I202: Additional newline in a group of imports. 'from .constants import Keys, URLs' is identified as Application Relative and 'from bot.log import get_logger' is identified as Application.
::error file=.\bot\exts\info\doc_batch_parser.py,line=18,col=1::[flake8] I202: Additional newline in a group of imports. 'from . import _cog, doc_cache' is identified as Application Relative and 'from bot.utils import scheduling' is identified as Application.
::error file=.\bot\exts\info\doc_cog.py,line=26,col=1::[flake8] I202: Additional newline in a group of imports. 'from . import NAMESPACE, PRIORITY_PACKAGES, batch_parser, doc_cache' is identified as Application Relative and 'from bot.utils.scheduling import Scheduler' is identified as Application.
::error file=.\bot\exts\info\doc_html.py,line=10,col=1::[flake8] I202: Additional newline in a group of imports. 'from . import MAX_SIGNATURE_AMOUNT' is identified as Application Relative and 'from bot.log import get_logger' is identified as Application.
::error file=.\bot\exts\info\doc_parsing.py,line=15,col=1::[flake8] I202: Additional newline in a group of imports. 'from . import MAX_SIGNATURE_AMOUNT' is identified as Application Relative and 'from bot.utils.helpers import find_nth_occurrence' is identified as Application.
::error file=.\bot\exts\info\doc_init
.py,line=3,col=1::[flake8] I202: Additional newline in a group of imports. 'from ._redis_cache import DocRedisCache' is identified as Application Relative and 'from bot.bot import Bot' is identified as Application.

green oriole
#

There is prooobably a better way to do it

#

Basically flake8-import-order doesn't get uninstalled while it should

#

poetry run pip uninstall flake8-import-order perhaps?

vale ibex
#

ahh

vale ibex
#

poetry install --remove-untracked

#

Oh, great poetry has borked installing from cache in windows in the latest release

#

So now I need to delete my cache any time I want to install something ๐Ÿ™ƒ

green oriole
#

Noice

gritty wind
#

Y'all update your poetries?

#

I installed it when setting up my PC and haven't though about it since lol

vale ibex
#

Yea, I just updated mine now

#

which caused these issues

#

so I'm just gonna downgrade

gritty wind
#

Ah yis

#

Tell me what you downgrade to

#

May as well upgrade now before I forget

vale ibex
#

I went down to 1.0.8

green oriole
#

I never upgrade those until they break

#

Perhaps I should install them using the Arch package so they get updated

viscid canopy
#

Add pydantic to supported Python modules

#

In !eval command

vale ibex
#

Hey @gritty wind mind if I remake bot#1285? The fork is deleted and it's quite of out date ๐Ÿ˜…

dusky shoreBOT
vale ibex
#

not sure if you still had that patch that you mentioned around, if not i could take a look

vale ibex
#

It seems all that's needed it to change the regex you have now (?<!\n)\n(?!\n) to (?<!\n)\n(?![\n\u2003])"

#

since we use \u2003 in the docstrings we want to break

static canyon
#
sir-lancebot    | 10/16/21 15:28:40 - async_rediscache.types.base CRITICAL: can't get a pool connection as the RedisCache instance does not have a namespace.
sir-lancebot    | 10/16/21 15:28:40 - root DEBUG: Error Encountered: NoNamespaceError - can't get a pool connection as the RedisCache instance does not have a namespace., Command: hacktoberfest stats, Author: TizzySaurus#9615, Channel: bot-commands
sir-lancebot    | 10/16/21 15:28:40 - bot.exts.core.error_handler ERROR: Unhandled command error: can't get a pool connection as the RedisCache instance does not have a namespace.
sir-lancebot    | Traceback (most recent call last):
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 167, in wrapped
sir-lancebot    |     ret = await coro(*args, **kwargs)
sir-lancebot    |   File "/bot/bot/exts/events/hacktoberfest/_cog.py", line 63, in stats
sir-lancebot    |     if await self.linked_accounts.contains(author_id):
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/async_rediscache/types/base.py", line 260, in wrapper
sir-lancebot    |     result = await coroutine_object
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/async_rediscache/types/cache.py", line 123, in contains
sir-lancebot    |     with await self._get_pool_connection() as connection:
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/async_rediscache/types/base.py", line 110, in _get_pool_connection
sir-lancebot    |     raise NoNamespaceError(error_message)
sir-lancebot    | async_rediscache.types.base.NoNamespaceError: can't get a pool connection as the RedisCache instance does not have a namespace.
```does anyone know how I can fix this? I'm not exactly sure what the code causing this error is
vocal prairie
#

Did you enable USE_FAKEREDIS?

vale ibex
#

How are you creating the redis cache?

static canyon
static canyon
vale ibex
#

Ah, it needs to be a class attribute, rather than in the init

static canyon
vale ibex
#

I think it's so that it can get the namespace

#

yea, like that

static canyon
#

Aight

brisk brook
static canyon
#

That seems to work, just fixing some other things

vale ibex
# brisk brook Do you know why that is?
    Please note that for automatic namespacing, this class MUST be created as a
    class attribute to properly initialize the instance's namespace. See
    `__set_name__` for more information about how this works.
#

from asyncredis cache

#
    def __set_name__(self, owner: Any, attribute_name: str) -> None:
        """
        Set the namespace to Class.attribute_name.

        Called automatically when this class is assigned to a class attribute.

        This class MUST be created as a class attribute, otherwise it will raise
        exceptions whenever a method is used. This is because it uses this
        method to create a namespace like `MyCog.my_class_attribute` which is
        used as a hash name when we store stuff in Redis, to prevent collisions.

        The namespace is only set the first time a class attribute gets assigned
        to a RedisCache instance. Assigning a class attribute to an existing
        instance will not overwrite the namespace and the additional class
        attribute will act as an alias to the original instance.
        """
        if not self._local_namespace:
            self._local_namespace = f"{owner.__name__}.{attribute_name}"
brisk brook
#

Oh, it automatically gives it a name from the class and variable?

vale ibex
#

yea

brisk brook
#

Huh

vale ibex
#

that's if you want to use auto-namespacing

#

you could also do RedisCache(namespace="foo")

static canyon
#

Should I use constants.Client.prefix over ctx.prefix (on lancebot)?

vale ibex
#

but that comes with a chance of collision

vale ibex
#

if that matters, then sure use constants

static canyon
#

Yeah, suppose I should then

vale ibex
#

๐Ÿ‘Œ

static canyon
#

How exactly does detection of a valid hacktober pr thing work for .hackstats? It doesn't seem to being working

gritty wind
#

Meant to ping there @vale ibex

#

Though, thinking about it now

#

This isn't very time sensitive

#

So it's fine

#

Also yeah, feel free to take over

#

Xith poked me about that PR at least 10 times, I feel bad keeping him waiting

vale ibex
#

I can't imagine it would be more taxing that running all of our filter tokens on every message

#

since it just runs when you invoke help lol

gritty wind
#

lmao true true

#

Hey github finally fixed the thing

vale ibex
gritty wind
#

OT: I'm still not used to your new-old PFP, keeps throwing me off

vale ibex
#

lol

#

It took me longer than i care to admit to find it again

#

Since I never actually saved it

gritty wind
#

lol did you save it this time

vale ibex
#

Yea, it's saved...until I delete it

#

I tend to clear out folders often lol

gritty wind
#

Hah see you back here in 4 months

vale ibex
static canyon
#

@thorny obsidian do you have any idea how the .hackstats command is supposed to work? It doesn't seem to work anymore

vale ibex
#

.src hackstats

dusky shoreBOT
#
Command: hacktoberstats

Display an embed for a user's Hacktoberfest contributions.

Source Code
vale ibex
#

It looks like you're supposed to link your github acc to your user, and then it searched for closed PRs via the github api

#

.hackstats link ChrisLovering

dusky shoreBOT
#

@vale ibex, your GitHub username has been added

vale ibex
#

.hackstats

dusky shoreBOT
#

No valid Hacktoberfest PRs found for 'ChrisLovering'

vale ibex
#

yea

thorny obsidian
#

I have actually no idea how it works. I know there's a PR or an issue open to fix how it was finding it for last year.

vale ibex
#

you link your github acc, it pulls all your PRs from october this year, and looks if any have hacktoberfest-accepted label

#

and don't have invalid or spam

#

get_october_prs is the important function there

cold moon
#

Does it check for repository topics?

vale ibex
#

Yea

#

There's still some code in there from last year, since that only happened after oct3

#

that isn't applicable this year

cold moon
#

Yes, it does not work for me too. I have 2 PRs but this show none

static canyon
stable mountainBOT
#

bot/exts/events/hacktoberfest/hacktoberstats.py lines 288 to 296

if jsonresp2.get("names") is None:
    log.error(f"Error fetching topics for {shortname}: {jsonresp2['message']}")
    continue  # Assume the repo doesn't have the `โ€‹hacktoberfest`โ€‹ topic if API  request errored

# PRs after oct 3 that doesn't have 'hacktoberfest-accepted' label
# must be in repo with 'hacktoberfest' topic
if "hacktoberfest" in jsonresp2["names"]:
    hackto_topics[shortname] = True  # Cache result in the dict for later use if needed
    outlist.append(itemdict)```
vale ibex
#

it's checking topics and continue if there aren't any

static canyon
#

In which case I'll just move it and not fix; will leave the fixing up to someone else

vale ibex
#

there might be more, this function is quite complicated for what it's doing

#

Might be easier to just refactor it

static canyon
#

Yeah, I was looking through the code and just couldn't really figure it out

vale ibex
#

I think the one I linked above is the issue your seeing

static canyon
#

I think it's out of scope for this PR to be fixing it anyway

static canyon
#

The first if statement stops it

vale ibex
#

Ah

stable mountainBOT
#

bot/exts/events/hacktoberfest/hacktoberstats.py line 230

if "message" in jsonresp:```
vale ibex
#

What is the resp?

static canyon
stable mountainBOT
#

bot/exts/events/hacktoberfest/hacktoberstats.py line 242

if jsonresp["total_count"] == 0:```
static canyon
#

Before I changed stuff, it was the latter

#

It just never found anything

#

My laptop has died so can't really debug anymore

vale ibex
#

Hah no worries

cold island
#

@vale ibex addressed review in site#591

dusky shoreBOT
cold island
#

@thorny obsidian do you want to check out the current state of the guide before it's merged?

cold island
#

@tawdry vapor should docker-compose be capitalized as well?

tawdry vapor
#

Not sure. Look at Docker's documentation to see how they refer to it

vocal prairie
#

The docs refer to it as "Docker Compose"

cold island
#

@tawdry vapor how do you define an extension?

tawdry vapor
#

The same way discord.py defines it. Those commands operate using load_extension, unload_extension,, etc

#

I suppose an extension is any module with a setup function that has a certain signature.

cold island
#

Yeah, I'm just thinking that extension is more accurate, but a cog is probably a more familiar term. I'll try just linking to the dpy page on extensions

tawdry vapor
#

You can write that it "reloads the cog" but you need to make it clear that the extension's name should be given rather than the cog's

#

Maybe mention the list command so users can get an idea of which extensions are available

cold island
#

That's a good idea

#

Is it accurate to say that cogs are parts of extensions?

tawdry vapor
#

They can be, not necessarily.

#

Extensions can lack cogs, and cogs can be defined outside extensions.

sleek steppe
#

You can use extensions without cogs and vice versa

tawdry vapor
#

Though in practice I do not think we ever do this.

cold island
#

yeah I don't think so

#

So I guess I can say "in this bot"

tawdry vapor
#

Can you just defer this explanation to "!help ext", or is the documentation not detailed enough for it?

cold island
#

!help ext

stable mountainBOT
#
Command Help

!extensions
Can also use: c, cog, cogs, ext, exts

Load, unload, reload, and list loaded extensions.

Subcommands:

!extensions list
Get a list of all extensions, including their loaded status.
!extensions load [extensions...]
Load extensions given their fully qualified or unqualified names.
!extensions reload [extensions...]
Reload extensions given their fully qualified or unqualified names.
!extensions unload [extensions...]
Unload currently loaded extensions given their fully qualified or unqualified names.

tawdry vapor
#

!help extensions reload

stable mountainBOT
#
Command Help

!extensions reload [extensions...]
Can also use: extensions r, reload

*Reload extensions given their fully qualified or unqualified names.

If an extension fails to be reloaded, it will be rolled-back to the prior working state.

If '*' is given as the name, all currently loaded extensions will be reloaded.
If '**' is given as the name, all extensions, including unloaded ones, will be reloaded.*

tawdry vapor
#

Maybe not

cold island
#

Pushed changes

static canyon
#

If I'm working on a PR that's about restructuring, and all restructuring is complete but there's an issue with the code from before the restructure, am I okay to still PR knowing there's code in it that doesn't work?

Basically I'm moving all the hacktoberfest commands into one file, but .hackstats is currently broken and so the "restructured" version is still broken (since same actual code for it).

#

I've tried debugging the issue with .hackstats a bit but couldn't really figure it out, and don't particularly have the time to properly debug and fix it

cold island
#

Just clarify it in the PR

static canyon
#

๐Ÿ‘

#

In which case, I can PR now :p

static canyon
short snow
#

@cold island I can take over the scheduler PR if you and xith don't mind

vocal wolf
short snow
#

Yeah, I was talking after that as I really wanted this feature to be available :D, even preserving unloaded cogs is there ^-^ and my issue on pydis/api. I will wait lol

rapid igloo
#

I definitely should've made more meaningful commit messages when I was working on this last year ๐Ÿคฆโ€โ™€๏ธ

rapid igloo
rapid igloo
rapid igloo
stable mountainBOT
#

bot/exts/events/hacktoberfest/hacktoberstats.py line 229

jsonresp = await self._fetch_url(base_url, REQUEST_HEADERS, {"q": query_params})```
cold island
short snow
static canyon
#

I'll see if that fixes it later tonight, thanks ๐Ÿ‘

#

!remind 11h ^ if not already done

stable mountainBOT
#
ROGER THAT

Your reminder will arrive on <t:1634496654:F>!

rapid igloo
# static canyon I'll see if that fixes it later tonight, thanks ๐Ÿ‘

I could've opened a PR for it but it didn't feel like a neat fix so I'm digging into aiohttp source code to see if they changed something with the params. By the way FYI I've also added = {} to the headers and params arguments for _fetch_url so they're optional, in case you also get an error like I did.

static canyon
#

Yeah, I did notice params was missing in 2 cases

#

Please don't PR though, since I'll have to completely rewrite anyway due to the restructure

#

If you just send the fix here I'll commit on my restructure branch and add you as co-author to give you credit

#

@rapid igloo

rapid igloo
#

okay :)

#

do you want a patch or

#

it's just changing the line which I've said above and then making headers and params optional

static canyon
#

I'd be looking for a fix inside (what's currently) the hackstats file

static canyon
rapid igloo
#

yeah I'll have a closer look tonight (in like 4 hours for me)

static canyon
#

Sounds good ๐Ÿ‘

#

Thanks for looking into this

rapid igloo
#

np, it was me who did most (60%?) of the hackstats stuff last year anyway so I'm responsible :p

green oriole
green oriole
#

!echo am I alive?

stable mountainBOT
#

am I alive?

green oriole
short snow
vale ibex
#

!int e print(discord.version)

stable mountainBOT
#
In [2]: print(discord.__version__)
2.0.0a```
short snow
#

@green oriole what theme is that?

#

k

#

i keep on changing my themes, don't like staying on one lol

green oriole
#

and also @cold moon ๐Ÿฅบ

vocal wolf
#

what's going on over there

green oriole
#

Breking the infra! Merging d.py 2.0

vocal wolf
#

oh no

#

is that today

short snow
#

right now ๐Ÿ™ƒ

vocal wolf
#

oh it was 10 minutes ago

vale ibex
#

yup ๐Ÿ˜„

#

Just dealing with snags now

#

only found 1 so far

vocal wolf
#

we do a little bit of trolling

#

@vale ibex I'm here what's going on

#

are we breaking anything at this current time

#

LOL

#

hey man, you did it to me before

#

I'm taking my revenge

fervent sage
#

smh i wanna break stuff too

vocal wolf
#

The triage report this week is going to be wack

#

not enough time

vocal wolf
#

black magic

vocal wolf
#

10-10, yeah

#

4 pages

#

wack

green oriole
vocal wolf
#

was static previews this or last week

hoary anvil
#

frenzied typing from akarys

vale ibex
vale ibex
#

poetry install --remove-untracked

vocal wolf
#

--remove-untracked Removes packages not present in the lock file.

#

from the man page

#

Sorry not man pages, I mean poetry install --help

vocal wolf
#

what have we done

vale ibex
#

lol

#

we good devs

green oriole
#

We speedy devs

vocal wolf
#

I can hear both of you typing these messages

#

lmfao

desert vessel
#

wassup chris

vale ibex
#

bot#1871

dusky shoreBOT
vocal wolf
#

bruh moment

desert vessel
#

is that your typing speed or random mashing?

vocal wolf
#

mashing

#

def

hoary anvil
#

@green oriole why do you use git switch instead of git checkout?

vocal wolf
#

4 lines is not 25-13

#

how dare you

#

.wa 25-13

dusky shoreBOT
desert vessel
vocal wolf
#

it's 12

#

you LIED chris I cannot believe this

desert vessel
#

xD

vale ibex
#

lol, most of it is docstring and function name refactor

hoary anvil
vale ibex
#

there's like 4 functional lines changed

desert vessel
#

i need a good vim configuration ;-;

#

btw is there no dev-voice-chat ?

hoary anvil
#

no

#

sadly

desert vessel
#

rip

#

this is where admins hang out, i see ๐Ÿ˜‚

green oriole
#

I like how WA thinks we cannot do basic maths oh wait, we can't

vale ibex
#

bot#1876

dusky shoreBOT
desert vessel
#

.wa 34+1

#

oof

hoary anvil
#

@desert vessel why did you react to your own message

desert vessel
vocal wolf
#

.wa 5-4

dusky shoreBOT
vocal wolf
#

we have to know

#

my god it's 1

desert vessel
#

XD

fervent sage
#

its actually 6

desert vessel
#

how-

#

lol

vocal wolf
#

math

#

@vale ibex I reviewed

clever wraith
#

.wa 69*69

vocal wolf
#

uhhhhhhh

#

1871

#

I wasn't listening what happened

#

40 minute triage report?

vale ibex
#

xith what is your github email

#

i will co author locally

vocal wolf
vale ibex
#

so that I can rebase too

#

kk

vocal wolf
#

@cold island Welcome, to Jurassic park

#

and there he goes

#

probably because I didn't spell it right

#

next project

#

github in the terminal

#

in rust

short snow
#

isn't gitui already there pithink

vocal wolf
#

is it

cold island
short snow
#

lol

vocal wolf
#

@vale ibex wanna squash modlog ignore channels mods can't view pr

short snow
#

Oh nice

vocal wolf
#

you've done nothing wrong

#

just wondering

#

5 commits, idk if you want to or not

#

yeah chris you broke github how dare you

#

@vale ibex wait I retract my approval

#

grammar incoming

short snow
#

oh no, i got merge conflcits

#

smh

#

enhance incidents

#

@vocal wolf can i squash down the PR? It is anyways going to be squash merged

vocal wolf
#

which one

short snow
#

bot#1446

dusky shoreBOT
short snow
#

or you would do it while merging

vocal wolf
#

let me stare at diff for 2 seconds

short snow
#

smol diff

vocal wolf
#

verdict

#

do what you must

short snow
#

nice verdict

vale ibex
#

words of wisdom, as always

vocal wolf
#

@vale ibex done

#

no what do you mean

green oriole
#

My only answer will be

vocal wolf
#

mmmmmmmmmmmmmmm

#

I can't fukin english

short snow
#

whats wrong with pycharm ๐Ÿคฆโ€โ™‚๏ธ

vocal wolf
short snow
vocal wolf
#

lmao

short snow
#

only that line has got these weird errors ๐Ÿคฆโ€โ™‚๏ธ

cold island
short snow
#

Cause i am pushing that change right now

cold island
#

We agreed to only resolve stuff when the changes are pushed :\

short snow
#

Yeah ๐Ÿคฆโ€โ™‚๏ธ

hoary anvil
#

@green oriole shouldn't it be either "That's all for now; feel free..." or "That's all for now. Feel free...", instead of "That's all for now, feel free..."?

short snow
#

btw how do you squash all the commtis of a pr

cold island
#

Don't squash now though

#

Will make reviewing a pain

vocal wolf
#

which one we talking about

#

oh nvm

#

@vale ibex I've approved

short snow
#

The diff is short so i thought it would be okay

vocal wolf
#

forgot to ping before

cold island
#

Better to squash before merging

green oriole
vocal wolf
#

alright

#

I'm putting that massive message on notion

vocal wolf
#

but parsed

#

and sorted

hoary anvil
#

@green oriole archived libraries are a pain, huh

#

yeah exactly

#

which is the precise reason it got archived lol

#

the poor lad

short snow
short snow
#

that was needed lol

brisk brook
# short snow bot#1446

I would usually prefer not to because it messes with the "Mark as viewed" stuff in GitHub. Usually it's fine to just squash when merging.

vocal wolf
#

@vale ibex oh no don't say that

#

you said those words

#

"It should just work"

#

you've cursed us

short snow
#

what the heck did just happen lemon_enraged

#

nice, thankyou very much

#

task test

#

git merge upstream/main and that happened

vocal wolf
#

@vale ibex notion embed how

#

yeah I got it before

#

now it ain't there wack

short snow
#

gimme a minute, i reset it to my branch, doing it again (correctly)

clever wraith
#

Is there any tutorial for the 2.0 stuff?

#

i've found the docs for it, but that just describes the api

green oriole
#

not that we know

#

gotta :rtfm:

vale ibex
#

Yea, most of my learning was stumbling through the docs ๐Ÿ˜ฆ

short snow
#

I just go through the release diff

short snow
vocal wolf
#

@vale ibex nooooo you can't say thaaaaaaaaaat

Also: My triage report is 1/3 done.

vale ibex
#

I've forgotten the context already lol

vocal wolf
#

"It should just work"

vale ibex
#

ah ๐Ÿ˜„

vocal wolf
#

If you tell me to worry I'm going to worry more

#

false

vale ibex
#

False*

vocal wolf
#

sorry I've been doing too much rust lately

vale ibex
#

lol

vocal wolf
#

I'm a bit rusty on python, if you will

vale ibex
#

blasphemy

vocal wolf
#

@green oriole oof

#

precommit

#

bottom is travis

#

precommit is an actual ci system what you mean

vale ibex
#

!help tmute

stable mountainBOT
#
Query "tmute" not found.

Did you mean:
mute
tempmute
unmute
time

vale ibex
#

!help mute

stable mountainBOT
#
Command Help

!tempmute <user> [duration] [reason]
Can also use: mute

*Temporarily mute a user for the given reason and duration.

A unit of time should be appended to the duration.
Units (โˆ—case-sensitive):
โ€ƒy - years
โ€ƒm - monthsโˆ—
โ€ƒw - weeks
โ€ƒd - days
โ€ƒh - hours
โ€ƒM - minutesโˆ—
โ€ƒs - seconds

Alternatively, an ISO 8601 timestamp can be provided for the duration.

If no duration is given, a one hour duration is used by default.*

vale ibex
#

!help eval

stable mountainBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

vale ibex
#

before

#

!help mute

stable mountainBOT
#
Command Help

!tempmute <user> [duration] [reason]
Can also use: mute

*Temporarily mute a user for the given reason and duration.

A unit of time should be appended to the duration. Units (โˆ—case-sensitive):
โ€ƒy - years
โ€ƒm - monthsโˆ—
โ€ƒw - weeks
โ€ƒd - days
โ€ƒh - hours
โ€ƒM - minutesโˆ—
โ€ƒs - seconds

Alternatively, an ISO 8601 timestamp can be provided for the duration.

If no duration is given, a one hour duration is used by default.*

vale ibex
#

!help eval

stable mountainBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*

vale ibex
#

after

#

much better

short snow
#

@cold island should be fixed now, was probably me resolving before I pushed the commit and then doing something. I Will keep that in mind now ๐Ÿ‘

timid sentinel
#

Since we're on a merging spree, bot#1795 and bot#1863 are there if anyone is looking for a review ๐Ÿ˜„

fervent sage
#

i just reviewed one without seeing this

#

amazing timing

timid sentinel
#

lmao, perfect timing

#

also thanks

vocal wolf
#

@timid sentinel squashing

timid sentinel
#

๐Ÿ‘

#

jumping in with the merge

fervent sage
#

yo what http_session.get(doc_item.url, raise_for_status=True) i never knew that was a valid kwarg

#

nice

#

raises an exception for 4xx and 5xx status codes

vocal wolf
#

oh my god

#

Sir lance has more PRs open than bot

#

impossible

#

yes

#

at this point I have no idea if that's a joke

#

or they were actually serious

fervent sage
#

tell me you use discord too much without saying you use discord too much:

vocal wolf
#

yeah

#

there's only one way

#

pog 2 cakes

#

jesus

#

12 PRs now

#

28 to 12 in a week

#

my god

fervent sage
#

doesnt feel real does it

vocal wolf
#

can we beat the record low of 11

fervent sage
#

when you wake up from this dream xith you're gonna be so depressed

vocal wolf
#

no I know this is real because I'm eating cereal at 3am

fervent sage
#

oh

#

fair

timid sentinel
#

I have no voice at the moment but hey @green oriole @vale ibex :D

fervent sage
#

i miss eating cereal at 3am

#

how long until bot#1446 gets merged KEKW

dusky shoreBOT
short snow
vocal wolf
short snow
green oriole
short snow
#

(i mentioned bluenix's reviews rn btw)

green oriole
cold moon
#

Do we have Merge Sunday?

green oriole
#

apparently haha

vale ibex
#

Jus to give xith the minimum amount of time for his triage update ๐Ÿ˜„

cold moon
#

Let's do this monthly

fervent sage
#

the meeting is just gonna be a triage update at this point

green oriole
#

twiiter DM to pycares

brisk brook
vocal wolf
#

I do hope I wake up in time for the meeting

#

because it's currently 3am and the meeting is in like 8 hours

fervent sage
#

go

#

bed

cold island
fervent sage
#

now

vocal wolf
#

no I'm having fun

brisk brook
vocal wolf
#

3:07am @green oriole