Skip to content

Commit a310ef6

Browse files
committed
0.1.4
1 parent c9e1392 commit a310ef6

File tree

9 files changed

+15
-21
lines changed

9 files changed

+15
-21
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "cedarscript_editor"
7-
version = "0.1.2"
7+
version = "0.1.4"
88
description = "A library for executing CEDARScript, a SQL-like language for code analysis and transformations"
99
readme = "README.md"
1010
authors = [{ name = "Elifarley", email = "[email protected]" }]
@@ -58,7 +58,7 @@ namespaces = false
5858

5959
[tool.black]
6060
line-length = 100
61-
target-version = ['py310', 'py311', 'py312']
61+
target-version = ['py312']
6262

6363
[tool.isort]
6464
profile = "black"

src/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/cedarscript_editor/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from .cedar_editor_java import JavaCedarEditor
2-
from .cedar_editor_kotlin import KotlinCedarEditor
3-
from .cedar_editor_python import PythonCedarEditor
1+
from cedarscript_editor.cedarscript_editor_java import JavaCEDARScriptEditor
2+
from cedarscript_editor.cedarscript_editor_kotlin import KotlinCEDARScriptEditor
3+
from cedarscript_editor.cedarscript_editor_python import PythonCEDARScriptEditor
44

5-
__all__ = ["JavaCedarEditor", "KotlinCedarEditor", "PythonCedarEditor"]
5+
__all__ = ["JavaCEDARScriptEditor", "KotlinCEDARScriptEditor", "PythonCEDARScriptEditor"]

src/cedar_editor_base.py renamed to src/cedarscript_editor/cedarscript_editor_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
normalize_indent, write_file, read_file, bow_to_search_range, \
99
FunctionBoundaries, SearchRange, analyze_indentation, IndentationInfo
1010

11-
class CedarEditorException(Exception):
11+
class CEDARScriptEditorException(Exception):
1212
def __init__(self, command_ordinal: int, description: str):
1313
match command_ordinal:
1414
case 0 | 1:
@@ -51,7 +51,7 @@ def __init__(self, command_ordinal: int, description: str):
5151
)
5252

5353

54-
class CedarEditorBase(ABC):
54+
class CEDARScriptEditorBase(ABC):
5555
def __init__(self, root_path):
5656
self.root_path = os.path.abspath(root_path)
5757
print(f'[{self.__class__}] root: {self.root_path}')
@@ -87,7 +87,7 @@ def apply_commands(self, commands: list[Command]):
8787
print(f'[apply_commands] (command #{i+1}) Failed: {command}')
8888
if isinstance(command, UpdateCommand):
8989
print(f'CMD CONTENT: ***{command.content}***')
90-
raise CedarEditorException(i+1, str(e)) from e
90+
raise CEDARScriptEditorException(i + 1, str(e)) from e
9191
return result
9292

9393
def _update_command(self, cmd: UpdateCommand):

src/cedar_editor_java.py renamed to src/cedarscript_editor/cedarscript_editor_java.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import re
22
import os
3-
from .cedar_editor_base import CedarEditorBase
3+
from .cedarscript_editor_base import CEDARScriptEditorBase
44

5-
class JavaCedarEditor(CedarEditorBase):
5+
class JavaCEDARScriptEditor(CEDARScriptEditorBase):
66
def _find_function(self, lines, function_name):
77
# Java method pattern: [modifiers] [return type] methodName(
88
pattern = re.compile(rf'^\s*(public|protected|private|static|\s) +[\w<>\[\]]+\s+{re.escape(function_name)}\s*\(')

src/cedar_editor_kotlin.py renamed to src/cedarscript_editor/cedarscript_editor_kotlin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
2-
from .cedar_editor_base import CedarEditorBase
2+
from .cedarscript_editor_base import CEDARScriptEditorBase
33

4-
class KotlinCedarEditor(CedarEditorBase):
4+
class KotlinCEDARScriptEditor(CEDARScriptEditorBase):
55
def _find_function(self, lines, function_name):
66
pattern = re.compile(rf'^\s*fun\s+{re.escape(function_name)}\s*[\(<]')
77
for i, line in enumerate(lines):

src/cedar_editor_python.py renamed to src/cedarscript_editor/cedarscript_editor_python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .cedar_editor_base import CedarEditorBase, FunctionBoundaries
1+
from .cedarscript_editor_base import CEDARScriptEditorBase, FunctionBoundaries
22
import rope.base.project
33
from rope.base import libutils, ast
44

@@ -10,7 +10,7 @@ def get_by_offset(obj: list, offset: int):
1010
return obj[offset]
1111
return None
1212

13-
class PythonCedarEditor(CedarEditorBase):
13+
class PythonCEDARScriptEditor(CEDARScriptEditorBase):
1414
"""
1515
A class to handle Python code editing operations.
1616
"""
File renamed without changes.

src/text_editor/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)