Skip to content

Commit

Permalink
Pass mypy and link issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Aug 26, 2024
1 parent 34c78d0 commit c40d947
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 11 deletions.
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 @@ -12,3 +12,34 @@ explicit_package_bases = True

# Disable overload-overlap due to many false-positives
disable_error_code = 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
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,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

0 comments on commit c40d947

Please sign in to comment.