-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix creating bots in other drives than $tmp #26
Conversation
@@ -15,37 +17,38 @@ def convert_to_filename(text): | |||
""" | |||
import unicodedata | |||
normalized = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore').decode() | |||
valid_chars = "-_.() %s%s" % (string.ascii_letters, string.digits) | |||
valid_chars = '-_.() %s%s' % (string.ascii_letters, string.digits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use str.format here instead since we're using python3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used f-strings as we are already at python 3.6 :)
|
||
download_and_extract_zip( | ||
download_url="https://github.com/RLBot/RLBotPythonExample/archive/master.zip", | ||
local_zip_path=f"{tmpdirname}/RLBotPythonExample.zip", local_folder_path=tmpdirname) | ||
download_url='https://github.com/RLBot/RLBotPythonExample/archive/master.zip', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single versus double quotes should be discussed and applied as project-wide change in a new PR, TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged. Maybe introducing an auto-fixing linter would be the most effective tool to do this.
I've made things consistently use single quotes here as that was the dominant quoting style in this file. I don't have strong opinions on which quotes to use (although I prefer single quotes) but like things being consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #27 to continue this conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Issue is here: #20
Also includes some quality of life changes.