Skip to content

Commit

Permalink
Merge fixes for type checker.
Browse files Browse the repository at this point in the history
Closes #24
  • Loading branch information
jaraco committed Aug 21, 2024
2 parents d7343b0 + a770e8c commit 8b7f3af
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jaraco/develop/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shutil
import tempfile

from setuptools._distutils import ccompiler, sysconfig
from setuptools._distutils import ccompiler, sysconfig # type: ignore[import-untyped]

from jaraco.ui.editor import EditableFile

Expand Down
8 changes: 7 additions & 1 deletion jaraco/develop/create-github-release.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import typer
from jaraco.ui.main import main
from typing_extensions import Annotated

from . import github, repo


@main
def run(project: github.Repo = github.Repo.detect()):
def run(
project: Annotated[
github.Repo, typer.Option(parser=github.Repo)
] = github.Repo.detect(),
):
md = repo.get_project_metadata()
project.create_release(tag=f'v{md.version}')
5 changes: 2 additions & 3 deletions jaraco/develop/projects-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import functools
import subprocess
from typing import List, cast
from typing import List

import typer
from typing_extensions import Annotated
Expand All @@ -31,10 +31,9 @@ def run(
*,
ctx: typer.Context,
):
cmd = cast(List[str], ctx.args)
selectors = filters.Selectors(tag + keyword)
for project in filter(selectors, git.projects()):
print(project, flush=True)
with git.temp_checkout(project, quiet=True):
subprocess.Popen(cmd).wait()
subprocess.Popen(ctx.args).wait()
print(flush=True)
28 changes: 28 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,31 @@ explicit_package_bases = True

# Disable overload-overlap due to many false-positives
disable_error_code = overload-overlap

# jaraco/jaraco.ui#4
[mypy-jaraco.ui.*]
ignore_missing_imports = True

# jaraco/jaraco.text#17
[mypy-jaraco.text.*]
ignore_missing_imports = True

# jaraco/jaraco.packaging#20
[mypy-jaraco.packaging.*]
ignore_missing_imports = True

# jaraco/jaraco.vcs#40
[mypy-jaraco.vcs.*]
ignore_missing_imports = True

# jaraco/jaraco.versioning#3
[mypy-jaraco.versioning.*]
ignore_missing_imports = True

# requests/toolbelt#279
[mypy-requests_toolbelt]
ignore_missing_imports = True

# dashea/requests-file#40
[mypy-requests_file]
ignore_missing_imports = True
1 change: 1 addition & 0 deletions newsfragments/23.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue in create-github-release with typer usage.

0 comments on commit 8b7f3af

Please sign in to comment.