| |
@@ -21,9 +21,7 @@
|
| |
continue # Do not even check the license
|
| |
elif license is None:
|
| |
problem = True
|
| |
- print(
|
| |
- f"Missing license in package.json for {identity}", file=stderr
|
| |
- )
|
| |
+ print(f"Missing license in package.json for {identity}", file=stderr)
|
| |
elif isinstance(license, dict):
|
| |
if isinstance(license.get("type"), str):
|
| |
continue
|
| |
@@ -62,10 +60,6 @@
|
| |
return "At least one missing license was found."
|
| |
|
| |
|
| |
- def check_exception(exceptions, name, version):
|
| |
- x = args.exceptions
|
| |
-
|
| |
-
|
| |
def parse(package_json_path):
|
| |
with package_json_path.open("rb") as pjfile:
|
| |
pj = json.load(pjfile)
|
| |
@@ -85,9 +79,7 @@
|
| |
def parse_args():
|
| |
parser = ArgumentParser(
|
| |
formatter_class=RawDescriptionHelpFormatter,
|
| |
- description=(
|
| |
- "Search for bundled dependencies without declared licenses"
|
| |
- ),
|
| |
+ description=("Search for bundled dependencies without declared licenses"),
|
| |
epilog="""
|
| |
|
| |
The exceptions file must be a TOML file with zero or more tables. Each table’s
|
| |
@@ -154,9 +146,7 @@
|
| |
parser.error(f"Invalid format in {xname}: not an object")
|
| |
for tablename, table in args.exceptions.items():
|
| |
if not isinstance(table, dict):
|
| |
- parser.error(
|
| |
- f"Non-table entry in {xname}: {tablename} = {table!r}"
|
| |
- )
|
| |
+ parser.error(f"Non-table entry in {xname}: {tablename} = {table!r}")
|
| |
overlay = {}
|
| |
for key, value in table.items():
|
| |
if isinstance(value, str):
|
| |
@@ -176,9 +166,7 @@
|
| |
x.update(args.exceptions[add])
|
| |
except KeyError:
|
| |
if xname is None:
|
| |
- parser.error(
|
| |
- f"No table {add}, as no exceptions file was given"
|
| |
- )
|
| |
+ parser.error(f"No table {add}, as no exceptions file was given")
|
| |
else:
|
| |
parser.error(f"No table {add} in {xname}")
|
| |
# Store the merged dictionary
|
| |
Trivial repo housekeeping, not affecting the contents of the package:
rpmlintrc
filecheck-null-licenses
script withruff format
(equivalent toblack
) and remove an unused stub function