Skip to content

Update linting#406

Merged
scragly merged 22 commits into
masterfrom
flake8-plugins
Sep 23, 2019
Merged

Update linting#406
scragly merged 22 commits into
masterfrom
flake8-plugins

Conversation

@sco1
Copy link
Copy Markdown
Contributor

@sco1 sco1 commented Sep 11, 2019

Per #384, this PR updates the django branch's linting dependencies & relints the codebase.

To potentially help ease review I've split the diffs into discrete chunks, but can squash them into a single commit if preferable.

Closes: #384

@scragly scragly changed the base branch from django to master September 15, 2019 08:56
@MarkKoz MarkKoz added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: dependencies Related to package dependencies and management a: docs Adds or updates documentation labels Sep 16, 2019
@sco1 sco1 marked this pull request as ready for review September 18, 2019 21:12
Copy link
Copy Markdown
Contributor

@SebastiaanZ SebastiaanZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review, my time's up for now, but I think leaving a partial review speeds up the process with such a large number of changes. I've gone through the files manually and checked the function signatures myself.

Also, why doesn't this cause a linting error? It seems to be missing a return type annotation:
Edit: We've ignored TYP206/classmethod return value annotations.

bot/bot/pagination.py

Lines 303 to 306 in 138567f

@classmethod
async def paginate(cls, pages: List[Tuple[str, str]], ctx: Context, embed: Embed,
prefix: str = "", suffix: str = "", timeout: int = 300,
exception_on_empty_embed: bool = False):

Comment thread bot/decorators.py Outdated
Comment thread bot/decorators.py Outdated
Comment thread bot/decorators.py Outdated
Comment thread bot/decorators.py Outdated
Comment thread bot/decorators.py Outdated
Comment thread bot/pagination.py Outdated
Comment thread bot/pagination.py Outdated
sco1 and others added 4 commits September 19, 2019 05:45
Fix decorator return hints

Co-Authored-By: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
Co-Authored-By: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@SebastiaanZ SebastiaanZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked through all the files now, I think.

This inner-function in bot.cogs.utils does not have a return value annotation, it should be Tuple[str, str]

Comment thread bot/cogs/superstarify/__init__.py
Comment thread bot/cogs/superstarify/__init__.py
Comment thread bot/cogs/cogs.py
Comment thread bot/cogs/doc.py Outdated
Comment thread bot/cogs/doc.py Outdated
Comment thread bot/cogs/security.py Outdated
Comment thread bot/cogs/utils.py Outdated
Comment thread bot/cogs/wolfram.py Outdated
Comment thread bot/decorators.py Outdated
Comment thread bot/utils/__init__.py Outdated
sco1 and others added 2 commits September 19, 2019 08:30
Co-Authored-By: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
Comment thread bot/cogs/eval.py Outdated
Comment thread bot/cogs/eval.py Outdated
Comment thread bot/cogs/eval.py Outdated
Comment thread bot/cogs/eval.py Outdated
@SebastiaanZ
Copy link
Copy Markdown
Contributor

Apparently, I messed a few things during my review; apologies.

Co-Authored-By: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
SebastiaanZ
SebastiaanZ previously approved these changes Sep 19, 2019
@SebastiaanZ SebastiaanZ dismissed their stale review September 19, 2019 17:49

I'm going to look over the code once again to make sure I haven't missed more of those.

Comment thread bot/cogs/eval.py Outdated
Co-Authored-By: Sebastiaan Zeeff <33516116+SebastiaanZ@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@lemonsaurus lemonsaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks phenomenal

Comment thread bot/cogs/superstarify/__init__.py Outdated
Comment thread bot/interpreter.py Outdated
Comment thread bot/utils/messages.py Outdated
Co-Authored-By: Leon Sandøy <leon.haland@gmail.com>
@MarkKoz
Copy link
Copy Markdown
Contributor

MarkKoz commented Sep 22, 2019

I'm currently reviewing this by the way

Comment thread bot/utils/time.py Outdated
Comment thread bot/utils/time.py Outdated
Comment thread bot/utils/scheduling.py Outdated
Comment thread bot/rules/burst.py Outdated
Comment thread bot/rules/burst_shared.py Outdated
Comment thread bot/pagination.py
Comment thread bot/pagination.py Outdated
Comment thread bot/pagination.py
Comment thread bot/cogs/moderation.py
Comment thread bot/cogs/moderation.py
sco1 and others added 2 commits September 22, 2019 19:47
Co-Authored-By: Mark <kozlovmark@gmail.com>
Co-Authored-By: Mark <kozlovmark@gmail.com>
Copy link
Copy Markdown
Contributor

@MarkKoz MarkKoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@scragly scragly merged commit d49befb into master Sep 23, 2019
@scragly scragly deleted the flake8-plugins branch September 23, 2019 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: dependencies Related to package dependencies and management a: docs Adds or updates documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Linting Dependencies

5 participants