Skip to content

Commit

Permalink
Reformatted everything with black
Browse files Browse the repository at this point in the history
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
  • Loading branch information
olehermanse committed Oct 5, 2021
1 parent bff26a5 commit 9ff56d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cfbs/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def put_definition(data: dict):
with open(cfbs_filename(), "w") as f:
f.write(pretty(data))


def pretty_command(filenames: list) -> int:
if not filenames:
user_error("Filenames missing for cfbs pretty command")
Expand Down Expand Up @@ -105,6 +106,7 @@ def status_command() -> int:

return 0


def get_index_from_config():
if not os.path.isfile(cfbs_filename()):
return None
Expand All @@ -113,6 +115,7 @@ def get_index_from_config():
return None
return conf["index"]


def search_command(terms: list, index=None) -> int:
if not index:
index = get_index_from_config()
Expand All @@ -138,7 +141,6 @@ def search_command(terms: list, index=None) -> int:
return 0 if found else 1



def local_module_name(module_path):
assert os.path.exists(module_path)
module = module_path
Expand Down
3 changes: 2 additions & 1 deletion cfbs/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

from cfbs.pretty import pretty_file, pretty

class Index():

class Index:
def __init__(self, path):
self.path = path
if not self.path:
Expand Down
4 changes: 1 addition & 3 deletions cfbs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def get_args():
parser.add_argument(
"--force", help="Force rebuild / redownload", action="store_true"
)
parser.add_argument(
"--index", help="Specify alternate index", type=str
)
parser.add_argument("--index", help="Specify alternate index", type=str)

args = parser.parse_args()
return args
Expand Down

0 comments on commit 9ff56d4

Please sign in to comment.