Skip to content
Snippets Groups Projects
Commit c4e85c2a authored by Jenkins for Software Heritage's avatar Jenkins for Software Heritage
Browse files

New upstream version 6.6.3

parents 9b7473a0 cd2b4090
No related branches found
Tags debian/upstream/6.6.3
No related merge requests found
Metadata-Version: 2.1
Name: swh.model
Version: 6.6.2
Version: 6.6.3
Summary: Software Heritage data model
Home-page: https://forge.softwareheritage.org/diffusion/DMOD/
Author: Software Heritage developers
......
Metadata-Version: 2.1
Name: swh.model
Version: 6.6.2
Version: 6.6.3
Summary: Software Heritage data model
Home-page: https://forge.softwareheritage.org/diffusion/DMOD/
Author: Software Heritage developers
......
......@@ -18,6 +18,7 @@ pytz
types-python-dateutil
types-pytz
swh.core>=0.3
Click
dulwich
[testing-minimal]
......
......@@ -69,7 +69,9 @@ def swhid_of_file_content(data) -> CoreSWHID:
return object.swhid()
def model_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> Directory:
def model_of_dir(
path: bytes, exclude_patterns: Optional[Iterable[bytes]] = None
) -> Directory:
from swh.model.from_disk import accept_all_directories, ignore_directories_patterns
dir_filter = (
......@@ -81,7 +83,9 @@ def model_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> Direc
return Directory.from_disk(path=path, dir_filter=dir_filter)
def swhid_of_dir(path: bytes, exclude_patterns: Iterable[bytes] = None) -> CoreSWHID:
def swhid_of_dir(
path: bytes, exclude_patterns: Optional[Iterable[bytes]] = None
) -> CoreSWHID:
obj = model_of_dir(path, exclude_patterns)
return obj.swhid()
......
......@@ -59,10 +59,6 @@ Sha1Git = bytes
Sha1 = bytes
KT = TypeVar("KT")
VT = TypeVar("VT")
def hash_repr(h: bytes) -> str:
if h is None:
return "None"
......@@ -71,8 +67,8 @@ def hash_repr(h: bytes) -> str:
def freeze_optional_dict(
d: Union[None, Dict[KT, VT], ImmutableDict[KT, VT]] # type: ignore
) -> Optional[ImmutableDict[KT, VT]]:
d: Union[None, Dict, ImmutableDict]
) -> Optional[ImmutableDict]:
if isinstance(d, dict):
return ImmutableDict(d)
else:
......
[tox]
requires =
tox>4
envlist=black,flake8,mypy,py3-{minimal,full}
[testenv]
......@@ -18,8 +20,8 @@ commands =
skip_install = true
deps = tox
commands =
tox -e py3-full -- {posargs}
tox -e py3-minimal -- {posargs}
tox run -e py3-full -- {posargs}
tox run -e py3-minimal -- {posargs}
[testenv:black]
skip_install = true
......@@ -41,7 +43,7 @@ commands =
extras =
testing
deps =
mypy==0.942
mypy==1.0
commands =
mypy swh
......@@ -49,14 +51,13 @@ commands =
# git HEAD of swh-docs, is executed on CI for each diff to prevent
# breaking doc build
[testenv:sphinx]
whitelist_externals = make
allowlist_externals = make
usedevelop = true
extras =
testing
deps =
# fetch and install swh-docs in develop mode
-e git+https://forge.softwareheritage.org/source/swh-docs#egg=swh.docs
-e git+https://gitlab.softwareheritage.org/swh/devel/swh-docs.git\#egg=swh.docs
setenv =
SWH_PACKAGE_DOC_TOX_BUILD = 1
# turn warnings into errors
......@@ -64,18 +65,16 @@ setenv =
commands =
make -I ../.tox/sphinx/src/swh-docs/swh/ -C docs
# build documentation only inside swh-environment using local state
# of swh-docs package
[testenv:sphinx-dev]
whitelist_externals = make
allowlist_externals = make
usedevelop = true
extras =
testing
deps =
# install swh-docs in develop mode
-e ../swh-docs
setenv =
SWH_PACKAGE_DOC_TOX_BUILD = 1
# turn warnings into errors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment