File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 11import click
22
33import idom
4- from idom ._console .rewrite_key_declarations import rewrite_key_declarations
4+ from idom ._console .rewrite_keys import rewrite_keys
55
66
77@click .group ()
@@ -10,7 +10,7 @@ def app() -> None:
1010 pass
1111
1212
13- app .add_command (rewrite_key_declarations )
13+ app .add_command (rewrite_keys )
1414
1515
1616if __name__ == "__main__" :
Original file line number Diff line number Diff line change 2121
2222@click .command ()
2323@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 :
2525 """Rewrite files under the given paths using the new html element API.
2626
2727 The old API required users to pass a dictionary of attributes to html element
Original file line number Diff line number Diff line change 55import pytest
66from click .testing import CliRunner
77
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
129
1310
1411if sys .version_info < (3 , 9 ):
@@ -21,7 +18,7 @@ def test_rewrite_key_declarations(tmp_path):
2118 tempfile : Path = tmp_path / "temp.py"
2219 tempfile .write_text ("html.div(key='test')" )
2320 result = runner .invoke (
24- rewrite_key_declarations ,
21+ rewrite_keys ,
2522 args = [str (tmp_path )],
2623 catch_exceptions = False ,
2724 )
@@ -34,7 +31,7 @@ def test_rewrite_key_declarations_no_files():
3431 runner = CliRunner ()
3532
3633 result = runner .invoke (
37- rewrite_key_declarations ,
34+ rewrite_keys ,
3835 args = ["directory-does-no-exist" ],
3936 catch_exceptions = False ,
4037 )
You can’t perform that action at this time.
0 commit comments