Skip to content

Commit f7aaf0b

Browse files
committed
Test pylint issue with collections.abc
Signed-off-by: Andreas Maier <[email protected]>
1 parent b9348a6 commit f7aaf0b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,10 @@ $(bdist_file) $(version_file): pyproject.toml $(dist_dependent_files)
589589
$(done_dir)/pylint_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(pylint_rc_file) $(check_py_files)
590590
@echo "Makefile: Running Pylint"
591591
-$(call RM_FUNC,$@)
592-
pylint $(pylint_opts) --rcfile=$(pylint_rc_file) --output-format=text $(check_py_files)
592+
cat $$(python -c "import collections.abc as m; print(m.__file__)")
593+
cat $$(python -c "import collections as m; print(m.__file__)")
594+
pylint --version
595+
pylint $(pylint_opts) --rcfile=$(pylint_rc_file) --output-format=text zhmcclient/pylint_issue.py
593596
echo "done" >$@
594597
@echo "Makefile: Done running Pylint"
595598

zhmcclient/pylint_issue.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
Reproduce pylint issue
3+
"""
4+
5+
from collections.abc import Mapping
6+
7+
8+
def is_mapping(obj):
9+
"""
10+
Return whether obj is a Mapping
11+
"""
12+
return isinstance(obj, Mapping)

0 commit comments

Comments
 (0)