Skip to content

Commit 8edc54e

Browse files
committed
💥 Use async functions
1 parent 3a773a7 commit 8edc54e

File tree

17 files changed

+65
-116
lines changed

17 files changed

+65
-116
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ program:
138138

139139
```python
140140
from repl_python_wakatime.backends.wakatime import Wakatime
141+
from repl_python_wakatime.frontends import Repl
141142

143+
repl = Repl(Wakatime(language="translate-shell", category="translating"))
142144
# after each translating
143-
Wakatime(language="translate-shell", category="translating")()
145+
repl()
144146
```
145147

146148
## Similar projects

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"sphinx.ext.viewcode",
2727
"myst_parser",
2828
"sphinxcontrib.autofile",
29-
"sphinxcontrib.requirements_txt",
3029
]
3130

3231
myst_heading_anchors = 3

docs/resources/requirements.md

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

pyproject.toml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,12 @@ Source = "https://github.com/wakatime/repl-python-wakatime"
4242
[tool.setuptools.package-data]
4343
repl_python_wakatime = ["py.typed", "assets/*"]
4444

45-
# begin: scripts/generate-pyproject.toml.pl
46-
[tool.setuptools.dynamic.optional-dependencies.dev]
47-
file = "requirements/dev.txt"
48-
49-
[tool.setuptools.dynamic.optional-dependencies.ipython]
50-
file = "requirements/ipython.txt"
51-
52-
[tool.setuptools.dynamic.optional-dependencies.keyring]
53-
file = "requirements/keyring.txt"
54-
55-
[tool.setuptools.dynamic.optional-dependencies.ptipython]
56-
file = "requirements/ptipython.txt"
57-
58-
[tool.setuptools.dynamic.optional-dependencies.ptpython]
59-
file = "requirements/ptpython.txt"
60-
# end: scripts/generate-pyproject.toml.pl
45+
[tool.setuptools.dynamic.optional-dependencies]
46+
dev = ["pytest-cov"]
47+
codestats = ["aiohttp", "keyring"]
48+
ipython = ["ipython"]
49+
ptpython = ["ptpython"]
50+
ptipython = ["ptpython[ptipython]"]
6151

6252
[tool.setuptools_scm]
6353
write_to = "src/repl_python_wakatime/_version.py"
@@ -90,7 +80,4 @@ exclude_lines = [
9080
]
9181

9282
[tool.bandit.assert_used]
93-
skips = [
94-
"*_test.py",
95-
"*/test_*.py",
96-
]
83+
skips = ["*_test.py", "*/test_*.py"]

requirements/dev.txt

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

requirements/ipython.txt

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

requirements/keyring.txt

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

requirements/ptipython.txt

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

requirements/ptpython.txt

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

src/repl_python_wakatime/backends/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_project(
6060
def __or__(self, hook: Self) -> "Hook":
6161
return Hook(hooks=(self, hook))
6262

63-
def __call__(self) -> None:
63+
async def __call__(self) -> None:
6464
r"""Run hook"""
6565
for hook in self.hooks:
66-
hook()
66+
await hook()

0 commit comments

Comments
 (0)