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

Implement pygrep-hooks #980

Closed
5 of 6 tasks
JonathanPlasse opened this issue Dec 1, 2022 · 8 comments · Fixed by #4366
Closed
5 of 6 tasks

Implement pygrep-hooks #980

JonathanPlasse opened this issue Dec 1, 2022 · 8 comments · Fixed by #4366
Labels
good first issue Good for newcomers plugin Implementing a known but unsupported plugin

Comments

@JonathanPlasse
Copy link
Contributor

JonathanPlasse commented Dec 1, 2022

pygrep-hooks

  • python-check-blanket-noqa: Enforce that noqa annotations always occur with specific codes. Sample annotations: # noqa: F401, # noqa: F401,W203
  • python-check-blanket-type-ignore: Enforce that # type: ignore annotations always occur with specific codes. Sample annotations: # type: ignore[attr-defined], # type: ignore[attr-defined, name-defined]
  • python-check-mock-methods: Prevent common mistakes of assert mck.not_called(), assert mck.called_once_with(...) and mck.assert_called.
  • python-no-eval: A quick check for the eval() built-in function
  • python-no-log-warn: A quick check for the deprecated .warn() method of python loggers
  • python-use-type-annotations: Enforce that python3.6+ type annotations are used instead of type comments
@JonathanPlasse
Copy link
Contributor Author

May be tag this issue good first issue.

@charliermarsh charliermarsh added good first issue Good for newcomers rule Implementing or modifying a lint rule labels Dec 1, 2022
@JonathanPlasse
Copy link
Contributor Author

I will implement python-no-eval.

@squiddy
Copy link
Contributor

squiddy commented Dec 15, 2022

I'm working on python-no-log-warn.

squiddy added a commit to squiddy/ruff that referenced this issue Dec 15, 2022
squiddy added a commit to squiddy/ruff that referenced this issue Dec 15, 2022
squiddy added a commit to squiddy/ruff that referenced this issue Dec 17, 2022
squiddy added a commit to squiddy/ruff that referenced this issue Dec 17, 2022
@squiddy
Copy link
Contributor

squiddy commented Dec 17, 2022

Working on python-check-blanket-type-ignore now.

squiddy added a commit to squiddy/ruff that referenced this issue Dec 17, 2022
squiddy added a commit to squiddy/ruff that referenced this issue Dec 18, 2022
squiddy added a commit to squiddy/ruff that referenced this issue Dec 18, 2022
@charliermarsh charliermarsh added plugin Implementing a known but unsupported plugin and removed rule Implementing or modifying a lint rule labels Dec 31, 2022
hmgaudecker added a commit to iza-institute-of-labor-economics/gettsim that referenced this issue Jan 25, 2023
@JonathanPlasse
Copy link
Contributor Author

@finswimmer
Copy link

Hey,

python-use-type-annotations is marked as implemented in the OP. But it isn't, is it? 🤔

fin swimmer

@JonathanPlasse
Copy link
Contributor Author

Hey,

python-use-type-annotations is marked as implemented in the OP. But it isn't, is it? thinking

fin swimmer

It is implemented as PYI033.

@finswimmer
Copy link

It is implemented as PYI033.

Hm, looks like this is only for stub files (.pyi) I cannot get it work for normal python files. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers plugin Implementing a known but unsupported plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants