Skip to content

Commit

Permalink
fix: Fix ref:pattern and as_dict condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 8, 2023
1 parent 01cde81 commit 9d5a337
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ocdsextensionregistry/extension_version.py
Expand Up @@ -75,7 +75,7 @@ def as_dict(self):
"""
Returns the object's public properties as a dictionary.
"""
return {key: value for key, value in self.__dict__.items() if not key.startswith('_')}
return {key: value for key, value in self.__dict__.items() if not key.startswith(('_', 'input_url'))}

def get_url(self, basename):
"""
Expand Down Expand Up @@ -359,7 +359,7 @@ def _configuration(self, parsed):
'full_name:pattern': r'\A/([^/]+/[^/]+)',
'name:pattern': r'\A/[^/]+/([^/]+)',
'user:pattern': r'\A/([^/]+)',
'ref:pattern': r'\A/[^/]+/[^/]+/([^/]+)/[^/]+\Z',
'ref:pattern': r'\A/[^/]+/[^/]+/([^/]+)/[^/]*\Z',
'html_page:prefix': 'https://github.com/',
'url:prefix': 'git@github.com:',
'url:suffix': '.git',
Expand All @@ -371,7 +371,7 @@ def _configuration(self, parsed):
'full_name:pattern': r'\A/([^/]+/[^/]+)',
'name:pattern': r'\A/[^/]+/([^/]+)',
'user:pattern': r'\A/([^/]+)',
'ref:pattern': r'\A/[^/]+/[^/]+/raw/([^/]+)/[^/]+\Z',
'ref:pattern': r'\A/[^/]+/[^/]+/raw/([^/]+)/[^/]*\Z',
'html_page:prefix': 'https://bitbucket.org/',
'url:prefix': 'https://bitbucket.org/',
'url:suffix': '.git', # assumes Git not Mercurial, which can't be disambiguated using the base URL
Expand All @@ -383,7 +383,7 @@ def _configuration(self, parsed):
'full_name:pattern': r'\A/(.+)/-/raw/',
'name:pattern': r'/([^/]+)/-/raw/',
'user:pattern': r'\A/([^/]+)',
'ref:pattern': r'/-/raw/([^/]+)/[^/]+\Z',
'ref:pattern': r'/-/raw/([^/]+)/[^/]*\Z',
'html_page:prefix': 'https://gitlab.com/',
'url:prefix': 'https://gitlab.com/',
'url:suffix': '.git',
Expand Down

0 comments on commit 9d5a337

Please sign in to comment.