Skip to content

Commit b6e7c78

Browse files
committed
Refactorings
1 parent 99fd7e0 commit b6e7c78

8 files changed

+11
-10
lines changed

pyproject.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ dev = [
4747

4848
[tool.setuptools]
4949
package-dir = {"" = "src"}
50-
py-modules = ["cedarscript_editor"]
50+
py-modules = ["cedarscript_editor", "text_manipulaiton"]
5151

5252
[tool.setuptools.dynamic]
5353
version = {attr = "cedarscript_editor.__version__"}
5454

5555
[tool.setuptools.packages.find]
5656
where = ["src"]
57-
include = ["cedarscript_editor*", "text_editor*", "identifier_selector*", "*identifier_finder*"]
57+
include = ["cedarscript_editor*", "text_editor*", "identifier_selector*", "*identifier_finder*",
58+
"indentation_*", "range_*"]
5859
namespaces = false
5960

6061
[tool.setuptools.package-data]

src/cedarscript_editor/cedarscript_editor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
InsertClause, ReplaceClause, EditingAction, BodyOrWhole, RegionClause, MarkerType
88
from cedarscript_ast_parser.cedarscript_ast_parser import MarkerCompatible, RelativeMarker, \
99
RelativePositionType
10-
from cedarscript_editor.indentation_kit import IndentationInfo
11-
from cedarscript_editor.range_spec import IdentifierBoundaries, RangeSpec
12-
from cedarscript_editor.text_editor_kit import read_file, write_file, bow_to_search_range
10+
from text_manipulation.indentation_kit import IndentationInfo
11+
from text_manipulation.range_spec import IdentifierBoundaries, RangeSpec
12+
from text_manipulation.text_editor_kit import read_file, write_file, bow_to_search_range
1313

1414
from .identifier_selector import select_finder
1515

src/cedarscript_editor/identifier_selector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66

77
from cedarscript_editor.python_identifier_finder import find_python_identifier
8-
from cedarscript_editor.range_spec import IdentifierBoundaries
8+
from text_manipulation.range_spec import IdentifierBoundaries
99

1010
_log = logging.getLogger(__name__)
1111

src/cedarscript_editor/python_identifier_finder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from rope.base import ast, libutils
44
from collections.abc import Sequence
55

6-
from cedarscript_editor.range_spec import IdentifierBoundaries, RangeSpec
7-
from cedarscript_editor.indentation_kit import get_line_indent_count
6+
from text_manipulation.range_spec import IdentifierBoundaries, RangeSpec
7+
from text_manipulation.indentation_kit import get_line_indent_count
88

99

1010
def get_by_offset(obj: Sequence, offset: int):

src/text_manipulation/__init__.py

Whitespace-only changes.

src/cedarscript_editor/range_spec.py renamed to src/text_manipulation/range_spec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import NamedTuple
44

55
from cedarscript_ast_parser import Marker, RelativeMarker, RelativePositionType, MarkerType, BodyOrWhole
6-
from cedarscript_editor.indentation_kit import get_line_indent_count
6+
from text_manipulation.indentation_kit import get_line_indent_count
77

88
MATCH_TYPES = ('exact', 'stripped', 'normalized', 'partial')
99

src/cedarscript_editor/text_editor_kit.py renamed to src/text_manipulation/text_editor_kit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Protocol, runtime_checkable
33

44
from cedarscript_ast_parser import Marker, RelativeMarker, RelativePositionType, Segment, MarkerType, BodyOrWhole
5-
from cedarscript_editor.range_spec import IdentifierBoundaries, RangeSpec
5+
from text_manipulation.range_spec import IdentifierBoundaries, RangeSpec
66

77

88
def read_file(file_path: str) -> str:

0 commit comments

Comments
 (0)