Skip to content

Commit

Permalink
👹 Feed the hobgoblins (delint).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 23, 2024
1 parent a653be6 commit 2c7d936
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"""

__requires__ = [
'coherent.test',
"coherent.test",
]
23 changes: 12 additions & 11 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@

passthrough_command = app.command(
context_settings={
'allow_extra_args': True,
'ignore_unknown_options': True,
"allow_extra_args": True,
"ignore_unknown_options": True,
},
)


@app.command()
def install(target: pathlib.Path) -> None:
with bootstrap.write_pyproject(target):
subprocess.run([sys.executable, '-m', 'pip', 'install', target])
subprocess.run([sys.executable, "-m", "pip", "install", target])


@passthrough_command
def test() -> None:
del sys.argv[1]
runpy.run_module('coherent.test', run_name='__main__')
runpy.run_module("coherent.test", run_name="__main__")


@passthrough_command
def build() -> None:
del sys.argv[1]
runpy.run_module('coherent.build', run_name='__main__')
runpy.run_module("coherent.build", run_name="__main__")


@app.command(context_settings=dict(allow_extra_args=True))
Expand All @@ -45,21 +45,22 @@ def tag(
repository: Annotated[
Repo,
typer.Option(
'-R', '--repository',
help='Path to repository.',
"-R",
"--repository",
help="Path to repository.",
parser=Repo.detect,
),
] = '.',
] = ".",
) -> None:
if kind_or_name in Versioned.semantic_increment:
name = repository.get_next_version(kind_or_name)
else:
name = kind_or_name
final_name = semver(name)
args = ['-a', final_name, '-m', '', *context.args]
subprocess.run(['git', '-C', repository.location, 'tag', *args], check=True)
args = ["-a", final_name, "-m", "", *context.args]
subprocess.run(["git", "-C", repository.location, "tag", *args], check=True)
print(f"Created tag {final_name}")


if __name__ == '__main__':
if __name__ == "__main__":
app()

0 comments on commit 2c7d936

Please sign in to comment.