14
0

- Switch to pyproject macros.

- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vulture?expand=0&rev=28
This commit is contained in:
2025-06-24 02:57:07 +00:00
committed by Git OBS Bridge
commit 22d55b4d7f
6 changed files with 274 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

155
python-vulture.changes Normal file
View File

@@ -0,0 +1,155 @@
-------------------------------------------------------------------
Tue Jun 24 02:55:57 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- No more greedy globs in %files.
-------------------------------------------------------------------
Tue Nov 5 14:17:11 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.13
* Add support for Python 3.13 (Jendrik Seipp, #369).
* Add PyPI and conda-forge badges to README file (Trevor James Smith, #356).
* Include `tests/**/*.toml` in sdist (Colin Watson).
- from version 2.12
* Use `ruff` for linting and formatting (Anh Trinh, #347, #349).
* Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349).
* Add `--config` flag to specify path to pyproject.toml configuration file
(Glen Robertson, #352).
-------------------------------------------------------------------
Sun Jan 21 11:11:02 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 2.11:
* Switch to tomllib/tomli to support heterogeneous arrays
* Bump flake8, flake8-comprehensions and flake8-bugbear
* Provide whitelist parity for `MagicMock` and `Mock`
-------------------------------------------------------------------
Wed Dec 27 16:54:00 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.10:
* Drop support for Python 3.7 (Jendrik Seipp, #323).
* Add support for Python 3.12 (Jendrik Seipp, #332).
* Use `end_lineno` AST attribute to obtain more accurate line
counts (Jendrik Seipp).
* Use exit code 0 for `--help` and `--version` again (Jendrik
Seipp, #321).
* Use exit code 3 when dead code is found (whosayn, #319).
* Treat non-supported decorator names as "@" instead of
crashing (Llandy3d and Jendrik Seipp, #284).
* Drop support for Python 3.6 (Jendrik Seipp).
* Add `UnicodeEncodeError` exception handling to `core.py`
* Add whitelist for `Enum` attributes `_name_` and `_value_`
* Run tests and add PyPI trove for Python 3.11 (Jendrik Seipp).
* Ignore `setup_module()`, `teardown_module()`, etc. in pytest
`test_*.py` files (Jendrik Seipp).
* Add whitelist for
`socketserver.TCPServer.allow_reuse_address` (Ben Elliston).
* Clarify that `--exclude` patterns are matched against
absolute paths (Jendrik Seipp, #260).
* Add basic `match` statement support (kreathon, #276, #291).
* Mark imports in `__all__` as used (kreathon, #172, #282).
* Add whitelist for `pint.UnitRegistry.default_formatter` (Ben
Elliston, #258).
* Print absolute filepaths as relative again (as in version 2.1
and before)
* if they are below the current directory (The-Compiler, #246).
* Run tests and add PyPI trove for Python 3.10 (chayim, #266).
* Allow using the `del` keyword to mark unused variables
(sshishov, #279).
* Only parse format strings when being used with `locals()`
* Don't override paths in pyproject.toml with empty CLI paths
* Run continuous integration tests for Python 3.9 (ju-sh,
* Use pathlib internally (ju-sh, #226).
-------------------------------------------------------------------
Tue Jun 13 09:08:08 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Thu Aug 20 21:06:20 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Update to v2.1
* Treat `getattr/hasattr(obj, "constant_string", ...)` as a reference
to `obj.constant_string`
* Fix false positives when assigning to `x.some_name` but reading via
`some_name`, at the cost of potential false negatives
* Allow reading options from `pyproject.toml`
- from v2.0
* Parse `# type: ...` comments if on Python 3.8+
* Bump minimum Python version to 3.6. The last Vulture release that
supports Python 2.7 and Python 3.5 is version 1.6.
* Consider all files under `test` or `tests` directories test files
* Ignore `logging.Logger.propagate` attribute
- from v1.6
* Differentiate between functions and methods
* Move from Travis to GitHub actions
- from v1.5
* Support flake8 "noqa" error codes F401 (unused import) and F841
(unused local variable)
* Detect unreachable code in conditional expressions
-------------------------------------------------------------------
Thu Apr 16 07:49:11 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 1.4:
* Ignore unused import statements in __init__.py (RJ722, #192).
* Report first decorator's line number for unused decorated objects on Python 3.8+ (RJ722, #200).
* Check code with black and pyupgrade.
-------------------------------------------------------------------
Thu Feb 6 17:35:31 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 1.3
* Detect redundant if conditions without else blocks.
* Add whitelist for string.Formatter
* Fix tests for Python 3.8
* Use new Constant AST node under Python 3.8+
* Add test for f-strings
* Add whitelist for logging module.
* Add sys.excepthook to sys whitelist.
* Add whitelist for ctypes module.
* Check that type annotations are parsed and type comments are ignored
* Support checking files with BOM under Python 2.7
-------------------------------------------------------------------
Mon Feb 11 05:11:25 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Update to v1.0
* Add ``--ignore-decorators`
* Add whitelist for ``threading`` module
- Add test dependency pytest > 3.2.3 due to use of CaptureResult.
- Reduce hack to remove unsuitable hashbangs
-------------------------------------------------------------------
Tue Dec 4 12:55:52 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Fri Aug 10 00:07:30 UTC 2018 - jsikes@suse.de
- Update to 0.29
* Check that NEWS file is up-to-date before releasing
* Add --ignore-names flag (#139)
* Add --make-whitelist flag (#135)
* Single-source package version string (#134)
* Use absolute imports (#132)
* Fix PEP8 issues (#120)
-------------------------------------------------------------------
Sun Jul 29 12:14:29 UTC 2018 - jengelh@inai.de
- Use noun phrase in summary. Trim filler wording from description.
-------------------------------------------------------------------
Thu May 24 18:11:16 UTC 2018 - toddrme2178@gmail.com
- Spec file cleanups
-------------------------------------------------------------------
Fri Oct 20 16:19:31 UTC 2017 - toddrme2178@gmail.com
- initial version

89
python-vulture.spec Normal file
View File

@@ -0,0 +1,89 @@
#
# spec file for package python-vulture
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-vulture
Version: 2.13
Release: 0
Summary: Python module for finding dead code
License: MIT
URL: https://github.com/jendrikseipp/vulture
Source: https://files.pythonhosted.org/packages/source/v/vulture/vulture-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pytest > 3.2.3}
BuildRequires: %{python_module Pint}
# /SECTION
%python_subpackages
%description
Vulture finds unused code in Python programs. This is useful for
cleaning up and finding errors in code bases. Running Vulture
on both the library and test suite, untested code can be found.
Due to Python's dynamic nature, static code analyzers like Vulture are
likely to miss some dead code. Also, code that is only called implicitly
may be reported as unused.
Features:
* static code analysis
* only one module
* tests itself and has complete test coverage
* complements pyflakes and has the same output syntax
* sorts unused classes and functions by size with ``--sort-by-size``
* supports Python 2.6, 2.7 and 3.x
%prep
%setup -q -n vulture-%{version}
sed -i -e '/^#! \//, 1d' vulture/core.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/vulture
%check
rm setup.cfg
%pytest
%post
%python_install_alternative vulture
%postun
%python_uninstall_alternative vulture
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE.txt
%python_alternative %{_bindir}/vulture
%{python_sitelib}/vulture
%{python_sitelib}/vulture-%{version}.dist-info
%changelog

3
vulture-2.11.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f0fbb60bce6511aad87ee0736c502456737490a82d919a44e6d92262cb35f1c2
size 55532

3
vulture-2.13.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:78248bf58f5eaffcc2ade306141ead73f437339950f80045dce7f8b078e5a1aa
size 57066