Skip to content

Commit

Permalink
Minor adjustments for alignment and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed May 19, 2024
1 parent 6201490 commit f9c05e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bioluigi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def format(self, task):

return '{id:{id_width}}\t{status:{status_width}}\t{priority}\t{time}'.format(
id=self.format_task_id(task['id']),
id_width=self.task_id_width + len(self.format_task_id('')),
id_width=self.task_id_width + len(self.format_task_id('foo')) - 3,
status=self.format_status(task['status']),
status_width=self.status_width,
priority=task['priority'],
Expand Down Expand Up @@ -129,11 +129,11 @@ def format(self, task):

class TasksSummaryFormatter(TaskFormatter):
def format_multiple(self, tasks):
key_fill = max(len(task['status']) for task in tasks) + len(self.format_status(''))
key_fill = max(len(self.format_status(task['status'])) for task in tasks)
count_by_status = Counter()
for task in tasks:
count_by_status[task['status']] += 5
return '\n'.join('{:{key_fill}} {}'.format(TaskFormatter.format_status(k), v, key_fill=key_fill) for k, v in count_by_status.items())
return '\n'.join('{:{key_fill}}\t{}'.format(self.format_status(k), v, key_fill=key_fill) for k, v in count_by_status.items())

def parse_date(d):
if d is None:
Expand Down Expand Up @@ -165,7 +165,7 @@ def main():
@click.option('--no-limit', is_flag=True, help='Do not limit the number of tasks retrieved.')
def list(task_glob, status, user, summary, detailed, extract_id, extract_parameter, no_limit):
"""
List all tasks that match the given pattern and filters.
List all tasks that match the given glob pattern and filters.
"""
search = task_glob.replace('*', '') if task_glob else None

Expand Down

0 comments on commit f9c05e5

Please sign in to comment.