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 #8

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
10 changes: 5 additions & 5 deletions jaraco/net/stats.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import re
import datetime
import itertools
import argparse
import datetime
import importlib
import itertools
import re
import textwrap

from more_itertools import recipes
import dateutil.parser
from more_itertools import recipes


class PingResult:
Expand Down Expand Up @@ -146,7 +146,7 @@ def index(self):
.encode('utf-8')
)

index.exposed = True # type: ignore
index.exposed = True # type: ignore[attr-defined]

def get_images(self):
reader = Reader('ping-results.txt')
Expand Down
2 changes: 1 addition & 1 deletion jaraco/net/tail.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def stop(self):
self.bus.log("Done closing tails")

# need this to be called before server stop (25)
stop.priority = 20 # type: ignore
stop.priority = 20 # type: ignore[attr-defined]

def __hash__(self):
return hash(id(self))
Expand Down
31 changes: 31 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,34 @@ explicit_package_bases = True
disable_error_code =
# Disable due to many false positives
overload-overlap,

# Wait for feedparser 7: https://github.com/kurtmckee/feedparser/issues/373#issuecomment-1578561056
[mypy-feedparser.*]
ignore_missing_imports = True

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

# jaraco/jaraco.logging#6
[mypy-jaraco.logging.*]
ignore_missing_imports = True

# cherrypy/cherrypy#1510
[mypy-cherrypy.*]
ignore_missing_imports = True

# jsonpickle/jsonpickle#441
[mypy-jsonpickle.*]
ignore_missing_imports = True

# jaraco/jaraco.develop#20
# Lucretiel/autocommand#38
[mypy-autocommand.*]
ignore_missing_imports = True

# TODO: Raise issue upstream
[mypy-icmplib.*]
ignore_missing_imports = True
[mypy-ifconfigparser.*]
ignore_missing_imports = True
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ type = [
"pytest-mypy",

# local
"types-httplib2",
"types-pywin32",
]

stats-server = [
Expand Down Expand Up @@ -128,7 +130,3 @@ exclude = [


[tool.setuptools_scm]


[tool.pytest-enabler.mypy]
# Disabled due to jaraco/skeleton#143
2 changes: 1 addition & 1 deletion tests/test_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_importer():
importer.URLImporter.install()
sys.path.append('http://dl.dropbox.com/u/54081/modules/')
try:
import tester
import tester # type: ignore[import-not-found] # Online module

assert tester.echo(True, x=3) == ((True,), dict(x=3))
finally:
Expand Down
Loading