File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
import click
2
2
3
3
import idom
4
- from idom ._console .rewrite_key_declarations import rewrite_key_declarations
4
+ from idom ._console .rewrite_keys import rewrite_keys
5
5
6
6
7
7
@click .group ()
@@ -10,7 +10,7 @@ def app() -> None:
10
10
pass
11
11
12
12
13
- app .add_command (rewrite_key_declarations )
13
+ app .add_command (rewrite_keys )
14
14
15
15
16
16
if __name__ == "__main__" :
Original file line number Diff line number Diff line change 21
21
22
22
@click .command ()
23
23
@click .argument ("paths" , nargs = - 1 , type = click .Path (exists = True ))
24
- def rewrite_key_declarations (paths : list [str ]) -> None :
24
+ def rewrite_keys (paths : list [str ]) -> None :
25
25
"""Rewrite files under the given paths using the new html element API.
26
26
27
27
The old API required users to pass a dictionary of attributes to html element
Original file line number Diff line number Diff line change 5
5
import pytest
6
6
from click .testing import CliRunner
7
7
8
- from idom ._console .rewrite_key_declarations import (
9
- generate_rewrite ,
10
- rewrite_key_declarations ,
11
- )
8
+ from idom ._console .rewrite_keys import generate_rewrite , rewrite_keys
12
9
13
10
14
11
if sys .version_info < (3 , 9 ):
@@ -21,7 +18,7 @@ def test_rewrite_key_declarations(tmp_path):
21
18
tempfile : Path = tmp_path / "temp.py"
22
19
tempfile .write_text ("html.div(key='test')" )
23
20
result = runner .invoke (
24
- rewrite_key_declarations ,
21
+ rewrite_keys ,
25
22
args = [str (tmp_path )],
26
23
catch_exceptions = False ,
27
24
)
@@ -34,7 +31,7 @@ def test_rewrite_key_declarations_no_files():
34
31
runner = CliRunner ()
35
32
36
33
result = runner .invoke (
37
- rewrite_key_declarations ,
34
+ rewrite_keys ,
38
35
args = ["directory-does-no-exist" ],
39
36
catch_exceptions = False ,
40
37
)
You can’t perform that action at this time.
0 commit comments