Skip to content

Conversation

@Avasam
Copy link
Contributor

@Avasam Avasam commented Nov 8, 2024

(based on #339, so merge that one first) Done

I added PYI to Ruff's select. https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
Ignored PYI021 to deal with it in its own PR
Then run ruff check --fix --preview: Found 1700 errors (1074 fixed, 626 remaining).
Then ignore the checks still failing to keep this PR to automated fixes only. (because Ruff has no config to set as warning: astral-sh/ruff#1256)

Note that flake8-future-annotations (FA) was already passing on main, so I just included it.

@Avasam Avasam force-pushed the apply-flake8-pyi-autofixes branch 3 times, most recently from 75fc33c to 4f2c818 Compare November 10, 2024 19:40
@Avasam Avasam marked this pull request as ready for review November 10, 2024 19:40
@Avasam Avasam force-pushed the apply-flake8-pyi-autofixes branch 4 times, most recently from 9f58676 to 43de54a Compare November 22, 2024 19:07
pyproject.toml Outdated
Comment on lines 45 to 57
# TODO: Handle in its own PR
"PYI021", # https://github.com/microsoft/python-type-stubs/pull/343

# TODO: Investigate and fix or configure
"PYI001",
"PYI002",
"PYI017",
"PYI019", # Request for more autofixes: https://github.com/astral-sh/ruff/issues/14183
"PYI024",
"PYI048",
"PYI051", # Request for autofix: https://github.com/astral-sh/ruff/issues/14185
"PYI052",
"PYI061", # Request for more autofixes: https://github.com/astral-sh/ruff/issues/14537
Copy link
Contributor Author

@Avasam Avasam Nov 22, 2024

@Avasam Avasam force-pushed the apply-flake8-pyi-autofixes branch from 258163f to f5a01ef Compare January 29, 2025 00:13
Copy link
Contributor

@debonte debonte left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. I've been off work for a couple months for medical reasons. I'll try to get these PRs all reviewed over the next 2-3 days.

def __init__(self, shorthand_name: str = ...) -> None: ...
if DEBUG:
def __str__(self) -> str: ...
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe remove the if DEBUG: block entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Funnily enough, that's also done in #352 , but yeah I'll remove the condition entirely.

I've been off work for a couple months for medical reasons

I hope you're doing alright now! Good to have you back.

@Avasam Avasam requested a review from debonte January 30, 2025 02:28
@debonte debonte merged commit 5ef1657 into microsoft:main Jan 30, 2025
3 checks passed
@Avasam Avasam deleted the apply-flake8-pyi-autofixes branch January 30, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants