Skip to content

Commit 1aa8ef8

Browse files
committed
rename files, update references to them
1 parent 7748d40 commit 1aa8ef8

31 files changed

+59
-59
lines changed

.pre-commit-hooks.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
- id: flake8-trio
3-
name: flake8-trio
4-
entry: flake8-trio
2+
- id: flake8-async
3+
name: flake8-async
4+
entry: flake8-async
55
language: python
66
types: [python]

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tox -p --develop
2525
```
2626

2727
## Meta-tests
28-
To check that all codes are tested and documented there's a test that error codes mentioned in `README.md`, `CHANGELOG.md` (matching `TRIO\d\d\d`), the keys in `flake8_trio.Error_codes` and codes parsed from filenames and files in `tests/eval_files/`, are all equal.
28+
To check that all codes are tested and documented there's a test that error codes mentioned in `README.md`, `CHANGELOG.md` (matching `TRIO\d\d\d`), the keys in `flake8_async.Error_codes` and codes parsed from filenames and files in `tests/eval_files/`, are all equal.
2929

3030
## Test generator
3131
Tests are automatically generated for files in the `tests/eval_files/` directory, with the code that it's testing interpreted from the file name. The file extension is split off, if there's a match for for `_py\d*` it strips that off and uses it to determine if there's a minimum python version for which the test should only run.
@@ -36,7 +36,7 @@ During tests the result of running the checker on the eval file with autofix ena
3636
Files without this marker will be checked that they *don't* modify the file content.
3737

3838
### `error:`
39-
Lines containing `error:` are parsed as expecting an error of the code matching the file name, with everything on the line after the colon `eval`'d and passed as arguments to `flake8_trio.Error_codes[<error_code>].str_format`. The `globals` argument to `eval` contains a `lineno` variable assigned the current line number, and the `flake8_trio.Statement` namedtuple. The first element after `error:` *must* be an integer containing the column where the error on that line originates.
39+
Lines containing `error:` are parsed as expecting an error of the code matching the file name, with everything on the line after the colon `eval`'d and passed as arguments to `flake8_async.Error_codes[<error_code>].str_format`. The `globals` argument to `eval` contains a `lineno` variable assigned the current line number, and the `flake8_async.Statement` namedtuple. The first element after `error:` *must* be an integer containing the column where the error on that line originates.
4040
#### `TRIOxxx:`
4141
You can instead of `error` specify the error code.
4242

@@ -73,6 +73,6 @@ or rote memorization of an arbitrary convention.
7373
We want to ship bigfixes or new features as soon as they're ready,
7474
so our release process is automated:
7575

76-
1. Increment `__version__` in `src/flake8_trio.py`
76+
1. Increment `__version__` in `src/flake8_async.py`
7777
2. Ensure there's a corresponding entry in `CHANGELOG.md` with same version
7878
3. Merge to master, and CI will do the rest!

flake8_trio/__init__.py renamed to flake8_async/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import libcst as cst
2525

2626
from .base import Options, error_has_subidentifier
27-
from .runner import Flake8TrioRunner, Flake8TrioRunner_cst
27+
from .runner import Flake8AsyncRunner, Flake8AsyncRunner_cst
2828
from .visitors import ERROR_CLASSES, ERROR_CLASSES_CST, default_disabled_error_codes
2929

3030
if TYPE_CHECKING:
@@ -75,7 +75,7 @@ def cst_parse_module_native(source: str) -> cst.Module:
7575

7676

7777
def main() -> int:
78-
parser = ArgumentParser(prog="flake8-trio")
78+
parser = ArgumentParser(prog="flake8-async")
7979
Plugin.add_options(parser)
8080
args = parser.parse_args()
8181
Plugin.parse_options(args)
@@ -156,11 +156,11 @@ def run(self) -> Iterable[Error]:
156156
if not self.standalone:
157157
self.options.disable_noqa = True
158158

159-
cst_runner = Flake8TrioRunner_cst(self.options, self.module)
159+
cst_runner = Flake8AsyncRunner_cst(self.options, self.module)
160160
# any noqa'd errors are suppressed upon being generated
161161
yield from cst_runner.run()
162162

163-
problems_ast = Flake8TrioRunner.run(self._tree, self.options)
163+
problems_ast = Flake8AsyncRunner.run(self._tree, self.options)
164164
if self.options.disable_noqa:
165165
yield from problems_ast
166166
return
File renamed without changes.
File renamed without changes.

flake8_trio/runner.py renamed to flake8_async/runner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Contains Flake8TrioRunner.
1+
"""Contains Flake8AsyncRunner.
22
33
The runner is what's run by the Plugin, and handles traversing
44
the AST and letting all registered ERROR_CLASSES do their visit'ing on them.
@@ -26,7 +26,7 @@
2626
from libcst import Module
2727

2828
from .base import Error, Options
29-
from .visitors.flake8triovisitor import Flake8AsyncVisitor, Flake8AsyncVisitor_cst
29+
from .visitors.flake8asyncvisitor import Flake8AsyncVisitor, Flake8AsyncVisitor_cst
3030

3131

3232
@dataclass
@@ -53,7 +53,7 @@ def selected(self, error_codes: Mapping[str, str]) -> bool:
5353
return bool(set(error_codes) & enabled_or_autofix)
5454

5555

56-
class Flake8TrioRunner(ast.NodeVisitor, __CommonRunner):
56+
class Flake8AsyncRunner(ast.NodeVisitor, __CommonRunner):
5757
def __init__(self, options: Options):
5858
super().__init__(options)
5959
# utility visitors that need to run before the error-checking visitors
@@ -110,7 +110,7 @@ def visit(self, node: ast.AST):
110110
subclass.set_state(subclass.outer.pop(node, {}))
111111

112112

113-
class Flake8TrioRunner_cst(__CommonRunner):
113+
class Flake8AsyncRunner_cst(__CommonRunner):
114114
def __init__(self, options: Options, module: Module):
115115
super().__init__(options)
116116
self.options = options

flake8_trio/visitors/__init__.py renamed to flake8_async/visitors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import TYPE_CHECKING
1111

1212
if TYPE_CHECKING:
13-
from .flake8triovisitor import Flake8AsyncVisitor, Flake8AsyncVisitor_cst
13+
from .flake8asyncvisitor import Flake8AsyncVisitor, Flake8AsyncVisitor_cst
1414

1515
__all__ = [
1616
"ERROR_CLASSES",

flake8_trio/visitors/helpers.py renamed to flake8_async/visitors/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
if TYPE_CHECKING:
2626
from collections.abc import Iterable, Iterator, Sequence
2727

28-
from .flake8triovisitor import (
28+
from .flake8asyncvisitor import (
2929
Flake8AsyncVisitor,
3030
Flake8AsyncVisitor_cst,
3131
HasLineCol,

flake8_trio/visitors/visitor100.py renamed to flake8_async/visitors/visitor100.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import libcst as cst
1414
import libcst.matchers as m
1515

16-
from .flake8triovisitor import Flake8AsyncVisitor_cst
16+
from .flake8asyncvisitor import Flake8AsyncVisitor_cst
1717
from .helpers import (
1818
AttributeCall,
1919
error_class_cst,

0 commit comments

Comments
 (0)