Skip to content

Commit

Permalink
Use None instead of string 'None'
Browse files Browse the repository at this point in the history
Two command line options use the string 'None' instead of the
native type None as the default value.

This PR changes this.
  • Loading branch information
sergio-costas committed Dec 4, 2024
1 parent 24f1446 commit 51da42f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions updatesnap/SnapVersionModule/snap_version_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def process_rock_version_data(upstream_version, previous_version, version_schema
def is_version_update(snap, manager_yaml, arguments, has_update):
""" Returns if snap version update available """
has_version_update = False
if arguments.version_schema == 'None':
if arguments.version_schema is None:
return False
metadata = snap.process_metadata()
if process_snap_version_data(metadata['upstream-version'], metadata['name'],
Expand All @@ -115,7 +115,7 @@ def is_version_update(snap, manager_yaml, arguments, has_update):
def is_rock_version_update(rock, manager_yaml, arguments, has_update):
""" Returns if rock version update available """
has_version_update = False
if arguments.rock_version_schema == 'None':
if arguments.rock_version_schema is None:
return False
metadata = rock.process_metadata()
rock_version = process_rock_version_data(metadata['upstream-version'], metadata['version'],
Expand Down
4 changes: 2 additions & 2 deletions updatesnap/updatesnapyaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def main():
help='User name for accessing Github projects.')
parser.add_argument('--github-token', action='store', default=None,
help='Access token for accessing Github projects.')
parser.add_argument('--version-schema', action='store', default='None',
parser.add_argument('--version-schema', action='store', default=None,
help='Version schema of snapping repository')
parser.add_argument('--rock-version-schema', action='store', default='None',
parser.add_argument('--rock-version-schema', action='store', default=None,
help='Version schema of rock repository')
parser.add_argument('--yaml-path', action='store', default=None,
help='Path to the yaml file')
Expand Down

0 comments on commit 51da42f

Please sign in to comment.