mirror of
https://github.com/cheat/cheat.git
synced 2024-11-25 23:41:36 +01:00
Style fixes
Don't use * imports, fix indentations, other small fixes
This commit is contained in:
parent
3be95142ed
commit
bf4f1c80ca
@ -31,8 +31,8 @@ Options:
|
||||
"""
|
||||
|
||||
# require the dependencies
|
||||
from cheat import *
|
||||
from cheat.utils import *
|
||||
from cheat import sheets, sheet
|
||||
from cheat.utils import colorize
|
||||
from docopt import docopt
|
||||
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
from cheat import sheets
|
||||
from cheat import utils
|
||||
from cheat.utils import *
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from cheat import sheets
|
||||
from cheat.utils import die, editor
|
||||
|
||||
def copy(current_sheet_path, new_sheet_path):
|
||||
""" Copies a sheet to a new path """
|
||||
|
@ -1,7 +1,8 @@
|
||||
from cheat import cheatsheets
|
||||
from cheat.utils import *
|
||||
import os
|
||||
|
||||
from cheat import cheatsheets
|
||||
from cheat.utils import die
|
||||
|
||||
def default_path():
|
||||
""" Returns the default cheatsheet path """
|
||||
|
||||
@ -22,7 +23,7 @@ def default_path():
|
||||
if not os.access(default_sheets_dir, os.R_OK):
|
||||
die('The DEFAULT_CHEAT_DIR (' + default_sheets_dir +') is not readable.')
|
||||
if not os.access(default_sheets_dir, os.W_OK):
|
||||
die('The DEFAULT_CHEAT_DIR (' + default_sheets_dir +') is not writeable.')
|
||||
die('The DEFAULT_CHEAT_DIR (' + default_sheets_dir +') is not writable.')
|
||||
|
||||
# return the default dir
|
||||
return default_sheets_dir
|
||||
@ -84,7 +85,7 @@ def search(term):
|
||||
if term in line:
|
||||
match += ' ' + line
|
||||
|
||||
if not match == '':
|
||||
if match != '':
|
||||
result += cheatsheet[0] + ":\n" + match + "\n"
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user