Skip to content

Commit

Permalink
Autoformat install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 8, 2022
1 parent c69ba0a commit 4861d42
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
28 changes: 16 additions & 12 deletions get-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,21 +458,21 @@ def _is_supported(x):
print(
colorize(
"error",
"Version {version} does not support this installation method. Please specify a version prior to "
"1.2.0a1 explicitly using the '--version' option.\n"
"Please see "
"https://python-poetry.org/blog/announcing-poetry-1-2-0a1.html#deprecation-of-the-get-poetry-py-script "
"for more information.".format(version=version),
"Version {version} does not support this installation method."
" Please specify a version prior to 1.2.0a1 explicitly using the"
" '--version' option.\nPlease see"
" https://python-poetry.org/blog/announcing-poetry-1-2-0a1.html#deprecation-of-the-get-poetry-py-script"
" for more information.".format(version=version),
)
)
return None, None

print(
colorize(
"warning",
"This installer is deprecated. "
"Poetry versions installed using this script will not be able to use 'self update' command to upgrade to "
"1.2.0a1 or later.",
"This installer is deprecated. Poetry versions installed using this"
" script will not be able to use 'self update' command to upgrade to"
" 1.2.0a1 or later.",
)
)

Expand Down Expand Up @@ -773,7 +773,8 @@ def add_to_fish_path(self):
print(
colorize(
"warning",
"\nUnable to get the PATH value. It will not be updated automatically.",
"\nUnable to get the PATH value. It will not be updated"
" automatically.",
)
)
self._modify_path = False
Expand Down Expand Up @@ -808,7 +809,8 @@ def add_to_windows_path(self):
print(
colorize(
"warning",
"Unable to get the PATH value. It will not be updated automatically",
"Unable to get the PATH value. It will not be updated"
" automatically",
)
)
self._modify_path = False
Expand Down Expand Up @@ -1074,8 +1076,10 @@ def main():
"--file",
dest="file",
action="store",
help="Install from a local file instead of fetching the latest version "
"of Poetry available online.",
help=(
"Install from a local file instead of fetching the latest version "
"of Poetry available online."
),
)

args = parser.parse_args()
Expand Down
10 changes: 6 additions & 4 deletions install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,9 @@ def _is_self_upgrade_supported(x):
self._write(
colorize(
"warning",
f"You are installing {version}. When using the current installer, this version does not support "
f"updating using the 'self update' command. Please use 1.1.7 or later.",
f"You are installing {version}. When using the current installer,"
" this version does not support updating using the 'self update'"
" command. Please use 1.1.7 or later.",
)
)
if not self._accept_all:
Expand Down Expand Up @@ -893,8 +894,9 @@ def main():
sys.stdout.write(
colorize(
"warning",
"The canonical source for Poetry's installation script is now https://install.python-poetry.org. "
"Please update your usage to reflect this.\n",
"The canonical source for Poetry's installation script is now"
" https://install.python-poetry.org. Please update your usage to reflect"
" this.\n",
)
)
sys.exit(main())
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extend_skip = ["setup.py"]
target-version = ['py36']
experimental_string_processing = true
force-exclude = '''
.*/setup\.py$|^/(install|get)-poetry.py$
.*/setup\.py$
'''


Expand Down

0 comments on commit 4861d42

Please sign in to comment.