Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update linters 2024 #2588

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Oct 9, 2024

Fixes #2582

Recent VSCode versions were using more recent versions of Pyright which was showing errors. This updates our linter setup.

@mxschmitt mxschmitt force-pushed the update-linters-2024 branch 2 times, most recently from c244cd2 to dd6f218 Compare October 9, 2024 11:51
Copy link
Contributor

@dgozman dgozman left a comment

Choose a reason for hiding this comment

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

IIUC, this has no behavior change for the user, has it?

@@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this one?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hooks which we consume from the pre-commit project - they are not shipped automatically so we specify them like that.

@@ -7,7 +7,7 @@ mypy==1.11.2
objgraph==3.6.1
Pillow==10.4.0
pixelmatch==0.3.0
pre-commit==3.4.0
pre-commit==3.5.0
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this one? Why is it different from the previous file?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is pre-commit - like ESLint - and above are some rules we consume.

@@ -7,7 +7,7 @@ mypy==1.11.2
objgraph==3.6.1
Pillow==10.4.0
pixelmatch==0.3.0
pre-commit==3.4.0
pre-commit==3.5.0
pyOpenSSL==24.2.1
Copy link
Contributor

Choose a reason for hiding this comment

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

This one does not seem to match the previous file either.

Copy link
Member Author

Choose a reason for hiding this comment

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

In both cases the latest version. Seems like its like definitely-typed - so their version can differ.

pythonVersion = "3.8"
reportMissingImports = false
reportTypedDictNotRequiredAccess = false
reportCallInDefaultInitializer = true
reportOptionalSubscript = false
reportUnboundVariable = false
strictParameterNoneValue = false
reportIncompatibleVariableOverride = false
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this one? Do we actually want to enable it?

Copy link
Member Author

Choose a reason for hiding this comment

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

We override self._loop from being Optional to being not Optional. Mypy doesn't allow it anymore after they enabled this setting. Keeping it disabled seems fine for now imo.

setup.cfg Outdated Show resolved Hide resolved
@mxschmitt
Copy link
Member Author

IIUC, this has no behavior change for the user, has it?

no user facing change yes.

@mxschmitt mxschmitt merged commit 5f26616 into microsoft:main Oct 9, 2024
37 of 41 checks passed
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.

[internal] Update to recent Pyright
2 participants