- Sep 15, 2024
-
-
David Runge authored
Signed-off-by:
David Runge <dvzrv@archlinux.org>
-
David Runge authored
Ignore AUTHORS file as names and mail addresses may contain unknown words. Ignore GIR as special term. Signed-off-by:
David Runge <dvzrv@archlinux.org>
-
David Runge authored
Signed-off-by:
David Runge <dvzrv@archlinux.org>
-
David Runge authored
Python-six is a piece of legacy software that should be removed wherever it is used. As such we replace the import with importlib from Python. Signed-off-by:
David Runge <dvzrv@archlinux.org>
-
- Aug 01, 2024
-
-
Claudia Pellegrino authored
Suggested-by:
Jelle van der Waa <jelle@vdwaa.nl>
-
- May 25, 2024
-
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
Commit f4ef0624 changed `AbstractRule` so it inherits from `ABC`. This inadvertently introduced a regression so the `all_rules` dict became empty, essentially breaking all of namcap. The existing logic in `__init__.py` that populates `all_rules` uses a filter which tries to let only things pass that are classes: type(v) == type However, this really means "check that v is a class with no superclass," so this check only allows top-level classes (inheriting directly from `object`) to pass. That still worked by accident because there was no inheritance at all, but letting `AbstractRule` inherit from `ABC` finally broke it. To fix this regression, change the check to: isinstance(v, type) which means "check that v is a class." There is no unit test that tests (or interacts with) `all_rules`, which explains why this went past CI checks.
-
-
- May 22, 2024
-
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
Only use comprehensions when the expression it contains is an actual value. The `.append` function returns nothing useful, so replace those two comprehensions with a classic for loop.
-
Claudia Pellegrino authored
Note: the added assertion is not a test case assertion but just a typing hint. I would have used TestCase’s `assertIsNotNone` method, but that alone wouldn’t convince mypy that the union type cannot be None: > error: Item "None" of "Match[str] | None" has no attribute "group" [union-attr]
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
These issues were caused by type annotations introduced in 4e0331f2. In 96f36723, the fallout was partially fixed in `licensepkg.py` but not the rest of the codebase. Fix the issue for all occurrences I could spot. I mainly inspected all `arg-type` violations, but I also fixed other occurrences that mypy can’t detect yet whenever I bumped into one. CC: David Runge <dvzrv@archlinux.org>
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
-
Claudia Pellegrino authored
This basic mypy [1] configuration suppresses all type-checking errors that it would currently report given the codebase as-is. The idea is to re-enable those errors one by one and then fix them, the ultimate goal being to make maintenance easier (due to editors making more helpful suggestions and diagnosis) and uncover hidden bugs. Besides, add a `files` directive so one can run `mypy` without arguments. Requires `extra/mypy` [2]. [1]: https://www.mypy-lang.org/ [2]: https://archlinux.org/packages/extra/any/mypy/
-
- Mar 13, 2024
-
-
With this change, `+` SPDX operator is allowed for all license identifiers except those that end with `-only` or `-or-later`. Syntactically the SPDX specification allows using the operator for any license identifier, but semantically it doesn't make sense to use it for licenses like `GPL-2.0-only+`. Such uses will be reported as unknown license identifiers. While there are other licenses that could probably be disallowed like `MIT+`, it's hard to draw the line on which identifers should support the `+` operator. The SPDX specification doesn't provide that information, see https://github.com/spdx/spdx-spec/issues/689. The functionality is implemented by removing trailing `+` from the license symbols, since the python `license_expression` module doesn't support parsing it directly. See https://github.com/nexB/license-expression/issues/9.
-
Install the invalid.py "binary" so it is checked by namcap.
-
sphinx-build by default leaves unreproducible pickle files and other a cache files which should not be packaged.
-
For PKGBUILD's with split packages the pkgbase does not have to be a "valid" package or contain a pkgdesc. Fixes #77
-
- Mar 12, 2024
-
-
Pekka Ristola authored
The `lstrip` function treats its argument as a set of characters to remove in any order, while `removeprefix` removes a prefix.
-
- Mar 02, 2024
-
-
-
-
-
Now CI should detect max line length violations.
-
-
Caleb Maclennan authored
-
Caleb Maclennan authored
-
-
- Feb 10, 2024
-
-
- Fix listing rules to list all rules and not exit 2 - Allow listing rules and make packages not always mandatory - Fix the parsing of rules/exclude they are comma separated - Make --info a bool, as it is one - Fix typo packag => package - Format with ruff - Remove unused import of dedent previously used for getopt Co-authored-by:
Caleb Maclennan <caleb@alerque.com>
-
-
- Feb 09, 2024
-
-
- Feb 07, 2024
-
-