Skip to content

Commit 10f45f7

Browse files
committed
Add tool to update __init__.py everywhere
1 parent 2c8f824 commit 10f45f7

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

devtools/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ def develop(ctx: Context):
4646
project.develop()
4747

4848

49+
@main.command()
50+
@click.pass_obj
51+
def update_init(ctx: Context):
52+
"""Update __init__.py in all projects"""
53+
for project in ctx.subprojects.values():
54+
project.update_init()
55+
56+
4957
@main.command()
5058
@click.pass_obj
5159
def test(ctx: Context):

devtools/subproject.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ def develop(self):
5959
cwd=self.path,
6060
)
6161

62+
def update_init(self):
63+
self._cmd(
64+
sys.executable,
65+
"setup.py",
66+
"update_init",
67+
cwd=self.path,
68+
)
69+
6270
def test(self, *, install_requirements=False):
6371
tests_path = self.path / "tests"
6472
if install_requirements:

subprojects/robotpy-wpiutil/wpiutil/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Sendable,
99
SendableBuilder,
1010
SendableRegistry,
11+
TimestampSource,
1112
getStackTrace,
1213
getStackTraceDefault,
1314
)
@@ -19,6 +20,7 @@
1920
"Sendable",
2021
"SendableBuilder",
2122
"SendableRegistry",
23+
"TimestampSource",
2224
"getStackTrace",
2325
"getStackTraceDefault",
2426
]

0 commit comments

Comments
 (0)