diff --git a/jaraco/media/dvd_info.py b/jaraco/media/dvd_info.py index f451dce..c5f5660 100644 --- a/jaraco/media/dvd_info.py +++ b/jaraco/media/dvd_info.py @@ -4,21 +4,17 @@ to Sybren Stüvel, http://stuvel.eu/dvdinfo). ''' +import argparse +import datetime import re import sys -import datetime -import argparse +from importlib import metadata from itertools import count -from subprocess import Popen, PIPE, STDOUT +from subprocess import PIPE, STDOUT, Popen from typing import Set from jaraco.packaging.metadata import extract_author, extract_email, hunt_down_url -try: - from importlib import metadata # type: ignore -except ImportError: - import importlib_metadata as metadata # type: ignore - def banner(): """ diff --git a/jaraco/media/splice.py b/jaraco/media/splice.py index 03ecc9d..c82e936 100644 --- a/jaraco/media/splice.py +++ b/jaraco/media/splice.py @@ -6,7 +6,6 @@ import autocommand - TIME_PRECISION = 2 FFPROBE_FRAME_TIME_OPTION = ["packet=pts_time,flags"] @@ -169,15 +168,15 @@ def TemporaryPath(): @autocommand.autocommand(__name__) def splice_video( - input_file: ( # type: ignore + input_file: ( # type: ignore[syntax] # Consider using Annotated convert_path, "The media file to read in", # noqa: F722 ), - output_file: ( # type: ignore + output_file: ( # type: ignore[syntax] # Consider using Annotated convert_path, "The file to output the edited result to", # noqa: F722 ), - *timestamps_include: ( # type: ignore + *timestamps_include: ( # type: ignore[syntax] # Consider using Annotated split_range, "Start and end timestamps to include in the final video, " # noqa: F722 "in the form HH:MM:SS.ffffff-HH:MM:SS.ffffff or SS.fff-SS.fff", diff --git a/mypy.ini b/mypy.ini index efcb8cb..559f899 100644 --- a/mypy.ini +++ b/mypy.ini @@ -13,3 +13,58 @@ explicit_package_bases = True disable_error_code = # Disable due to many false positives overload-overlap, + +# jaraco/jaraco.itertools#20 +[mypy-jaraco.itertools.*] +ignore_missing_imports = True + +# jaraco/jaraco.packaging#20 +[mypy-jaraco.packaging.*] +ignore_missing_imports = True + +# jaraco/jaraco.path#2 +[mypy-jaraco.path.*] +ignore_missing_imports = True + +# jaraco/jaraco.ui#4 +[mypy-jaraco.ui.*] +ignore_missing_imports = True + +# jaraco/jaraco.windows#26 +[mypy-jaraco.windows.*] +ignore_missing_imports = True + +# jaraco/jaraco.text#17 +[mypy-jaraco.text.*] +ignore_missing_imports = True + +# jaraco/jaraco.net#7 +[mypy-jaraco.net.*] +ignore_missing_imports = True + +# jaraco/tempora#35 +[mypy-tempora.*] +ignore_missing_imports = True + +# cherrypy/cherrypy#1510 +[mypy-cherrypy.*] +ignore_missing_imports = True + +# jaraco/jaraco.develop#20 +# Lucretiel/autocommand#38 +[mypy-autocommand.*] +ignore_missing_imports = True + +# shon/httpagentparser#93 +[mypy-httpagentparser.*] +ignore_missing_imports = True + +# python/typeshed#12595 +[mypy-isapi.install.*] +ignore_missing_imports = True + +# TODO: Raise issue upstream +[mypy-genshi.*] +ignore_missing_imports = True +[mypy-isapi_wsgi.*] +ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 44989a0..3685471 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,7 @@ type = [ "pytest-mypy", # local + "types-pywin32" ] @@ -96,7 +97,3 @@ update-anydvd = "jaraco.media.dvd:update_anydvd" [tool.setuptools_scm] - - -[tool.pytest-enabler.mypy] -# Disabled due to jaraco/skeleton#143