forked from pool/python-pylint
- update to 2.17.2:
* invalid-name now allows for integers in typealias names: * now valid: Good2Name, GoodName2. * still invalid: _1BadName. * No longer consider Union as type annotation as type alias for naming checks. * unnecessary-lambda no longer warns on lambdas which use its parameters in their body (other than the final arguments), e.g. lambda foo: (bar if foo else baz)(foo). * Fix a crash in pyreverse when "/" characters are used in the output filename e.g pyreverse -o png -p name/ path/to/project. * Add new option (--show-stdlib, -L) to pyreverse. * This is similar to the behavior of --show-builtin in that standard library modules are now not included by default, and this option will include them. * Adds asyncSetUp to the default defining-attr-methods list to silence * attribute-defined-outside-init warning when using * unittest.IsolatedAsyncioTestCase. * invalid-name now allows for integers in typealias names: * now valid: Good2Name, GoodName2. * still invalid: _1BadName. * No longer consider Union as type annotation as type alias for naming checks. * unnecessary-lambda no longer warns on lambdas which use its parameters in their body (other than the final arguments), e.g. lambda foo: (bar if foo else baz)(foo). * --clear-cache-post-run now also clears LRU caches for OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=143
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ba0be22b01f1e2b2abab33c72496e3194942307d2d89567d0363db858ab3c858
|
|
||||||
size 1321574
|
|
3
pylint-2.17.2-gh.tar.gz
Normal file
3
pylint-2.17.2-gh.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4e1052a2cf2d9c3098382e395519abaa3ebec8d5b749cad8d249cccb799adb05
|
||||||
|
size 1408818
|
@@ -1,59 +0,0 @@
|
|||||||
diff --git a/tests/testutils/test_testutils_utils.py b/tests/testutils/test_testutils_utils.py
|
|
||||||
index 79f4e2a81..943a3479e 100644
|
|
||||||
--- a/tests/testutils/test_testutils_utils.py
|
|
||||||
+++ b/tests/testutils/test_testutils_utils.py
|
|
||||||
@@ -6,6 +6,8 @@ import os
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
+import pytest
|
|
||||||
+
|
|
||||||
from pylint.testutils.utils import _test_cwd, _test_environ_pythonpath, _test_sys_path
|
|
||||||
|
|
||||||
|
|
||||||
@@ -50,22 +52,27 @@ def test__test_cwd(tmp_path: Path) -> None:
|
|
||||||
assert os.getcwd() == cwd
|
|
||||||
|
|
||||||
|
|
||||||
-def test__test_environ_pythonpath_no_arg() -> None:
|
|
||||||
- python_path = os.environ.get("PYTHONPATH")
|
|
||||||
- with _test_environ_pythonpath():
|
|
||||||
- assert os.environ.get("PYTHONPATH") == python_path
|
|
||||||
- new_pythonpath = "./whatever/:"
|
|
||||||
- os.environ["PYTHONPATH"] = new_pythonpath
|
|
||||||
- assert os.environ.get("PYTHONPATH") == new_pythonpath
|
|
||||||
- assert os.environ.get("PYTHONPATH") == python_path
|
|
||||||
-
|
|
||||||
+@pytest.mark.parametrize("old_pythonpath", ["./oldpath/:", None])
|
|
||||||
+def test__test_environ_pythonpath_no_arg(old_pythonpath: str) -> None:
|
|
||||||
+ real_pythonpath = os.environ.get("PYTHONPATH")
|
|
||||||
+ with _test_environ_pythonpath(old_pythonpath):
|
|
||||||
+ with _test_environ_pythonpath():
|
|
||||||
+ assert os.environ.get("PYTHONPATH") is None
|
|
||||||
+ new_pythonpath = "./whatever/:"
|
|
||||||
+ os.environ["PYTHONPATH"] = new_pythonpath
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == new_pythonpath
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == old_pythonpath
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == real_pythonpath
|
|
||||||
|
|
||||||
-def test__test_environ_pythonpath() -> None:
|
|
||||||
- python_path = os.environ.get("PYTHONPATH")
|
|
||||||
- new_pythonpath = "./whatever/:"
|
|
||||||
- with _test_environ_pythonpath(new_pythonpath):
|
|
||||||
- assert os.environ.get("PYTHONPATH") == new_pythonpath
|
|
||||||
- newer_pythonpath = "./something_else/:"
|
|
||||||
- os.environ["PYTHONPATH"] = newer_pythonpath
|
|
||||||
- assert os.environ.get("PYTHONPATH") == newer_pythonpath
|
|
||||||
- assert os.environ.get("PYTHONPATH") == python_path
|
|
||||||
+@ pytest.mark.parametrize("old_pythonpath", ["./oldpath/:", None])
|
|
||||||
+def test__test_environ_pythonpath(old_pythonpath: str) -> None:
|
|
||||||
+ real_pythonpath = os.environ.get("PYTHONPATH")
|
|
||||||
+ with _test_environ_pythonpath(old_pythonpath):
|
|
||||||
+ new_pythonpath = "./whatever/:"
|
|
||||||
+ with _test_environ_pythonpath(new_pythonpath):
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == new_pythonpath
|
|
||||||
+ newer_pythonpath = "./something_else/:"
|
|
||||||
+ os.environ["PYTHONPATH"] = newer_pythonpath
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == newer_pythonpath
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == old_pythonpath
|
|
||||||
+ assert os.environ.get("PYTHONPATH") == real_pythonpath
|
|
@@ -1,3 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 17 19:33:08 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 2.17.2:
|
||||||
|
* invalid-name now allows for integers in typealias
|
||||||
|
names:
|
||||||
|
* now valid: Good2Name, GoodName2.
|
||||||
|
* still invalid: _1BadName.
|
||||||
|
* No longer consider Union as type annotation as type alias
|
||||||
|
for naming checks.
|
||||||
|
* unnecessary-lambda no longer warns on lambdas which use
|
||||||
|
its parameters in their body (other than the final arguments),
|
||||||
|
e.g. lambda foo: (bar if foo else baz)(foo).
|
||||||
|
* Fix a crash in pyreverse when "/" characters are used in the
|
||||||
|
output filename e.g pyreverse -o png -p name/ path/to/project.
|
||||||
|
* Add new option (--show-stdlib, -L) to pyreverse.
|
||||||
|
* This is similar to the behavior of --show-builtin in that
|
||||||
|
standard library modules are now not included by default,
|
||||||
|
and this option will include them.
|
||||||
|
* Adds asyncSetUp to the default defining-attr-methods
|
||||||
|
list to silence
|
||||||
|
* attribute-defined-outside-init warning when using
|
||||||
|
* unittest.IsolatedAsyncioTestCase.
|
||||||
|
* invalid-name now allows for integers in typealias
|
||||||
|
names:
|
||||||
|
* now valid: Good2Name, GoodName2.
|
||||||
|
* still invalid: _1BadName.
|
||||||
|
* No longer consider Union as type annotation as type alias
|
||||||
|
for naming checks.
|
||||||
|
* unnecessary-lambda no longer warns on lambdas which use
|
||||||
|
its parameters in their body (other than the final arguments),
|
||||||
|
e.g. lambda foo: (bar if foo else baz)(foo).
|
||||||
|
* --clear-cache-post-run now also clears LRU caches for
|
||||||
|
pylint utilities holding references to AST nodes.
|
||||||
|
* Fix a crash when TYPE_CHECKING is used without importing
|
||||||
|
it.
|
||||||
|
* Fix a used-before-assignment false positive when imports
|
||||||
|
are made under the TYPE_CHECKING else if branch.
|
||||||
|
* Fix a regression of preferred-modules where a partial
|
||||||
|
match was used instead of the required full match.
|
||||||
|
- drop pylint-pr7367-pythonpathtest.patch (upstream)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 9 11:54:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Mon Jan 9 11:54:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
Name: python-pylint
|
Name: python-pylint
|
||||||
Version: 2.15.10
|
Version: 2.17.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Syntax and style checker for Python code
|
Summary: Syntax and style checker for Python code
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
@@ -26,8 +26,6 @@ Group: Development/Languages/Python
|
|||||||
URL: https://github.com/pycqa/pylint
|
URL: https://github.com/pycqa/pylint
|
||||||
# Tests are no longer packaged in the PyPI sdist, use GitHub archive
|
# Tests are no longer packaged in the PyPI sdist, use GitHub archive
|
||||||
Source: https://github.com/PyCQA/pylint/archive/refs/tags/v%{version}.tar.gz#/pylint-%{version}-gh.tar.gz
|
Source: https://github.com/PyCQA/pylint/archive/refs/tags/v%{version}.tar.gz#/pylint-%{version}-gh.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM gh#PyCQA/pylint#7367
|
|
||||||
Patch0: pylint-pr7367-pythonpathtest.patch
|
|
||||||
BuildRequires: %{python_module base >= 3.7.2}
|
BuildRequires: %{python_module base >= 3.7.2}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@@ -37,7 +35,7 @@ BuildRequires: python-rpm-macros
|
|||||||
Requires: python-dill >= 0.3.6
|
Requires: python-dill >= 0.3.6
|
||||||
Requires: python-platformdirs >= 2.2
|
Requires: python-platformdirs >= 2.2
|
||||||
Requires: python-tomlkit >= 0.10.1
|
Requires: python-tomlkit >= 0.10.1
|
||||||
Requires: (python-astroid >= 2.12.13 with python-astroid < 2.14.0~dev0)
|
Requires: (python-astroid >= 2.15.2 with python-astroid < 2.17.0~dev0)
|
||||||
Requires: (python-isort >= 4.2.5 with python-isort < 6)
|
Requires: (python-isort >= 4.2.5 with python-isort < 6)
|
||||||
Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8)
|
Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8)
|
||||||
%if 0%{?python_version_nodots} < 311
|
%if 0%{?python_version_nodots} < 311
|
||||||
@@ -48,7 +46,7 @@ Requires: python-typing-extensions >= 3.10
|
|||||||
%endif
|
%endif
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
# SECTION pylint deps
|
# SECTION pylint deps
|
||||||
BuildRequires: %{python_module astroid >= 2.12.13 with %python-astroid < 2.14.0~dev0}
|
BuildRequires: %{python_module astroid >= 2.15.2 with %python-astroid < 2.17.0~dev0}
|
||||||
BuildRequires: %{python_module dill >= 0.3.6}
|
BuildRequires: %{python_module dill >= 0.3.6}
|
||||||
BuildRequires: %{python_module isort >= 4.2.5 with %python-isort < 6}
|
BuildRequires: %{python_module isort >= 4.2.5 with %python-isort < 6}
|
||||||
BuildRequires: %{python_module mccabe >= 0.6 with %python-mccabe < 0.8}
|
BuildRequires: %{python_module mccabe >= 0.6 with %python-mccabe < 0.8}
|
||||||
|
Reference in New Issue
Block a user