Skip to content

Commit

Permalink
fixed linting and pep8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaiplesa committed Nov 28, 2018
1 parent 63993bb commit 53b718c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion components/brave_sync/ui/brave_sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ window.cr.define('sync_ui_exports', function () {
getActions().onLogMessage(message)
}

function syncSetupError(error: string) {
function syncSetupError (error: string) {
alert('Sync setup error: ' + error)
}

Expand Down
53 changes: 27 additions & 26 deletions script/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ def get_brave_packages(dir, channel, version):
pkgs = []

def rename(file_path, file_desired):
file_desired_path = os.path.join(dir, file_desired)
if os.path.isfile(file_path):
print('[INFO] Renaming' + file_path + ' to ' +
file_desired_path)
os.rename(file_path, file_desired_path)
return file_desired_path
file_desired_path = os.path.join(dir, file_desired)
if os.path.isfile(file_path):
print('[INFO] Renaming' + file_path + ' to ' +
file_desired_path)
os.rename(file_path, file_desired_path)
return file_desired_path

channel_capitalized = channel.capitalize()
for _, _, files in os.walk(dir):
Expand Down Expand Up @@ -153,13 +153,13 @@ def rename(file_path, file_desired):
r'.*\.deb$', file) \
or re.match(r'brave-browser' + '-' + version +
r'.*\.rpm$', file):
pkgs.append(file)
pkgs.append(file)
else:
if re.match(r'brave-browser-' + channel + '_' +
version + r'.*\.deb$', file) \
or re.match(r'brave-browser-' + channel + '-' +
version + r'.*\.rpm$', file):
pkgs.append(file)
pkgs.append(file)
elif PLATFORM == 'win32':
if get_target_arch() == 'x64':
if channel_capitalized == 'Release':
Expand Down Expand Up @@ -221,26 +221,26 @@ def rename(file_path, file_desired):
rename(file_path, file_desired_stub)
pkgs.append(file_desired_stub)
elif re.match(r'BraveBrowserSilent' + channel_capitalized +
r'Setup_.*\.exe', file):
r'Setup_.*\.exe', file):
rename(file_path, file_desired_stub_silent)
pkgs.append(file_desired_stub_silent)
elif re.match(r'BraveBrowserUntagged' + channel_capitalized +
r'Setup_.*\.exe', file):
r'Setup_.*\.exe', file):
rename(file_path, file_desired_stub_untagged)
pkgs.append(file_desired_stub_untagged)
elif re.match(r'BraveBrowserStandalone' +
channel_capitalized + r'Setup_.*\.exe',
file):
channel_capitalized + r'Setup_.*\.exe',
file):
rename(file_path, file_desired_standalone)
pkgs.append(file_desired_standalone)
elif re.match(r'BraveBrowserStandaloneSilent' +
channel_capitalized + r'Setup_.*\.exe',
file):
channel_capitalized + r'Setup_.*\.exe',
file):
rename(file_path, file_desired_standalone_silent)
pkgs.append(file_desired_standalone_silent)
elif re.match(r'BraveBrowserStandaloneUntagged' +
channel_capitalized + r'Setup_.*\.exe',
file):
channel_capitalized + r'Setup_.*\.exe',
file):
rename(file_path, file_desired_standalone_untagged)
pkgs.append(file_desired_standalone_untagged)
else:
Expand Down Expand Up @@ -303,26 +303,26 @@ def rename(file_path, file_desired):
rename(file_path, file_desired_stub)
pkgs.append(file_desired_stub)
elif re.match(r'BraveBrowserSilent' + channel_capitalized +
r'Setup32_.*\.exe', file):
r'Setup32_.*\.exe', file):
rename(file_path, file_desired_stub_silent)
pkgs.append(file_desired_stub_silent)
elif re.match(r'BraveBrowserUntagged' + channel_capitalized +
r'Setup32_.*\.exe', file):
r'Setup32_.*\.exe', file):
rename(file_path, file_desired_stub_untagged)
pkgs.append(file_desired_stub_untagged)
elif re.match(r'BraveBrowserStandalone' +
channel_capitalized + r'Setup32_.*\.exe',
file):
channel_capitalized + r'Setup32_.*\.exe',
file):
rename(file_path, file_desired_standalone)
pkgs.append(file_desired_standalone)
elif re.match(r'BraveBrowserStandaloneSilent' +
channel_capitalized + r'Setup32_.*\.exe',
file):
channel_capitalized + r'Setup32_.*\.exe',
file):
rename(file_path, file_desired_standalone_silent)
pkgs.append(file_desired_standalone_silent)
elif re.match(r'BraveBrowserStandaloneUntagged' +
channel_capitalized + r'Setup32_.*\.exe',
file):
channel_capitalized + r'Setup32_.*\.exe',
file):
rename(file_path, file_desired_standalone_untagged)
pkgs.append(file_desired_standalone_untagged)
return pkgs
Expand Down Expand Up @@ -432,8 +432,9 @@ def create_release_draft(repo, tag):
warning = ""

body = '''{warning}
### Mac installation
Install Brave-Browser.dmg on your system.
### Mac installation
Install Brave-Browser.dmg on your system.
### Linux install instructions
http://brave-browser.readthedocs.io/en/latest/installing-brave.html#linux
Expand Down

0 comments on commit 53b718c

Please sign in to comment.