Cleanup: pep8

This commit is contained in:
2014-11-05 10:42:59 +01:00
parent 7f57c74f02
commit 53cbb0fa55
7 changed files with 12 additions and 21 deletions

View File

@@ -40,6 +40,7 @@ del os, sys, path
class bam_config:
# fake module
__slots__ = ()
def __new__(cls, *args, **kwargs):
raise RuntimeError("%s should not be instantiated" % cls)
@@ -98,6 +99,7 @@ class bam_config:
class bam_utils:
# fake module
__slots__ = ()
def __new__(cls, *args, **kwargs):
raise RuntimeError("%s should not be instantiated" % cls)
@@ -187,9 +189,6 @@ class bam_utils:
print("Expected a directory (%r)" % path)
sys.exit(1)
# make a zipfile from session
import json
with open(os.path.join(path, ".bam_paths_uuid.json")) as f:
@@ -285,9 +284,11 @@ class bam_utils:
if file_type != "dir":
print(" %s" % name_short)
def subcommand_checkout_cb(args):
bam_utils.checkout(args.paths)
def subcommand_commit_cb(args):
bam_utils.commit(args.paths, args.message)
@@ -345,7 +346,6 @@ def create_argparse_revert(subparsers):
subparse.set_defaults(func=subcommand_revert_cb)
def create_argparse_status(subparsers):
subparse = subparsers.add_parser("status", aliases=("st",))
subparse.add_argument(
@@ -362,8 +362,6 @@ def create_argparse_list(subparsers):
subparse.set_defaults(func=subcommand_list_cb)
def create_argparse():
import os
import argparse

View File

@@ -10,6 +10,7 @@ with open(os.path.join(MODULE_DIR, 'config.json'), 'r') as config:
import json
config = json.load(config)
def request_url(path):
return ('%s%s' % (config['BAM_SERVER'], path))
@@ -45,12 +46,12 @@ def request_url(path):
# )
args = {
'message' : 'Adding test file.'
'message': "Adding test file."
}
payload = {
'command' : 'commit',
'arguments' : json.dumps(args)
'command': 'commit',
'arguments': json.dumps(args)
}
files = {'file': open('buck.mp4', 'rb')}

View File

@@ -103,7 +103,6 @@ class Application(tk.Frame):
menubar.add_command(label="Preferences", command=lambda: print("Preferences"))
root.config(menu=menubar)
# local data
self.item_list = []
@@ -224,7 +223,6 @@ class Application(tk.Frame):
self.grid_members.append(but)
row += 1
def OnFrameConfigure(self, event):
'''Reset the scroll region to encompass the inner frame'''
self.canvas.configure(scrollregion=self.canvas.bbox("all"))