Skip to content

Commit 009f175

Browse files
committed
Replaced sys.path hacks in utils w/ src.* imports
1 parent 008e6c4 commit 009f175

File tree

12 files changed

+18
-30
lines changed

12 files changed

+18
-30
lines changed

get-min-py/utils/bump.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import re, sys
1+
import re
22
from pathlib import Path
33
from types import SimpleNamespace as sn
44

55
from .lib import toml
66

7-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
8-
from get_min_py.cli.lib import data, log
7+
from src.get_min_py.cli.lib import data, log
98

109
paths = sn(root=Path(__file__).parent.parent)
1110
paths.pyproject = paths.root / 'pyproject.toml'

get-min-py/utils/clean.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import shutil, sys
33
from types import SimpleNamespace as sn
44

5-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
6-
from get_min_py.cli.lib import data, log
5+
from src.get_min_py.cli.lib import data, log
76

87
def main():
98
msgs_path = Path(__file__).parent / 'data/messages.json'

is-legacy-terminal/utils/bump.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import re, sys
1+
import re
22
from pathlib import Path
33
from types import SimpleNamespace as sn
44

55
from .lib import toml
66

7-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
8-
from is_legacy_terminal.cli.lib import data, log
7+
from src.is_legacy_terminal.cli.lib import data, log
98

109
paths = sn(root=Path(__file__).parent.parent)
1110
paths.pyproject = paths.root / 'pyproject.toml'

is-legacy-terminal/utils/clean.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import shutil, sys
33
from types import SimpleNamespace as sn
44

5-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
6-
from is_legacy_terminal.cli.lib import data, log
5+
from src.is_legacy_terminal.cli.lib import data, log
76

87
def main():
98
msgs_path = Path(__file__).parent / 'data/messages.json'

is-unicode-supported/utils/bump.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import re, sys
1+
import re
22
from pathlib import Path
33
from types import SimpleNamespace as sn
44

55
from .lib import toml
66

7-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
8-
from is_unicode_supported.cli.lib import data, log
7+
from src.is_unicode_supported.cli.lib import data, log
98

109
paths = sn(root=Path(__file__).parent.parent)
1110
paths.pyproject = paths.root / 'pyproject.toml'

is-unicode-supported/utils/clean.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import shutil, sys
33
from types import SimpleNamespace as sn
44

5-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
6-
from is_unicode_supported.cli.lib import data, log
5+
from src.is_unicode_supported.cli.lib import data, log
76

87
def main():
98
msgs_path = Path(__file__).parent / 'data/messages.json'

remove-json-keys/utils/bump.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import re, sys
1+
import re
22
from pathlib import Path
33
from types import SimpleNamespace as sn
44

55
from .lib import toml
66

7-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
8-
from remove_json_keys.cli.lib import data, log
7+
from src.remove_json_keys.cli.lib import data, log
98

109
paths = sn(root=Path(__file__).parent.parent)
1110
paths.pyproject = paths.root / 'pyproject.toml'

remove-json-keys/utils/clean.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import shutil, sys
33
from types import SimpleNamespace as sn
44

5-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
6-
from remove_json_keys.cli.lib import data, log
5+
from src.remove_json_keys.cli.lib import data, log
76

87
def main():
98
msgs_path = Path(__file__).parent / 'data/messages.json'

sys-lang/utils/bump.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import re, sys
1+
import re
22
from pathlib import Path
33
from types import SimpleNamespace as sn
44

55
from .lib import toml
66

7-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
8-
from sys_lang.cli.lib import data, log
7+
from src.sys_lang.cli.lib import data, log
98

109
paths = sn(root=Path(__file__).parent.parent)
1110
paths.pyproject = paths.root / 'pyproject.toml'

sys-lang/utils/clean.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import shutil, sys
33
from types import SimpleNamespace as sn
44

5-
sys.path.insert(0, str(Path(__file__).parent.parent / 'src')) # to force use local mod
6-
from sys_lang.cli.lib import data, log
5+
from src.sys_lang.cli.lib import data, log
76

87
def main():
98
msgs_path = Path(__file__).parent / 'data/messages.json'

0 commit comments

Comments
 (0)