Skip to content

Commit 2492576

Browse files
committed
Remove outdated ignore entry in ruff config
Signed-off-by: tdruez <[email protected]>
1 parent 9503ebb commit 2492576

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,5 @@ max-complexity = 10
191191
[tool.ruff.lint.per-file-ignores]
192192
# Allow the usage of assert in the test_spdx file.
193193
"**/test_spdx.py*" = ["S101"]
194-
"scanpipe/pipes/spdx.py" = ["UP006", "UP035"]
195194
# Allow complexity in management commands
196195
"scanpipe/management/commands/*" = ["C901"]

scanpipe/pipes/spdx.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from datetime import datetime
2929
from datetime import timezone
3030
from pathlib import Path
31-
from typing import List # Python 3.8 compatibility
3231

3332
SPDX_SPEC_VERSION = "2.3"
3433
SPDX_LICENSE_LIST_VERSION = "3.20"
@@ -272,7 +271,7 @@ class ExtractedLicensingInfo:
272271

273272
name: str = ""
274273
comment: str = ""
275-
see_alsos: List[str] = field(default_factory=list)
274+
see_alsos: list[str] = field(default_factory=list)
276275

277276
def as_dict(self):
278277
"""Return the data as a serializable dict."""
@@ -332,9 +331,9 @@ class Package:
332331
comment: str = ""
333332
license_comments: str = ""
334333

335-
checksums: List[Checksum] = field(default_factory=list)
336-
external_refs: List[ExternalRef] = field(default_factory=list)
337-
attribution_texts: List[str] = field(default_factory=list)
334+
checksums: list[Checksum] = field(default_factory=list)
335+
external_refs: list[ExternalRef] = field(default_factory=list)
336+
attribution_texts: list[str] = field(default_factory=list)
338337

339338
def as_dict(self):
340339
"""Return the data as a serializable dict."""
@@ -425,18 +424,18 @@ class File:
425424

426425
spdx_id: str
427426
name: str
428-
checksums: List[Checksum] = field(default_factory=list)
427+
checksums: list[Checksum] = field(default_factory=list)
429428

430429
license_concluded: str = "NOASSERTION"
431430
copyright_text: str = "NOASSERTION"
432-
license_in_files: List[str] = field(default_factory=list)
433-
contributors: List[str] = field(default_factory=list)
431+
license_in_files: list[str] = field(default_factory=list)
432+
contributors: list[str] = field(default_factory=list)
434433
notice_text: str = ""
435434
# Supported values:
436435
# SOURCE | BINARY | ARCHIVE | APPLICATION | AUDIO | IMAGE | TEXT | VIDEO |
437436
# DOCUMENTATION | SPDX | OTHER
438-
types: List[str] = field(default_factory=list)
439-
attribution_texts: List[str] = field(default_factory=list)
437+
types: list[str] = field(default_factory=list)
438+
attribution_texts: list[str] = field(default_factory=list)
440439
comment: str = ""
441440
license_comments: str = ""
442441

@@ -532,16 +531,16 @@ class Document:
532531
name: str
533532
namespace: str
534533
creation_info: CreationInfo
535-
packages: List[Package]
534+
packages: list[Package]
536535

537536
spdx_id: str = "SPDXRef-DOCUMENT"
538537
version: str = SPDX_SPEC_VERSION
539538
data_license: str = "CC0-1.0"
540539
comment: str = ""
541540

542-
files: List[File] = field(default_factory=list)
543-
extracted_licenses: List[ExtractedLicensingInfo] = field(default_factory=list)
544-
relationships: List[Relationship] = field(default_factory=list)
541+
files: list[File] = field(default_factory=list)
542+
extracted_licenses: list[ExtractedLicensingInfo] = field(default_factory=list)
543+
relationships: list[Relationship] = field(default_factory=list)
545544

546545
def as_dict(self):
547546
"""Return the SPDX document as a serializable dict."""

0 commit comments

Comments
 (0)