Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass mypy and link issues #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions jaraco/media/dvd_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
"""
Expand Down
7 changes: 3 additions & 4 deletions jaraco/media/splice.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import autocommand


TIME_PRECISION = 2

FFPROBE_FRAME_TIME_OPTION = ["packet=pts_time,flags"]
Expand Down Expand Up @@ -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",
Expand Down
55 changes: 55 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type = [
"pytest-mypy",

# local
"types-pywin32"
]


Expand All @@ -96,7 +97,3 @@ update-anydvd = "jaraco.media.dvd:update_anydvd"


[tool.setuptools_scm]


[tool.pytest-enabler.mypy]
# Disabled due to jaraco/skeleton#143
Loading