Skip to content

Commit dc9675b

Browse files
nicolasmorinirjarry
authored andcommitted
Fix Makefile and tox configuration
* Adapt to target branch "libyang1" of libyang dependency * Address two new pylint warnings when using latest pylint's version (2.10.2)
1 parent c22f10a commit dc9675b

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ jobs:
3838
- python: pypy3
3939
toxenv: pypy3
4040
- python: 3.x
41-
toxenv: py3-master
42-
- python: 3.x
43-
toxenv: py3-devel
41+
toxenv: py3-libyang1
4442
steps:
4543
- uses: actions/checkout@v2
4644
- uses: actions/setup-python@v2

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ lint:
77
tox -e lint
88

99
tests:
10-
tox -e py3-devel
10+
tox -e py3-libyang1
1111

1212
format:
1313
tox -e format

cffi/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
HERE = os.path.dirname(__file__)
1212

1313
BUILDER = cffi.FFI()
14-
with open(os.path.join(HERE, "cdefs.h")) as f:
14+
with open(os.path.join(HERE, "cdefs.h"), encoding="utf-8") as f:
1515
BUILDER.cdef(f.read())
1616

1717

@@ -30,7 +30,7 @@ def search_paths(env_var: str) -> List[str]:
3030
EXTRA_CFLAGS += shlex.split(os.environ.get("LIBYANG_EXTRA_CFLAGS", ""))
3131
EXTRA_LDFLAGS = shlex.split(os.environ.get("LIBYANG_EXTRA_LDFLAGS", ""))
3232

33-
with open(os.path.join(HERE, "source.c")) as f:
33+
with open(os.path.join(HERE, "source.c"), encoding="utf-8") as f:
3434
BUILDER.set_source(
3535
"_libyang",
3636
f.read(),

libyang/keyed_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __deepcopy__(self, memo) -> "KeyedList":
140140
return k
141141

142142
# unsupported list API methods
143-
def __unsupported(self, *args, **kwargs):
143+
def __unsupported(self, *args, **kwargs): # pylint: disable=unused-private-member
144144
raise TypeError("unsupported operation for non-ordered lists")
145145

146146
index = __unsupported

tox-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ download()
3232
# build and install libyang into the virtualenv
3333
src="${LIBYANG_SRC:-$venv/.src}"
3434
if ! [ -d "$src" ]; then
35-
libyang_branch="${LIBYANG_BRANCH:-devel}"
35+
libyang_branch="${LIBYANG_BRANCH:-libyang1}"
3636
download "https://github.com/CESNET/libyang" "$libyang_branch" "$src"
3737
fi
3838

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = format,lint,py{35,36,37,38,py3},py3-{master,devel},coverage
2+
envlist = format,lint,py{35,36,37,38,py3},py3-libyang1,coverage
33
skip_missing_interpreters = true
44
isolated_build = true
55
distdir = {toxinidir}/dist
@@ -11,8 +11,7 @@ basepython = python3
1111
description = Compile extension and run tests against {envname}.
1212
changedir = tests/
1313
setenv =
14-
master: LIBYANG_BRANCH=master
15-
devel: LIBYANG_BRANCH=devel
14+
libyang1: LIBYANG_BRANCH=libyang1
1615
install_command = {toxinidir}/tox-install.sh {envdir} {opts} {packages}
1716
commands = python -Wd -m unittest discover -c
1817

0 commit comments

Comments
 (0)