Skip to content

Commit

Permalink
cleanup: drop unused dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
ccwienk committed Dec 9, 2024
1 parent f57a345 commit 1672c50
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions concourse/model/traits/image_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import dataclasses
import enum
import re
import typing

import dacite
Expand Down Expand Up @@ -74,26 +73,6 @@ class GithubIssueTemplateCfg:
type: str


@dataclasses.dataclass
class LicenseCfg:
'''
configures license policies for discovered licences
licenses are configured as lists of regular expressions (matching is done case-insensitive)
'''
prohibited_licenses: typing.Optional[list[str]] = None

def is_allowed(self, license: str):
if not self.prohibited_licenses:
return True

for prohibited in self.prohibited_licenses:
if re.fullmatch(prohibited, license, re.IGNORECASE):
return False
else:
return True


@dataclasses.dataclass(frozen=True)
class IssuePolicies:
max_processing_time_days: gcm.MaxProcessingTimesDays = gcm.MaxProcessingTimesDays()
Expand Down

0 comments on commit 1672c50

Please sign in to comment.