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

Add pylint missing-await checker #700

Closed
wants to merge 4 commits into from

Conversation

belm0
Copy link
Member

@belm0 belm0 commented Sep 30, 2018

pylint support for #671

TODO:

  • fix async generator false positive
  • tests
  • settle error name(s) and code numbers

This runs fine on trio codebase and my own codebase. I haven't looked hard for false negatives.

Run on trio codebase:

PYTHONPATH=. python3 -m pylint --load-plugins=trio.testing.pylint-missing-await --disable=all --enable=missing-await trio/

@belm0 belm0 force-pushed the pylint_missing_await branch from 3e2552f to 7c84dac Compare September 30, 2018 01:39
@codecov
Copy link

codecov bot commented Sep 30, 2018

Codecov Report

Merging #700 into master will decrease coverage by 0.1%.
The diff coverage is 84.33%.

@@            Coverage Diff             @@
##           master     #700      +/-   ##
==========================================
- Coverage   99.52%   99.42%   -0.11%     
==========================================
  Files         102      105       +3     
  Lines       12192    12272      +80     
  Branches      904      916      +12     
==========================================
+ Hits        12134    12201      +67     
- Misses         36       48      +12     
- Partials       22       23       +1
Impacted Files Coverage Δ
trio/_subprocess_platform/__init__.py 100% <100%> (ø) ⬆️
trio/tests/pylint-expect-message.py 100% <100%> (ø)
trio/_core/tests/test_run.py 100% <100%> (ø) ⬆️
trio/tests/test_pylint_missing_await.py 75% <75%> (ø)
trio/testing/pylint-missing-await.py 82.05% <82.05%> (ø)

@njsmith
Copy link
Member

njsmith commented Sep 30, 2018

It looks like there's a convention of having standalone pylint-{projectname} projects, e.g.:

Maybe we should follow, with a pytest-trio (that would include this, and potentially other lints if we think of any)?

In other news, it looks like py38-dev and astroid have become incompatible, so our CI is currently broken... maybe we should just disable the static analysis tests when sys.version_info.releaselevel != "final"? This isn't the first time we've had trouble with this...

@belm0 belm0 force-pushed the pylint_missing_await branch from 7c84dac to 115d156 Compare February 6, 2019 13:34
@belm0
Copy link
Member Author

belm0 commented Feb 6, 2019

fixed false positive from async generators

@belm0 belm0 force-pushed the pylint_missing_await branch from 115d156 to 5b38a11 Compare February 6, 2019 13:50
@belm0 belm0 force-pushed the pylint_missing_await branch 5 times, most recently from 6b123c5 to 9d5c405 Compare April 14, 2019 06:56
typical usage:
    $ pylint --load-plugins=trio.testing.pylint-missing-await --enable=missing-await DIR/
@belm0 belm0 force-pushed the pylint_missing_await branch 3 times, most recently from c28ec3f to ae3b396 Compare April 14, 2019 08:03
@belm0 belm0 force-pushed the pylint_missing_await branch from ae3b396 to 69fba08 Compare April 14, 2019 08:22
@belm0
Copy link
Member Author

belm0 commented Apr 14, 2019

  • added tests
  • missing-await run against trio code from check.sh

@Fuyukai
Copy link
Member

Fuyukai commented Apr 12, 2024

This is like five years old and the project switched to ruff since. Closing.

@Fuyukai Fuyukai closed this Apr 12, 2024
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.

3 participants