flake8-async 24.3.3__tar.gz → 24.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flake8-async-24.3.3 → flake8-async-24.3.4}/CHANGELOG.md +3 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/PKG-INFO +5 -2
- {flake8-async-24.3.3 → flake8-async-24.3.4}/README.md +1 -1
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/__init__.py +1 -1
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitors.py +13 -1
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/PKG-INFO +5 -2
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async110.py +5 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/CONTRIBUTING.md +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/LICENSE +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/MANIFEST.in +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/__main__.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/base.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/runner.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/__init__.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/flake8asyncvisitor.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/helpers.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor100.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor101.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor102.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor103_104.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor105.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor111.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor118.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor2xx.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor91x.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async/visitors/visitor_utility.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/SOURCES.txt +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/dependency_links.txt +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/entry_points.txt +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/not-zip-safe +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/requires.txt +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/flake8_async.egg-info/top_level.txt +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/pyproject.toml +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/setup.cfg +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/setup.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/__init__.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/async100.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/async100_simple_autofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/async910.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/async911.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/async91x_autofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/noqa.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/autofix_files/noqa_testing.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/conftest.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/anyio_trio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async100.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async100_asyncio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async100_noautofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async100_simple_autofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async101.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async102.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async102_anyio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async102_asyncio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async102_trio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async103.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async103_all_imported.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async103_both_imported.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async103_no_104.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async103_trio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async104.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async104_anyio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async104_trio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async105.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async105_anyio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async106.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async109.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async111.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async112.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async113.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async113_anyio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async113_trio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async114.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async115.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async116.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async118.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async200.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async210.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async211.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async212.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async22x.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async22x_asyncio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async232.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async232_asyncio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async23x.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async23x_asyncio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async240.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async250.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async250_multi_library.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async251.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async251_multi_library.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async900.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async910.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async911.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async91x_autofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/async91x_noautofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/no_library.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/noqa.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/noqa_no_autofix.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/noqa_testing.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/eval_files/trio_anyio.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_all_visitors_imported.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_changelog_and_version.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_config_and_args.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_decorator.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_exception_on_invalid_code.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_flake8_async.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_formatting.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/test_messages_documented.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tests/trio_options.py +0 -0
- {flake8-async-24.3.3 → flake8-async-24.3.4}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flake8-async
|
|
3
|
-
Version: 24.3.
|
|
3
|
+
Version: 24.3.4
|
|
4
4
|
Summary: A highly opinionated flake8 plugin for Trio-related problems.
|
|
5
5
|
Home-page: https://github.com/python-trio/flake8-async
|
|
6
6
|
Author: Zac Hatfield-Dodds, John Litborn, and Contributors
|
|
@@ -109,7 +109,7 @@ adding the following to your `.pre-commit-config.yaml`:
|
|
|
109
109
|
minimum_pre_commit_version: '2.9.0'
|
|
110
110
|
repos:
|
|
111
111
|
- repo: https://github.com/python-trio/flake8-async
|
|
112
|
-
rev: 24.3.
|
|
112
|
+
rev: 24.3.4
|
|
113
113
|
hooks:
|
|
114
114
|
- id: flake8-async
|
|
115
115
|
# args: [--enable=ASYNC, --disable=ASYNC9, --autofix=ASYNC]
|
|
@@ -221,6 +221,9 @@ async def my_function():
|
|
|
221
221
|
# Changelog
|
|
222
222
|
*[CalVer, YY.month.patch](https://calver.org/)*
|
|
223
223
|
|
|
224
|
+
## 24.3.4
|
|
225
|
+
- ASYNC110 (don't loop sleep) now also warns if looping `[trio/anyio].lowlevel.checkpoint()`
|
|
226
|
+
|
|
224
227
|
## 24.3.3
|
|
225
228
|
- Add ASYNC251: `time.sleep()` in async method.
|
|
226
229
|
|
|
@@ -84,7 +84,7 @@ adding the following to your `.pre-commit-config.yaml`:
|
|
|
84
84
|
minimum_pre_commit_version: '2.9.0'
|
|
85
85
|
repos:
|
|
86
86
|
- repo: https://github.com/python-trio/flake8-async
|
|
87
|
-
rev: 24.3.
|
|
87
|
+
rev: 24.3.4
|
|
88
88
|
hooks:
|
|
89
89
|
- id: flake8-async
|
|
90
90
|
# args: [--enable=ASYNC, --disable=ASYNC9, --autofix=ASYNC]
|
|
@@ -65,7 +65,19 @@ class Visitor110(Flake8AsyncVisitor):
|
|
|
65
65
|
len(node.body) == 1
|
|
66
66
|
and isinstance(node.body[0], ast.Expr)
|
|
67
67
|
and isinstance(node.body[0].value, ast.Await)
|
|
68
|
-
and
|
|
68
|
+
and (
|
|
69
|
+
get_matching_call(node.body[0].value.value, "sleep", "sleep_until")
|
|
70
|
+
or (
|
|
71
|
+
# get_matching_call doesn't (currently) support checking for trio.x.y
|
|
72
|
+
isinstance(call := node.body[0].value.value, ast.Call)
|
|
73
|
+
and isinstance(call.func, ast.Attribute)
|
|
74
|
+
and call.func.attr == "checkpoint"
|
|
75
|
+
and isinstance(call.func.value, ast.Attribute)
|
|
76
|
+
and call.func.value.attr == "lowlevel"
|
|
77
|
+
and isinstance(call.func.value.value, ast.Name)
|
|
78
|
+
and call.func.value.value.id in ("trio", "anyio")
|
|
79
|
+
)
|
|
80
|
+
)
|
|
69
81
|
):
|
|
70
82
|
self.error(node, self.library_str)
|
|
71
83
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: flake8-async
|
|
3
|
-
Version: 24.3.
|
|
3
|
+
Version: 24.3.4
|
|
4
4
|
Summary: A highly opinionated flake8 plugin for Trio-related problems.
|
|
5
5
|
Home-page: https://github.com/python-trio/flake8-async
|
|
6
6
|
Author: Zac Hatfield-Dodds, John Litborn, and Contributors
|
|
@@ -109,7 +109,7 @@ adding the following to your `.pre-commit-config.yaml`:
|
|
|
109
109
|
minimum_pre_commit_version: '2.9.0'
|
|
110
110
|
repos:
|
|
111
111
|
- repo: https://github.com/python-trio/flake8-async
|
|
112
|
-
rev: 24.3.
|
|
112
|
+
rev: 24.3.4
|
|
113
113
|
hooks:
|
|
114
114
|
- id: flake8-async
|
|
115
115
|
# args: [--enable=ASYNC, --disable=ASYNC9, --autofix=ASYNC]
|
|
@@ -221,6 +221,9 @@ async def my_function():
|
|
|
221
221
|
# Changelog
|
|
222
222
|
*[CalVer, YY.month.patch](https://calver.org/)*
|
|
223
223
|
|
|
224
|
+
## 24.3.4
|
|
225
|
+
- ASYNC110 (don't loop sleep) now also warns if looping `[trio/anyio].lowlevel.checkpoint()`
|
|
226
|
+
|
|
224
227
|
## 24.3.3
|
|
225
228
|
- Add ASYNC251: `time.sleep()` in async method.
|
|
226
229
|
|
|
@@ -69,3 +69,8 @@ async def foo():
|
|
|
69
69
|
|
|
70
70
|
while await trio.sleep():
|
|
71
71
|
...
|
|
72
|
+
|
|
73
|
+
# also error when looping .lowlevel.checkpoint, which is equivalent to .sleep(0)
|
|
74
|
+
# see https://github.com/python-trio/flake8-async/issues/201
|
|
75
|
+
while ...: # ASYNC110: 4, "trio"
|
|
76
|
+
await trio.lowlevel.checkpoint()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|