From ec5a39d05090b52d95d16ae33518cec48d189fca Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sat, 12 Aug 2023 10:43:24 -0500 Subject: [PATCH] Move regex along with _format_version --- netkan/netkan/metadata.py | 3 +++ netkan/netkan/mirrorer.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/netkan/netkan/metadata.py b/netkan/netkan/metadata.py index 653fb87..746c1bf 100644 --- a/netkan/netkan/metadata.py +++ b/netkan/netkan/metadata.py @@ -116,6 +116,9 @@ def sqs_message( class Ckan: + + EPOCH_VERSION_REGEXP = re.compile('^[0-9]+:') + REDISTRIBUTABLE_LICENSES = { "public-domain", "Apache", "Apache-1.0", "Apache-2.0", diff --git a/netkan/netkan/mirrorer.py b/netkan/netkan/mirrorer.py index 246d3a1..5842592 100644 --- a/netkan/netkan/mirrorer.py +++ b/netkan/netkan/mirrorer.py @@ -105,8 +105,6 @@ class CkanMirror(Ckan): "Unlicense" : 'https://unlicense.org/UNLICENSE', } - EPOCH_VERSION_REGEXP = re.compile('^[0-9]+:') - def __init__(self, collection: str, filename: Optional[Union[str, Path]] = None, contents: Optional[str] = None) -> None: Ckan.__init__(self, filename, contents) self.collection = collection