Skip to content
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

Merged
merged 4 commits into from
Mar 24, 2019
Merged

Conversation

DomNomNom
Copy link
Contributor

Issue is here: #20

Also includes some quality of life changes.

@DomNomNom DomNomNom requested a review from tarehart March 21, 2019 11:01
@@ -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)
Copy link
Member

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.

Copy link
Contributor Author

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',
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

Copy link
Contributor

@tarehart tarehart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tarehart tarehart merged commit 0a930f1 into master Mar 24, 2019
@tarehart tarehart deleted the non-tmp-drive branch March 24, 2019 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants