Skip to content

Commit

Permalink
reduce number of returns
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrodnek committed Jul 28, 2023
1 parent bec1b00 commit e831054
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions chalice/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,12 @@ def lambda_python_version(self) -> str:
if major == 2:
return 'python2.7'
# Python 3 for backwards compatibility needs to select python3.6
# for python versions 3.0-3.6. 3.7 and higher will use python3.7.
# for python versions 3.0-3.6. 3.7-3.10 will use their version.
# 3.11 and higher will use 3.11
elif (major, minor) <= (3, 6):
return 'python3.6'
elif (major, minor) <= (3, 7):
return 'python3.7'
elif (major, minor) <= (3, 8):
return 'python3.8'
elif (major, minor) <= (3, 9):
return 'python3.9'
elif (major, minor) <= (3, 10):
return 'python3.10'
return 'python%s.%s' % (major, minor)
return 'python3.11'

@property
Expand Down

0 comments on commit e831054

Please sign in to comment.