Skip to content

Commit

Permalink
some typehints are now in external packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Jun 9, 2021
1 parent b43fb2c commit 1ed0ef4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dev: install-dep
dist: dist/${MODULE}-$(VERSION).tar.gz

dist/${MODULE}-$(VERSION).tar.gz: $(SOURCES)
./setup.py sdist bdist_wheel
python setup.py sdist bdist_wheel

## docs : make the docs
docs: FORCE
Expand All @@ -71,7 +71,7 @@ docs: FORCE
## clean : clean up all temporary / machine-generated files
clean: FORCE
rm -f ${MODILE}/*.pyc tests/*.pyc
./setup.py clean --all || true
python setup.py clean --all || true
rm -Rf .coverage
rm -f diff-cover.html

Expand Down Expand Up @@ -199,7 +199,7 @@ release-test: FORCE

release: release-test
. testenv2/bin/activate && \
testenv2/src/${PACKAGE}/setup.py sdist bdist_wheel
python testenv2/src/${PACKAGE}/setup.py sdist bdist_wheel
. testenv2/bin/activate && \
pip install twine && \
twine upload testenv2/src/${PACKAGE}/dist/* && \
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ show_column_numbers = true
show_error_codes = true
pretty = true

# --strict options as of mypy 0.812
# --strict options as of mypy 0.901
warn_unused_configs = True
disallow_any_generics = True
disallow_subclassing_any = True
Expand Down
2 changes: 2 additions & 0 deletions mypy_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
mypy==0.901
types-pkg_resources
types-requests
pytest
2 changes: 1 addition & 1 deletion schema_salad/ref_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pathlib
import re
import tempfile
import urllib
import xml.sax # nosec
from io import StringIO
from typing import (
Expand All @@ -28,7 +29,6 @@
from rdflib.plugins.parsers.notation3 import BadSyntax
from ruamel import yaml
from ruamel.yaml.comments import CommentedMap, CommentedSeq, LineCol
from six.moves import urllib

from .exceptions import SchemaSaladException, ValidationException
from .fetcher import DefaultFetcher
Expand Down
5 changes: 2 additions & 3 deletions typeshed/rdflib/namespace.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from six import text_type
from typing import Any, Optional
from rdflib.term import URIRef
from unicodedata import category

class Namespace(text_type):
class Namespace(str):
__doc__: str = ...
def __new__(cls, value: Any): ...
@property
Expand All @@ -12,7 +11,7 @@ class Namespace(text_type):
def __getitem__(self, key: Any, default: Optional[Any] = ...): ...
def __getattr__(self, name: Any): ...

class URIPattern(text_type):
class URIPattern(str):
__doc__: str = ...
def __new__(cls, value: Any): ...
def __mod__(self, *args: Any, **kwargs: Any): ...
Expand Down

0 comments on commit 1ed0ef4

Please sign in to comment.