Skip to content

Commit 4fb5de7

Browse files
committed
Removed autocommand as a dependency
1 parent 10d49b8 commit 4fb5de7

7 files changed

Lines changed: 13 additions & 10 deletions

File tree

jaraco/text/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44
import sys
55
import textwrap
6-
from typing import Iterable
6+
from collections.abc import Iterable
77

88
if sys.version_info >= (3, 9):
99
from importlib.resources import files

jaraco/text/show-newlines.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import autocommand
1+
import sys
2+
23
import inflect
34
from more_itertools import always_iterable
45

@@ -29,4 +30,5 @@ def report_newlines(filename):
2930
)
3031

3132

32-
autocommand.autocommand(__name__)(report_newlines)
33+
if __name__ == "__main__":
34+
report_newlines(*sys.argv[1:])

jaraco/text/strip-prefix.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import sys
22

3-
import autocommand
4-
53
from jaraco.text import Stripper
64

75

@@ -18,4 +16,5 @@ def strip_prefix():
1816
sys.stdout.writelines(Stripper.strip_prefix(sys.stdin).lines)
1917

2018

21-
autocommand.autocommand(__name__)(strip_prefix)
19+
if __name__ == "__main__":
20+
strip_prefix()

jaraco/text/to-dvorak.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
from . import layouts
44

5-
__name__ == '__main__' and layouts._translate_stream(sys.stdin, layouts.to_dvorak)
5+
if __name__ == '__main__':
6+
layouts._translate_stream(sys.stdin, layouts.to_dvorak)

jaraco/text/to-qwerty.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
from . import layouts
44

5-
__name__ == '__main__' and layouts._translate_stream(sys.stdin, layouts.to_qwerty)
5+
if __name__ == '__main__':
6+
layouts._translate_stream(sys.stdin, layouts.to_qwerty)

newsfragments/25.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed ``autocommand`` as a dependency -- by :user:`Avasam`

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ classifiers = [
2323
requires-python = ">=3.9"
2424
license = "MIT"
2525
dependencies = [
26+
'importlib_resources; python_version < "3.9"',
2627
"jaraco.functools",
2728
"jaraco.context >= 4.1",
28-
'importlib_resources; python_version < "3.9"',
29-
"autocommand",
3029
"more_itertools",
3130
]
3231
dynamic = ["version"]

0 commit comments

Comments
 (0)