Changeset - c3e0cc869bcc
[Not reviewed]
0 1 0
Brett Smith - 3 years ago 2021-03-09 21:17:30
brettcsmith@brettcsmith.org
query: Improve help text in interactive shell.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/query.py
Show inline comments
...
 
@@ -6,12 +6,13 @@
 
# LICENSE.txt in the repository.
 

	
 
import argparse
 
import contextlib
 
import datetime
 
import enum
 
import functools
 
import itertools
 
import logging
 
import sys
 

	
 
from typing import (
 
    cast,
...
 
@@ -119,12 +120,13 @@ class StrMeta(bc_query_env.AnyMeta):
 
            return ''
 
        else:
 
            return str(raw_value)
 

	
 

	
 
class AggregateSet(bc_query_compile.EvalAggregator):
 
    """Filter argument values that aren't unique."""
 
    __intypes__ = [object]
 

	
 
    def __init__(self, operands: List[str]) -> None:
 
       super().__init__(operands, set)
 

	
 
    def allocate(self, allocator: bc_query_execute.Allocator) -> None:
...
 
@@ -220,12 +222,13 @@ class BQLShell(bc_query_shell.BQLShell):
 
            line: str,
 
            default_close_date: Optional[datetime.datetime]=None,
 
    ) -> None:
 
        self.last_line_parsed = line
 
        super().run_parser(line, default_close_date)
 

	
 
    @functools.wraps(bc_query_shell.BQLShell.on_Select, ('__doc__',))
 
    def on_Select(self, statement: QueryStatement) -> None:
 
        output_format: str = self.vars['format']
 
        try:
 
            render_func = getattr(self, f'_render_{output_format}')
 
        except AttributeError:
 
            logger.error("unknown output format %r", output_format)
0 comments (0 inline, 0 general)