after_merge
stringlengths
28
79.6k
before_merge
stringlengths
20
79.6k
url
stringlengths
38
71
full_traceback
stringlengths
43
922k
traceback_type
stringclasses
555 values
def create_kwargs( constructor: Callable[..., T], cls: Type[T], params: Params, **extras ) -> Dict[str, Any]: """ Given some class, a `Params` object, and potentially other keyword arguments, create a dict of keyword args suitable for passing to the class's constructor. The function does this by fi...
def create_kwargs( constructor: Callable[..., T], cls: Type[T], params: Params, **extras ) -> Dict[str, Any]: """ Given some class, a `Params` object, and potentially other keyword arguments, create a dict of keyword args suitable for passing to the class's constructor. The function does this by fi...
https://github.com/allenai/allennlp/issues/4614
Traceback (most recent call last): File "tmp.py", line 10, in <module> Foo.from_params(Params({"a": 2, "b": "hi"})) File "/Users/evanw/AllenAI/allennlp/allennlp/common/from_params.py", line 610, in from_params kwargs = create_kwargs(constructor_to_inspect, cls, params, **extras) File "/Users/evanw/AllenAI/allennlp/alle...
RuntimeError
def from_params( cls: Type[T], params: Params, constructor_to_call: Callable[..., T] = None, constructor_to_inspect: Callable[..., T] = None, **extras, ) -> T: """ This is the automatic implementation of `from_params`. Any class that subclasses `FromParams` (or `Registrable`, which itsel...
def from_params( cls: Type[T], params: Params, constructor_to_call: Callable[..., T] = None, constructor_to_inspect: Callable[..., T] = None, **extras, ) -> T: """ This is the automatic implementation of `from_params`. Any class that subclasses `FromParams` (or `Registrable`, which itsel...
https://github.com/allenai/allennlp/issues/4614
Traceback (most recent call last): File "tmp.py", line 10, in <module> Foo.from_params(Params({"a": 2, "b": "hi"})) File "/Users/evanw/AllenAI/allennlp/allennlp/common/from_params.py", line 610, in from_params kwargs = create_kwargs(constructor_to_inspect, cls, params, **extras) File "/Users/evanw/AllenAI/allennlp/alle...
RuntimeError
def infer_params(cls: Type[T], constructor: Callable[..., T] = None) -> Dict[str, Any]: if constructor is None: constructor = cls.__init__ signature = inspect.signature(constructor) parameters = dict(signature.parameters) has_kwargs = False var_positional_key = None for param in parame...
def infer_params(cls: Type[T], constructor: Callable[..., T] = None) -> Dict[str, Any]: if cls == FromParams: return {} if constructor is None: constructor = cls.__init__ signature = inspect.signature(constructor) parameters = dict(signature.parameters) has_kwargs = False for p...
https://github.com/allenai/allennlp/issues/4614
Traceback (most recent call last): File "tmp.py", line 10, in <module> Foo.from_params(Params({"a": 2, "b": "hi"})) File "/Users/evanw/AllenAI/allennlp/allennlp/common/from_params.py", line 610, in from_params kwargs = create_kwargs(constructor_to_inspect, cls, params, **extras) File "/Users/evanw/AllenAI/allennlp/alle...
RuntimeError
def __call__(self, tensor: torch.Tensor, parameter_name: str, **kwargs) -> None: # type: ignore # Select the new parameter name if it's being overridden if parameter_name in self.parameter_name_overrides: parameter_name = self.parameter_name_overrides[parameter_name] # If the size of the source an...
def __call__(self, tensor: torch.Tensor, parameter_name: str, **kwargs) -> None: # type: ignore # Select the new parameter name if it's being overridden if parameter_name in self.parameter_name_overrides: parameter_name = self.parameter_name_overrides[parameter_name] # If the size of the source an...
https://github.com/allenai/allennlp/issues/4427
Traceback (most recent call last): File "test.py", line 27, in <module> applicator(net) File "/Users/reiyw/.ghq/ghq/github.com/allenai/allennlp/allennlp/nn/initializers.py", line 482, in __call__ initializer(parameter, parameter_name=name) File "/Users/reiyw/.ghq/ghq/github.com/allenai/allennlp/allennlp/nn/initializers...
IndexError
def from_path( cls, archive_path: str, predictor_name: str = None, cuda_device: int = -1, dataset_reader_to_load: str = "validation", frozen: bool = True, import_plugins: bool = True, ) -> "Predictor": """ Instantiate a `Predictor` from an archive path. If you need more detailed...
def from_path( cls, archive_path: str, predictor_name: str = None, cuda_device: int = -1, dataset_reader_to_load: str = "validation", frozen: bool = True, ) -> "Predictor": """ Instantiate a `Predictor` from an archive path. If you need more detailed configuration options, such as o...
https://github.com/allenai/allennlp/issues/4319
--------------------------------------------------------------------------- --------------------------------------------------------------------------- ConfigurationError Traceback (most recent call last) <ipython-input-56-91de5da48e5e> in <module>() 10 from allennlp.predictors.predictor import P...
ConfigurationError
def tokens_to_indices( self, tokens: List[Token], vocabulary: Vocabulary ) -> IndexedTokenList: self._matched_indexer._add_encoding_to_vocabulary_if_needed(vocabulary) wordpieces, offsets = self._allennlp_tokenizer.intra_word_tokenize( [t.text for t in tokens] ) # For tokens that don't cor...
def tokens_to_indices( self, tokens: List[Token], vocabulary: Vocabulary ) -> IndexedTokenList: self._matched_indexer._add_encoding_to_vocabulary_if_needed(vocabulary) wordpieces, offsets = self._allennlp_tokenizer.intra_word_tokenize( [t.text for t in tokens] ) output: IndexedTokenList = {...
https://github.com/allenai/allennlp/issues/4281
Traceback (most recent call last): File "/home/arthur/question-generation/models/sg_dqg.py", line 156, in <module> preprocess(args.ds) File "/home/arthur/question-generation/models/sg_dqg.py", line 124, in preprocess coreferences = coreference_resolution(evidences_list) File "/home/arthur/question-generation/models/sg_...
TypeError
def forward( self, token_ids: torch.LongTensor, mask: torch.BoolTensor, offsets: torch.LongTensor, wordpiece_mask: torch.BoolTensor, type_ids: Optional[torch.LongTensor] = None, segment_concat_mask: Optional[torch.BoolTensor] = None, ) -> torch.Tensor: # type: ignore """ # Parameter...
def forward( self, token_ids: torch.LongTensor, mask: torch.BoolTensor, offsets: torch.LongTensor, wordpiece_mask: torch.BoolTensor, type_ids: Optional[torch.LongTensor] = None, segment_concat_mask: Optional[torch.BoolTensor] = None, ) -> torch.Tensor: # type: ignore """ # Parameter...
https://github.com/allenai/allennlp/issues/4281
Traceback (most recent call last): File "/home/arthur/question-generation/models/sg_dqg.py", line 156, in <module> preprocess(args.ds) File "/home/arthur/question-generation/models/sg_dqg.py", line 124, in preprocess coreferences = coreference_resolution(evidences_list) File "/home/arthur/question-generation/models/sg_...
TypeError
def get_posonlyargs(node: AnyFunctionDefAndLambda) -> List[ast.arg]: """ Function to get posonlyargs in all versions of python. This field was added in ``python3.8+``. And it was not present before. mypy also gives an error on this on older version of python:: error: "arguments" has no attrib...
def get_posonlyargs(node: AnyFunctionDefAndLambda) -> List[ast.arg]: """ Helper function to get posonlyargs in all version of python. This field was added in ``python3.8+``. And it was not present before. mypy also gives an error on this on older version of python:: error: "arguments" has no ...
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def get_annotation_compexity(annotation_node: _Annotation) -> int: """ Recursevly counts complexity of annotation nodes. When annotations are written as strings, we additionally parse them to ``ast`` nodes. """ if isinstance(annotation_node, ast.Str): # try to parse string-wrapped annot...
def get_annotation_compexity(annotation_node: _Annotation) -> int: """ Recursevly counts complexity of annotation nodes. When annotations are written as strings, we additionally parse them to ``ast`` nodes. """ if isinstance(annotation_node, ast.Str): # try to parse string-wrapped annot...
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def is_same_slice( iterable: str, target: str, node: ast.Subscript, ) -> bool: """Used to tell when slice is identical to some pair of name/index.""" return ( source.node_to_string(node.value) == iterable and source.node_to_string(get_slice_expr(node)) == target )
def is_same_slice( iterable: str, target: str, node: ast.Subscript, ) -> bool: """Used to tell when slice is identical to some pair of name/index.""" return ( source.node_to_string(node.value) == iterable and isinstance(node.slice, ast.Index) # mypy is unhappy and source.nod...
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def _is_valid_final_value(self, format_value: ast.AST) -> bool: # Variable lookup is okay and a single attribute is okay if isinstance(format_value, (ast.Name, ast.Attribute)): return True # Function call with empty arguments is okay elif isinstance(format_value, ast.Call) and not format_value.a...
def _is_valid_final_value(self, format_value: ast.AST) -> bool: # Variable lookup is okay and a single attribute is okay if isinstance(format_value, (ast.Name, ast.Attribute)): return True # Function call with empty arguments is okay elif isinstance(format_value, ast.Call) and not format_value.a...
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def _check_float_key(self, node: ast.Subscript) -> None: if self._is_float_key(get_slice_expr(node)): self.add_violation(best_practices.FloatKeyViolation(node))
def _check_float_key(self, node: ast.Subscript) -> None: is_float_key = isinstance(node.slice, ast.Index) and self._is_float_key(node.slice) if is_float_key: self.add_violation(best_practices.FloatKeyViolation(node))
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def _check_len_call(self, node: ast.Subscript) -> None: node_slice = get_slice_expr(node) is_len_call = ( isinstance(node_slice, ast.BinOp) and isinstance(node_slice.op, ast.Sub) and self._is_wrong_len( node_slice, source.node_to_string(node.value), ) ...
def _check_len_call(self, node: ast.Subscript) -> None: is_len_call = ( isinstance(node.slice, ast.Index) and isinstance(node.slice.value, ast.BinOp) and isinstance(node.slice.value.op, ast.Sub) and self._is_wrong_len( node.slice.value, source.node_to_string(n...
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def _is_float_key(self, node: ast.expr) -> bool: real_node = operators.unwrap_unary_node(node) return isinstance(real_node, ast.Num) and isinstance(real_node.n, float)
def _is_float_key(self, node: ast.Index) -> bool: real_node = operators.unwrap_unary_node(node.value) return isinstance(real_node, ast.Num) and isinstance(real_node.n, float)
https://github.com/wemake-services/wemake-python-styleguide/issues/1652
/Users/DBoger/PycharmProjects/project/.venv/bin/python -m flake8 project Traceback (most recent call last): File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/site-packages/wemake_python_styleguide/checker.py", line 154, in run visitor.run() File "/Users/DBoger/PycharmProjects/project/.venv/lib/python3.9/s...
AttributeError
def show_source(self, error: Violation) -> str: """Called when ``--show-source`` option is provided.""" if not self._should_show_source(error): return "" formated_line = error.physical_line.lstrip() adjust = len(error.physical_line) - len(formated_line) code = _highlight( formated_...
def show_source(self, error: Violation) -> str: """Called when ``--show-source`` option is provided.""" if not self._should_show_source(error): return "" formated_line = error.physical_line.lstrip() adjust = len(error.physical_line) - len(formated_line) code = highlight( formated_l...
https://github.com/wemake-services/wemake-python-styleguide/issues/794
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/click/termui.py", line 372, in style bits.append('\033[%dm' % (_ansi_colors.index(fg) + 30)) ValueError: tuple.index(x): x not in tuple During handling of the above exception, another exception occu...
ValueError
def _check_useless_math_operator( self, op: ast.operator, left: Optional[ast.AST], right: Optional[ast.AST] = None, ) -> None: if isinstance(left, ast.Num) and left.n in self._left_special_cases: if right and isinstance(op, self._left_special_cases[left.n]): left = None non_...
def _check_useless_math_operator( self, op: ast.operator, left: ast.AST, right: Optional[ast.AST] = None, ) -> None: if isinstance(left, ast.Num) and right: if left.n == 1: left = None non_negative_numbers = self._get_non_negative_nodes(left, right) for number in non_neg...
https://github.com/wemake-services/wemake-python-styleguide/issues/794
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/click/termui.py", line 372, in style bits.append('\033[%dm' % (_ansi_colors.index(fg) + 30)) ValueError: tuple.index(x): x not in tuple During handling of the above exception, another exception occu...
ValueError
def _get_non_negative_nodes( self, left: Optional[ast.AST], right: Optional[ast.AST] = None, ): non_negative_numbers = [] for node in filter(None, (left, right)): real_node = unwrap_unary_node(node) if not isinstance(real_node, ast.Num): continue if real_node.n n...
def _get_non_negative_nodes( self, left: ast.AST, right: Optional[ast.AST] = None, ): non_negative_numbers = [] for node in filter(None, (left, right)): real_node = unwrap_unary_node(node) if not isinstance(real_node, ast.Num): continue if real_node.n not in self...
https://github.com/wemake-services/wemake-python-styleguide/issues/794
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/click/termui.py", line 372, in style bits.append('\033[%dm' % (_ansi_colors.index(fg) + 30)) ValueError: tuple.index(x): x not in tuple During handling of the above exception, another exception occu...
ValueError
def visit_collection(self, node: AnyCollection) -> None: """Checks how collection items indentation.""" if isinstance(node, ast.Dict): elements = normalize_dict_elements(node) else: elements = node.elts self._check_indentation(node, elements, extra_lines=1) self.generic_visit(node)
def visit_collection(self, node: AnyCollection) -> None: """Checks how collection items indentation.""" elements = node.keys if isinstance(node, ast.Dict) else node.elts self._check_indentation(node, elements, extra_lines=1) self.generic_visit(node)
https://github.com/wemake-services/wemake-python-styleguide/issues/450
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/developer2/.local/share/virtualenvs/backend-0eAQt0K2/lib/python3.7/site-packages/flake8/checker.py", line 682, in _run_chec...
AttributeError
def check_attribute_name(self, node: ast.ClassDef) -> None: top_level_assigns = [ sub_node for sub_node in node.body if isinstance(sub_node, ast.Assign) ] for assignment in top_level_assigns: for target in assignment.targets: if not isinstance(target, ast.Name): ...
def check_attribute_name(self, node: ast.ClassDef) -> None: top_level_assigns = [ sub_node for sub_node in node.body if isinstance(sub_node, ast.Assign) ] for assignment in top_level_assigns: for target in assignment.targets: name = getattr(target, "id", None) if log...
https://github.com/wemake-services/wemake-python-styleguide/issues/423
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/boger/virtualvenvs/myproject-backend-v3/lib/python3.6...
TypeError
def __init__(self, tree: Module, filename: str = constants.STDIN) -> None: """Creates new checker instance.""" self.tree = tree self.filename = filename
def __init__(self, tree: Module, filename: str = constants.STDIN) -> None: """Creates new checker instance.""" self.tree = maybe_set_parent(tree) self.filename = filename
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def fix_line_number(tree: ast.AST) -> ast.AST: """ Adjusts line number for some nodes. They are set incorrectly for some collections. It might be either a bug or a feature. We do several checks here, to be sure that we won't get an incorrect line number. But, we basically check if there's ...
def fix_line_number(tree: ast.AST) -> ast.AST: """ Adjusts line number for some nodes. They are set incorrectly for some collections. It might be either a bug or a feature. We do several checks here, to be sure that we won't get an incorrect line number. But, we basically check if there's ...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _set_parent(tree: ast.AST) -> ast.AST: """ Sets parents for all nodes that do not have this prop. This step is required due to how `flake8` works. It does not set the same properties as `ast` module. This function was the cause of `issue-112`. Twice. Since the ``0.6.1`` we use ``'wps_paren...
def _set_parent(tree: ast.AST) -> ast.AST: """ Sets parents for all nodes that do not have this prop. This step is required due to how `flake8` works. It does not set the same properties as `ast` module. This function was the cause of `issue-112`. .. versionchanged:: 0.0.11 """ for s...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _get_real_parent(self, node: Optional[ast.AST]) -> Optional[ast.AST]: """ Returns real number's parent. What can go wrong? 1. Number can be negative: ``x = -1``, so ``1`` has ``UnaryOp`` as parent, but should return ``Assign`` """ parent = getattr(node, "wps_parent", None) if is...
def _get_real_parent(self, node: Optional[ast.AST]) -> Optional[ast.AST]: """ Returns real number's parent. What can go wrong? 1. Number can be negative: ``x = -1``, so ``1`` has ``UnaryOp`` as parent, but should return ``Assign`` """ parent = getattr(node, "parent", None) if isinst...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_members_count(self, node: ModuleMembers) -> None: """This method increases the number of module members.""" parent = getattr(node, "wps_parent", None) is_real_method = is_method(getattr(node, "function_type", None)) if isinstance(parent, ast.Module) and not is_real_method: self._publ...
def _check_members_count(self, node: ModuleMembers) -> None: """This method increases the number of module members.""" parent = getattr(node, "parent", None) is_real_method = is_method(getattr(node, "function_type", None)) if isinstance(parent, ast.Module) and not is_real_method: self._public_i...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_method(self, node: AnyFunctionDef) -> None: parent = getattr(node, "wps_parent", None) if isinstance(parent, ast.ClassDef): self._methods[parent] += 1
def _check_method(self, node: AnyFunctionDef) -> None: parent = getattr(node, "parent", None) if isinstance(parent, ast.ClassDef): self._methods[parent] += 1
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _update_variables( self, function: AnyFunctionDef, variable_def: ast.Name, ) -> None: """ Increases the counter of local variables. What is treated as a local variable? Check ``TooManyLocalsViolation`` documentation. """ function_variables = self.variables[function] if varia...
def _update_variables( self, function: AnyFunctionDef, variable_def: ast.Name, ) -> None: """ Increases the counter of local variables. What is treated as a local variable? Check ``TooManyLocalsViolation`` documentation. """ function_variables = self.variables[function] if varia...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_nested_function(self, node: AnyFunctionDef) -> None: parent = getattr(node, "wps_parent", None) is_inside_function = isinstance(parent, self._function_nodes) if is_inside_function and node.name not in NESTED_FUNCTIONS_WHITELIST: self.add_violation(NestedFunctionViolation(node, text=node....
def _check_nested_function(self, node: AnyFunctionDef) -> None: parent = getattr(node, "parent", None) is_inside_function = isinstance(parent, self._function_nodes) if is_inside_function and node.name not in NESTED_FUNCTIONS_WHITELIST: self.add_violation(NestedFunctionViolation(node, text=node.name...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_nested_classes(self, node: ast.ClassDef) -> None: parent = getattr(node, "wps_parent", None) is_inside_class = isinstance(parent, ast.ClassDef) is_inside_function = isinstance(parent, self._function_nodes) if is_inside_class and node.name not in NESTED_CLASSES_WHITELIST: self.add_vio...
def _check_nested_classes(self, node: ast.ClassDef) -> None: parent = getattr(node, "parent", None) is_inside_class = isinstance(parent, ast.ClassDef) is_inside_function = isinstance(parent, self._function_nodes) if is_inside_class and node.name not in NESTED_CLASSES_WHITELIST: self.add_violati...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_nested_lambdas(self, node: ast.Lambda) -> None: parent = getattr(node, "wps_parent", None) if isinstance(parent, ast.Lambda): self.add_violation(NestedFunctionViolation(node))
def _check_nested_lambdas(self, node: ast.Lambda) -> None: parent = getattr(node, "parent", None) if isinstance(parent, ast.Lambda): self.add_violation(NestedFunctionViolation(node))
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def check_nested_import(self, node: AnyImport) -> None: parent = getattr(node, "wps_parent", None) if parent is not None and not isinstance(parent, ast.Module): self._error_callback(NestedImportViolation(node))
def check_nested_import(self, node: AnyImport) -> None: parent = getattr(node, "parent", None) if parent is not None and not isinstance(parent, ast.Module): self._error_callback(NestedImportViolation(node))
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_ifs(self, node: ast.comprehension) -> None: if len(node.ifs) > self._max_ifs: # We are trying to fix line number in the report, # since `comprehension` does not have this property. parent = getattr(node, "wps_parent", node) self.add_violation(MultipleIfsInComprehensionViol...
def _check_ifs(self, node: ast.comprehension) -> None: if len(node.ifs) > self._max_ifs: # We are trying to fix line number in the report, # since `comprehension` does not have this property. parent = getattr(node, "parent", node) self.add_violation(MultipleIfsInComprehensionViolatio...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_fors(self, node: ast.comprehension) -> None: parent = getattr(node, "wps_parent", node) self._fors[parent] = len(parent.generators)
def _check_fors(self, node: ast.comprehension) -> None: parent = getattr(node, "parent", node) self._fors[parent] = len(parent.generators)
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_metadata(self, node: ast.Assign) -> None: node_parent = getattr(node, "wps_parent", None) if not isinstance(node_parent, ast.Module): return for target_node in node.targets: target_node_id = getattr(target_node, "id", None) if target_node_id in MODULE_METADATA_VARIABLES_B...
def _check_metadata(self, node: ast.Assign) -> None: node_parent = getattr(node, "parent", None) if not isinstance(node_parent, ast.Module): return for target_node in node.targets: target_node_id = getattr(target_node, "id", None) if target_node_id in MODULE_METADATA_VARIABLES_BLACK...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def _check_expression( self, node: ast.Expr, is_first: bool = False, ) -> None: if isinstance(node.value, self._have_effect): return if is_first and is_doc_string(node): parent = getattr(node, "wps_parent", None) if isinstance(parent, self._have_doc_strings): ret...
def _check_expression( self, node: ast.Expr, is_first: bool = False, ) -> None: if isinstance(node.value, self._have_effect): return if is_first and is_doc_string(node): parent = getattr(node, "parent", None) if isinstance(parent, self._have_doc_strings): return ...
https://github.com/wemake-services/wemake-python-styleguide/issues/112
multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/Users/sobolev/Documents/PyCharmProjects/rostelecom_svetochka/...
AttributeError
def do_render(self, cr, widget, background_area, cell_area, flags): vw_tags = self.__count_viewable_tags() count = 0 # Select source if self.tag_list is not None: tags = self.tag_list elif self.tag is not None: tags = [self.tag] else: return if self.config.get("dark...
def do_render(self, cr, widget, background_area, cell_area, flags): vw_tags = self.__count_viewable_tags() count = 0 # Select source if self.tag_list is not None: tags = self.tag_list elif self.tag is not None: tags = [self.tag] else: return if self.config.get("dark...
https://github.com/getting-things-gnome/gtg/issues/411
Traceback (most recent call last): File "/app/lib/python3.7/site-packages/GTG/gtk/browser/simple_color_selector.py", line 108, in on_expose self.__draw(cr) File "/app/lib/python3.7/site-packages/GTG/gtk/browser/simple_color_selector.py", line 71, in __draw Gdk.cairo_set_source_color(gdkcontext, my_color) TypeError: Arg...
TypeError
def __draw(self, cr): """Draws the widget""" alloc = self.get_allocation() # FIXME - why to use a special variables? alloc_w, alloc_h = alloc.width, alloc.height # Drawing context # cr_ctxt = Gdk.cairo_create(self.window) # gdkcontext = Gdk.CairoContext(cr_ctxt) # FIXME gdkcontext...
def __draw(self, cr): """Draws the widget""" alloc = self.get_allocation() # FIXME - why to use a special variables? alloc_w, alloc_h = alloc.width, alloc.height # Drawing context # cr_ctxt = Gdk.cairo_create(self.window) # gdkcontext = Gdk.CairoContext(cr_ctxt) # FIXME gdkcontext...
https://github.com/getting-things-gnome/gtg/issues/411
Traceback (most recent call last): File "/app/lib/python3.7/site-packages/GTG/gtk/browser/simple_color_selector.py", line 108, in on_expose self.__draw(cr) File "/app/lib/python3.7/site-packages/GTG/gtk/browser/simple_color_selector.py", line 71, in __draw Gdk.cairo_set_source_color(gdkcontext, my_color) TypeError: Arg...
TypeError
def insert_existing_subtask(self, tid: str, line: int = None) -> None: """Insert an existing subtask in the buffer.""" # Check if the task exists first if not self.req.has_task(tid): log.debug(f"Task {tid} not found") return if line is not None: start = self.buffer.get_iter_at_...
def insert_existing_subtask(self, tid: str, line: int = None) -> None: """Insert an existing subtask in the buffer.""" # Check if the task exists first if not self.req.has_task(tid): log.debug(f"Task {tid} not found") return if line is not None: start = self.buffer.get_iter_at_...
https://github.com/getting-things-gnome/gtg/issues/496
2020-10-25 02:22:28,806 - ERROR - application:open_task:483 - Task 2376f725-ab76-4de9-b97a-489bf9bfb3d2 could not be found! Traceback (most recent call last): File "GTG/gtk/editor/text_tags.py", line 132, in on_tag view.open_subtask_cb(self.tid) File "GTG/gtk/editor/editor.py", line 709, in open_subtask self.app.close_...
AttributeError
def delete_editor_task(self, action, params): """Callback to delete the task currently open.""" editor = self.get_active_editor() task = editor.task if task.is_new(): self.close_task(task.get_id()) else: self.delete_tasks([task.get_id()], editor.window)
def delete_editor_task(self, action, params): """Callback to delete the task currently open.""" editor = self.get_active_editor() task = editor.task if task.is_new(): self.close_task(task.get_id(), editor.window) else: self.delete_tasks([task.get_id()], editor.window)
https://github.com/getting-things-gnome/gtg/issues/338
Traceback (most recent call last): File "GTG/gtk/application.py", line 292, in delete_editor_task self.close_task(task.get_id(), editor.window) TypeError: close_task() takes 2 positional arguments but 3 were given
TypeError
def close_focused_task(self, action, params): """Callback to close currently focused task editor.""" editor = self.get_active_editor() if editor: self.close_task(editor.task.get_id())
def close_focused_task(self, action, params): """Callback to close currently focused task editor.""" if self.open_tasks: tid = self.get_active_editor().task.get_id() self.close_task(tid)
https://github.com/getting-things-gnome/gtg/issues/290
WARNING - application:close_task:467 - Tried to close tid d318eaed-03de-42dd-adfd-66a44bf2261c but it is not open Traceback (most recent call last): File "GTG/gtk/application.py", line 290, in close_focused_task tid = self.get_active_editor().task.get_id() AttributeError: 'NoneType' object has no attribute 'task' WAR...
AttributeError
def close_task(self, tid): """Close a task editor window.""" try: editor = self.open_tasks[tid] editor.close() open_tasks = self.config.get("opened_tasks") if tid in open_tasks: open_tasks.remove(tid) self.config.set("opened_tasks", open_tasks) except...
def close_task(self, tid): """Close a task editor window.""" if tid in self.open_tasks: editor = self.open_tasks[tid] # We have to remove the tid first, otherwise # close_task would be called once again # by editor.close del self.open_tasks[tid] editor.close() ...
https://github.com/getting-things-gnome/gtg/issues/290
WARNING - application:close_task:467 - Tried to close tid d318eaed-03de-42dd-adfd-66a44bf2261c but it is not open Traceback (most recent call last): File "GTG/gtk/application.py", line 290, in close_focused_task tid = self.get_active_editor().task.get_id() AttributeError: 'NoneType' object has no attribute 'task' WAR...
AttributeError
def destruction(self, _=None): """Callback when destroying the window.""" # Save should be also called when buffer is modified self.pengine.onTaskClose(self.plugin_api) self.pengine.remove_api(self.plugin_api) tid = self.task.get_id() if self.task.is_new(): self.req.delete_task(tid) ...
def destruction(self, a=None): # Save should be also called when buffer is modified self.pengine.onTaskClose(self.plugin_api) self.pengine.remove_api(self.plugin_api) tid = self.task.get_id() if self.task.is_new(): self.req.delete_task(tid) else: self.save() for i in self...
https://github.com/getting-things-gnome/gtg/issues/290
WARNING - application:close_task:467 - Tried to close tid d318eaed-03de-42dd-adfd-66a44bf2261c but it is not open Traceback (most recent call last): File "GTG/gtk/application.py", line 290, in close_focused_task tid = self.get_active_editor().task.get_id() AttributeError: 'NoneType' object has no attribute 'task' WAR...
AttributeError
def open_edit_backends(self, sender=None, backend_id=None): self.edit_backends_dialog = BackendsDialog(self.req) self.edit_backends_dialog.dialog.insert_action_group("app", self) self.edit_backends_dialog.activate() if backend_id: self.edit_backends_dialog.show_config_for_backend(backend_id)
def open_edit_backends(self, sender=None, backend_id=None): if not self.edit_backends_dialog: self.edit_backends_dialog = BackendsDialog(self.req) self.edit_backends_dialog.dialog.insert_action_group("app", self) self.edit_backends_dialog.activate() if backend_id is not None: self.e...
https://github.com/getting-things-gnome/gtg/issues/284
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback handler, args = _extract_handler_and_args(obj_or_map, handler_name) File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args raise AttributeError('...
AttributeError
def get_added_date_string(self): FORMAT = "%Y-%m-%dT%H:%M:%S" if self.added_date: return self.added_date.strftime(FORMAT) else: return datetime.now().strftime(FORMAT)
def get_added_date_string(self): if self.added_date: return self.added_date.strftime("%Y-%m-%dT%H:%M:%S") else: return Date.now()
https://github.com/getting-things-gnome/gtg/issues/256
Traceback (most recent call last): File "/home/jeff/gtg/GTG/gtk/browser/modify_tags.py", line 94, in on_confirm task.add_tag(tag) File "/home/jeff/gtg/GTG/core/task.py", line 707, in add_tag cgi.escape(tagname), sep, c) AttributeError: module 'cgi' has no attribute 'escape' Exception in thread Thread-2: Traceback (mos...
AttributeError
def set_title(self, title, transaction_ids=[]): """Sets the task title""" title = html.escape(title) result = self.rtm.tasks.setName( timeline=self.timeline, list_id=self.rtm_list.id, taskseries_id=self.rtm_taskseries.id, task_id=self.rtm_task.id, name=title, ) ...
def set_title(self, title, transaction_ids=[]): """Sets the task title""" title = cgi.escape(title) result = self.rtm.tasks.setName( timeline=self.timeline, list_id=self.rtm_list.id, taskseries_id=self.rtm_taskseries.id, task_id=self.rtm_task.id, name=title, ) ...
https://github.com/getting-things-gnome/gtg/issues/259
Traceback (most recent call last): File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 550, in modified self._detect_tag(buff, local_start, local_end) File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 740, in _detect_tag self.add_tag_callback(my_word) File "/home/jeff/gtg/GTG/core/task.py", line 707, in add_tag...
AttributeError
def set_text(self, text, transaction_ids=[]): """ deletes all the old notes in a task and sets a single note with the given text """ # delete old notes notes = self.rtm_taskseries.notes if notes: note_list = self.__getattr_the_rtm_way(notes, "note") for note_id in [note.id fo...
def set_text(self, text, transaction_ids=[]): """ deletes all the old notes in a task and sets a single note with the given text """ # delete old notes notes = self.rtm_taskseries.notes if notes: note_list = self.__getattr_the_rtm_way(notes, "note") for note_id in [note.id fo...
https://github.com/getting-things-gnome/gtg/issues/259
Traceback (most recent call last): File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 550, in modified self._detect_tag(buff, local_start, local_end) File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 740, in _detect_tag self.add_tag_callback(my_word) File "/home/jeff/gtg/GTG/core/task.py", line 707, in add_tag...
AttributeError
def set_text(self, texte): self.can_be_deleted = False if texte != "<content/>": # defensive programmation to filter bad formatted tasks if not texte.startswith("<content>"): texte = html.escape(texte, quote=True) texte = f"<content>{texte}" if not texte.endswith(...
def set_text(self, texte): self.can_be_deleted = False if texte != "<content/>": # defensive programmation to filter bad formatted tasks if not texte.startswith("<content>"): texte = cgi.escape(texte, quote=True) texte = f"<content>{texte}" if not texte.endswith("...
https://github.com/getting-things-gnome/gtg/issues/259
Traceback (most recent call last): File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 550, in modified self._detect_tag(buff, local_start, local_end) File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 740, in _detect_tag self.add_tag_callback(my_word) File "/home/jeff/gtg/GTG/core/task.py", line 707, in add_tag...
AttributeError
def add_tag(self, tagname): "Add a tag to the task and insert '@tag' into the task's content" if self.tag_added(tagname): c = self.content # strip <content>...</content> tags if c.startswith("<content>"): c = c[len("<content>") :] if c.endswith("</content>"): ...
def add_tag(self, tagname): "Add a tag to the task and insert '@tag' into the task's content" if self.tag_added(tagname): c = self.content # strip <content>...</content> tags if c.startswith("<content>"): c = c[len("<content>") :] if c.endswith("</content>"): ...
https://github.com/getting-things-gnome/gtg/issues/259
Traceback (most recent call last): File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 550, in modified self._detect_tag(buff, local_start, local_end) File "/home/jeff/gtg/GTG/gtk/editor/taskview.py", line 740, in _detect_tag self.add_tag_callback(my_word) File "/home/jeff/gtg/GTG/core/task.py", line 707, in add_tag...
AttributeError
def _get_tasks_from_blocks(task_blocks: Sequence) -> Generator: """Get list of tasks from list made of tasks and nested tasks.""" NESTED_TASK_KEYS = [ "block", "always", "rescue", ] def get_nested_tasks(task: Any) -> Generator[Any, None, None]: for k in NESTED_TASK_KEYS:...
def _get_tasks_from_blocks(task_blocks: Sequence) -> Generator: """Get list of tasks from list made of tasks and nested tasks.""" NESTED_TASK_KEYS = [ "block", "always", "rescue", ] def get_nested_tasks(task: Any) -> Generator[Any, None, None]: return ( subta...
https://github.com/ansible-community/ansible-lint/issues/792
Traceback (most recent call last): File "/Users/ssbarnea/.pyenv/versions/3.8.2/bin/ansible-lint", line 11, in <module> load_entry_point('ansible-lint', 'console_scripts', 'ansible-lint')() File "/Users/ssbarnea/c/os/ansible-lint/lib/ansiblelint/__main__.py", line 94, in main matches.extend(runner.run()) File "/Users/ss...
TypeError
def get_nested_tasks(task: Any) -> Generator[Any, None, None]: for k in NESTED_TASK_KEYS: if task and k in task and task[k]: for subtask in task[k]: yield subtask
def get_nested_tasks(task: Any) -> Generator[Any, None, None]: return ( subtask for k in NESTED_TASK_KEYS if task and k in task for subtask in task[k] )
https://github.com/ansible-community/ansible-lint/issues/792
Traceback (most recent call last): File "/Users/ssbarnea/.pyenv/versions/3.8.2/bin/ansible-lint", line 11, in <module> load_entry_point('ansible-lint', 'console_scripts', 'ansible-lint')() File "/Users/ssbarnea/c/os/ansible-lint/lib/ansiblelint/__main__.py", line 94, in main matches.extend(runner.run()) File "/Users/ss...
TypeError
def _taskshandlers_children(basedir, k, v, parent_type: FileType) -> List: results = [] if v is None: raise MatchError( message="A malformed block was encountered while loading a block.", rule=RuntimeErrorRule, ) for th in v: # ignore empty tasks, `-` ...
def _taskshandlers_children(basedir, k, v, parent_type: FileType) -> List: results = [] for th in v: # ignore empty tasks, `-` if not th: continue with contextlib.suppress(LookupError): children = _get_task_handler_children_for_tasks_or_playbooks( ...
https://github.com/ansible-community/ansible-lint/issues/792
Traceback (most recent call last): File "/Users/ssbarnea/.pyenv/versions/3.8.2/bin/ansible-lint", line 11, in <module> load_entry_point('ansible-lint', 'console_scripts', 'ansible-lint')() File "/Users/ssbarnea/c/os/ansible-lint/lib/ansiblelint/__main__.py", line 94, in main matches.extend(runner.run()) File "/Users/ss...
TypeError
def matchyaml(self, file: dict, text: str) -> List[MatchError]: matches: List[MatchError] = [] if not self.matchplay: return matches yaml = ansiblelint.utils.parse_yaml_linenumbers(text, file["path"]) # yaml returned can be an AnsibleUnicode (a string) when the yaml # file contains a single...
def matchyaml(self, file: dict, text: str) -> List[MatchError]: matches: List[MatchError] = [] if not self.matchplay: return matches yaml = ansiblelint.utils.parse_yaml_linenumbers(text, file["path"]) # yaml returned can be an AnsibleUnicode (a string) when the yaml # file contains a single...
https://github.com/ansible-community/ansible-lint/issues/849
(venv) user@test:~/ansible$ cat test.yml - #debug: # msg: Hello! (venv) user@test:~/ansible$ ansible-lint test.yml -vvv DEBUG Logging initialized to level 10 DEBUG Options: Namespace(colored=True, config_file=None, display_relative_path=True, exclude_paths=[], format='plain', listrules=False, listtags=False, pa...
AttributeError
def _playbook_items(pb_data: dict) -> ItemsView: if isinstance(pb_data, dict): return pb_data.items() elif not pb_data: return [] else: # "if play" prevents failure if the play sequence containes None, # which is weird but currently allowed by Ansible # https://github...
def _playbook_items(pb_data: dict) -> ItemsView: if isinstance(pb_data, dict): return pb_data.items() elif not pb_data: return [] else: return [item for play in pb_data for item in play.items()]
https://github.com/ansible-community/ansible-lint/issues/849
(venv) user@test:~/ansible$ cat test.yml - #debug: # msg: Hello! (venv) user@test:~/ansible$ ansible-lint test.yml -vvv DEBUG Logging initialized to level 10 DEBUG Options: Namespace(colored=True, config_file=None, display_relative_path=True, exclude_paths=[], format='plain', listrules=False, listtags=False, pa...
AttributeError
def expand_path_vars(path: str) -> str: """Expand the environment or ~ variables in a path string.""" # It may be possible for function to be called with a Path object path = str(path).strip() path = os.path.expanduser(path) path = os.path.expandvars(path) return path
def expand_path_vars(path: str) -> str: """Expand the environment or ~ variables in a path string.""" path = path.strip() path = os.path.expanduser(path) path = os.path.expandvars(path) return path
https://github.com/ansible-community/ansible-lint/issues/969
DEBUG Logging initialized to level 10 DEBUG Options: Namespace(colored=True, config_file=None, display_relative_path=True, exclude_paths=[], format='plain', listrules=False, listtags=False, parseable=False, parseable_severity=False, playbook=['playbook.yml'], quiet=False, rulesdir=[PosixPath('/lint-rules')], skip...
AttributeError
def focus_event(self): if self.focus is None: return None else: return self.focus.original_widget
def focus_event(self): return self.focus.original_widget
https://github.com/pimutils/khal/issues/986
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/khal/ui/__init__.py", line 1348, in start_pane loop.run() File "/usr/lib/python3.8/site-packages/urwid/main_loop.py", line 287, in run self._run() File "/usr/lib/python3.8/site-packages/urwid/main_loop.py", line 385, in _run self.event_loop.run()...
AttributeError
def config_checks( config, _get_color_from_vdir=get_color_from_vdir, _get_vdir_type=get_vdir_type ): """do some tests on the config we cannot do with configobj's validator""" if len(config["calendars"].keys()) < 1: logger.fatal("Found no calendar section in the config file") raise InvalidSet...
def config_checks( config, _get_color_from_vdir=get_color_from_vdir, _get_vdir_type=get_vdir_type ): """do some tests on the config we cannot do with configobj's validator""" if len(config["calendars"].keys()) < 1: logger.fatal("Found no calendar section in the config file") raise InvalidSet...
https://github.com/pimutils/khal/issues/856
Traceback (most recent call last): File "/home/linuxbrew/.linuxbrew/bin/ikhal", line 10, in <module> sys.exit(main_ikhal()) File "/home/linuxbrew/.linuxbrew/lib/python3.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/home/linuxbrew/.linuxbrew/lib/python3.7/site-packages/cl...
KeyError
def __init__(self, rrule, conf, startdt): self._conf = conf self._startdt = startdt self._rrule = rrule self.repeat = bool(rrule) self._allow_edit = not self.repeat or self.check_understood_rrule(rrule) self.repeat_box = urwid.CheckBox( "Repeat: ", state=self.repeat, on_s...
def __init__(self, rrule, conf, startdt): self._conf = conf self._startdt = startdt self._rrule = rrule self.repeat = bool(rrule) self._allow_edit = not self.repeat or self.check_understood_rrule(rrule) self.repeat_box = urwid.CheckBox( "Repeat: ", state=self.repeat, on_s...
https://github.com/pimutils/khal/issues/707
Traceback (most recent call last):i Walker (*1979) ⟳ File "/home/andreas/src/env-3.6/lib/python3.6/site-packages/khal/ui/__init__.py", line 1300, in start_pane loop.run() File "/home/andreas/src/env-3.6/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run self._run() File "/home/andreas/src/env-3.6/lib/pyt...
TypeError
def fromVEvents(cls, events_list, ref=None, **kwargs): """ :type events: list """ assert isinstance(events_list, list) vevents = dict() for event in events_list: if "RECURRENCE-ID" in event: if invalid_timezone(event["RECURRENCE-ID"]): default_timezone = kwar...
def fromVEvents(cls, events_list, ref=None, **kwargs): """ :type events: list """ assert isinstance(events_list, list) vevents = dict() if len(events_list) == 1: vevents["PROTO"] = events_list[0] # TODO set mutable = False else: for event in events_list: if "REC...
https://github.com/pimutils/khal/issues/608
$ khal critical: Cannot understand event 2233f40b-9d80-49ff-aac0-01c2f957fc9f.ics from calendar shiftgig, critical: you might want tofile an issue at https://github.com/pimutils/khal/issues Traceback (most recent call last): File "/usr/bin/khal", line 11, in <module> load_entry_point('khal==0.9.4.dev26+ng93e6861', 'co...
KeyError
def expand(vevent, href=""): """ Constructs a list of start and end dates for all recurring instances of the event defined in vevent. It considers RRULE as well as RDATE and EXDATE properties. In case of unsupported recursion rules an UnsupportedRecurrence exception is thrown. If the timezone d...
def expand(vevent, href=""): """ Constructs a list of start and end dates for all recurring instances of the event defined in vevent. It considers RRULE as well as RDATE and EXDATE properties. In case of unsupported recursion rules an UnsupportedRecurrence exception is thrown. If the timezone d...
https://github.com/pimutils/khal/issues/641
Traceback (most recent call last): File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/khal/ui/__init__.py", line 1296, in start_pane loop.run() File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run self._run() File "/usr/local/Cellar/khal/0.9.5/...
AttributeError
def get_dates(vevent, key): # TODO replace with get_all_properties dates = vevent.get(key) if dates is None: return if not isinstance(dates, list): dates = [dates] dates = (leaf.dt for tree in dates for leaf in tree.dts) dates = localize_strip_tz(dates, events_tz) return map...
def get_dates(vevent, key): dates = vevent.get(key) if dates is None: return if not isinstance(dates, list): dates = [dates] dates = (leaf.dt for tree in dates for leaf in tree.dts) dates = localize_strip_tz(dates, events_tz) return map(sanitize_datetime, dates)
https://github.com/pimutils/khal/issues/641
Traceback (most recent call last): File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/khal/ui/__init__.py", line 1296, in start_pane loop.run() File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run self._run() File "/usr/local/Cellar/khal/0.9.5/...
AttributeError
def delete_instance(vevent, instance): """remove a recurrence instance from a VEVENT's RRDATE list or add it to the EXDATE list :type vevent: icalendar.cal.Event :type instance: datetime.datetime """ # TODO check where this instance is coming from and only call the # appropriate function ...
def delete_instance(vevent, instance): """remove a recurrence instance from a VEVENT's RRDATE list :type vevent: icalendar.cal.Event :type instance: datetime.datetime """ if "RDATE" in vevent and "RRULE" in vevent: # TODO check where this instance is coming from and only call the #...
https://github.com/pimutils/khal/issues/641
Traceback (most recent call last): File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/khal/ui/__init__.py", line 1296, in start_pane loop.run() File "/usr/local/Cellar/khal/0.9.5/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run self._run() File "/usr/local/Cellar/khal/0.9.5/...
AttributeError
def check_understood_rrule(rrule): """test if we can reproduce `rrule`.""" keys = set(rrule.keys()) freq = rrule.get("FREQ", [None])[0] unsupported_rrule_parts = { "BYSECOND", "BYMINUTE", "BYHOUR", "BYYEARDAY", "BYWEEKNO", "BYMONTH", "BYSETPOS", ...
def check_understood_rrule(rrule): """test if we can reproduce `rrule`.""" keys = set(rrule.keys()) freq = rrule.get("FREQ", [None])[0] unsupported_rrule_parts = { "BYSECOND", "BYMINUTE", "BYHOUR", "BYYEARDAY", "BYWEEKNO", "BYMONTH", "BYSETPOS", ...
https://github.com/pimutils/khal/issues/643
$ ikhal Traceback (most recent call last): File "/usr/lib/python3/dist-packages/khal/ui/__init__.py", line 1296, in start_pane loop.run() File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 278, in run self._run() File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 376, in _run self.event_loop.run...
TypeError
def guessrangefstr(daterange, locale, default_timedelta=None, adjust_reasonably=False): """parses a range string :param daterange: date1 [date2 | timedelta] :type daterange: str or list :param locale: :rtype: (datetime, datetime, bool) """ range_list = daterange if isinstance(daterange...
def guessrangefstr(daterange, locale, default_timedelta=None, adjust_reasonably=False): """parses a range string :param daterange: date1 [date2 | timedelta] :type daterange: str or list :param locale: :rtype: (datetime, datetime, bool) """ range_list = daterange if isinstance(daterange...
https://github.com/pimutils/khal/issues/490
Traceback (most recent call last): File "/home/untitaker/.local/bin/khal", line 9, in <module> load_entry_point('khal', 'console_scripts', 'khal')() File "/home/untitaker/projects/click/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/home/untitaker/projects/click/click/core.py", line 696,...
TypeError
def expand(vevent, href=""): """ Constructs a list of start and end dates for all recurring instances of the event defined in vevent. It considers RRULE as well as RDATE and EXDATE properties. In case of unsupported recursion rules an UnsupportedRecurrence exception is thrown. If the timezone d...
def expand(vevent, href=""): """ Constructs a list of start and end dates for all recurring instances of the event defined in vevent. It considers RRULE as well as RDATE and EXDATE properties. In case of unsupported recursion rules an UnsupportedRecurrence exception is thrown. If the timezone d...
https://github.com/pimutils/khal/issues/432
Unknown exception happened. Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/khal/khalendar/khalendar.py", line 286, in _update_vevent update(event.raw, href=href, etag=etag, calendar=calendar) File "/usr/lib/python3.5/site-packages/khal/khalendar/backend.py", line 260, in update self._update_i...
KeyError
def get_event(self, href, calendar): return self._cover_event(self._backend.get(href, calendar=calendar))
def get_event(self, href, calendar): return self._cover_event(self._backend.get(href, calendar))
https://github.com/pimutils/khal/issues/377
Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/khal/ui/__init__.py", line 891, in start_pane loop.run() File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 278, in run self._run() File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 376, in _run self.event_loop.run() ...
AssertionError
def __init__(self, eventcolumn): self.eventcolumn = eventcolumn self.events = None self.list_walker = None pile = urwid.Filler(urwid.Pile([])) urwid.WidgetWrap.__init__(self, pile) self.update_by_date()
def __init__(self, eventcolumn): self.eventcolumn = eventcolumn self.list_walker = None pile = urwid.Filler(urwid.Pile([])) urwid.WidgetWrap.__init__(self, pile) self.update_by_date()
https://github.com/pimutils/khal/issues/352
Traceback (most recent call last): File "/usr/bin/ikhal", line 9, in <module> load_entry_point('khal==0.7.1.dev128+ng619ddd6.d20160219', 'console_scripts', 'ikhal')() File "/usr/lib/python3.5/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.5/site-packages/cli...
AttributeError
def update_by_date(self, this_date=date.today()): if this_date is None: # this_date might be None return date_text = urwid.Text( this_date.strftime(self.eventcolumn.pane.conf["locale"]["longdateformat"]) ) self.events = sorted(self.eventcolumn.pane.collection.get_events_on(this_date)) ...
def update_by_date(self, this_date=date.today()): if this_date is None: # this_date might be None return date_text = urwid.Text( this_date.strftime(self.eventcolumn.pane.conf["locale"]["longdateformat"]) ) events = sorted(self.eventcolumn.pane.collection.get_events_on(this_date)) ...
https://github.com/pimutils/khal/issues/352
Traceback (most recent call last): File "/usr/bin/ikhal", line 9, in <module> load_entry_point('khal==0.7.1.dev128+ng619ddd6.d20160219', 'console_scripts', 'ikhal')() File "/usr/lib/python3.5/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.5/site-packages/cli...
AttributeError
def fromVEvents(cls, events_list, ref=None, **kwargs): """ :type events: list """ assert isinstance(events_list, list) vevents = dict() if len(events_list) == 1: vevents["PROTO"] = events_list[0] # TODO set mutable = False else: for event in events_list: if "REC...
def fromVEvents(cls, events_list, ref=None, **kwargs): """ :type events: list """ assert isinstance(events_list, list) vevents = dict() if len(events_list) == 1: vevents["PROTO"] = events_list[0] # TODO set mutable = False else: for event in events_list: if "REC...
https://github.com/pimutils/khal/issues/312
Traceback (most recent call last): File "/usr/local/bin/khal", line 9, in <module> load_entry_point('khal==0.7.0', 'console_scripts', 'khal')() File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/click/core.py"...
AttributeError
def toggle_delete(self): # TODO unify, either directly delete *normal* events as well # or stage recurring deletion as well def delete_this(_): self.event.delete_instance(self.event.recurrence_id) self.eventcolumn.pane.collection.update(self.event) self.eventcolumn.pane.window.backtr...
def toggle_delete(self): # TODO unify, either directly delete *normal* events as well # or stage recurring deletion as well def delete_this(_): if self.event.ref == "PROTO": instance = self.event.start else: instance = self.event.ref self.event.delete_instance...
https://github.com/pimutils/khal/issues/299
debug: using the config file at /home/eisfreak7/.config/khal/khal.conf debug: khal 0.6.1.dev205+ngc8a11b0.d20151117 debug: Using config: debug: [calendars] debug: [[cal1]] debug: path: /home/timo/data/calendars/cal1.ics/ debug: color: dark blue debug: readonly: False debug: type: calendar debug: [[c...
ValueError
def delete_this(_): self.event.delete_instance(self.event.recurrence_id) self.eventcolumn.pane.collection.update(self.event) self.eventcolumn.pane.window.backtrack()
def delete_this(_): if self.event.ref == "PROTO": instance = self.event.start else: instance = self.event.ref self.event.delete_instance(instance) self.eventcolumn.pane.collection.update(self.event) self.eventcolumn.pane.window.backtrack()
https://github.com/pimutils/khal/issues/299
debug: using the config file at /home/eisfreak7/.config/khal/khal.conf debug: khal 0.6.1.dev205+ngc8a11b0.d20151117 debug: Using config: debug: [calendars] debug: [[cal1]] debug: path: /home/timo/data/calendars/cal1.ics/ debug: color: dark blue debug: readonly: False debug: type: calendar debug: [[c...
ValueError
def vertical_month( month=datetime.date.today().month, year=datetime.date.today().year, today=datetime.date.today(), weeknumber=False, count=3, firstweekday=0, ): """ returns a list() of str() of weeks for a vertical arranged calendar :param month: first month of the calendar, ...
def vertical_month( month=datetime.date.today().month, year=datetime.date.today().year, today=datetime.date.today(), weeknumber=False, count=3, firstweekday=0, ): """ returns a list() of str() of weeks for a vertical arranged calendar :param month: first month of the calendar, ...
https://github.com/pimutils/khal/issues/142
debug: using the config file at /home/foo/.config/khal/khal.conf debug: Using config: debug: [calendars] debug: [[home]] debug: path = /home/foo/.khal/calendars/home/ debug: color = dark blue debug: [[work]] debug: path = /home/foo/.khal/calendars/home/ debug: color = yellow debug: debug: [sqlite] debug: path = /home/f...
UnicodeDecodeError
def global_options(f): def config_callback(ctx, option, config): prepare_context(ctx, config) def verbosity_callback(ctx, option, verbose): if verbose: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO) config = click.option( "--confi...
def global_options(f): config = click.option( "--config", "-c", default=None, metavar="PATH", help="The config file to use." ) verbose = click.option( "--verbose", "-v", is_flag=True, help="Output debugging information." ) version = click.version_option(version=__version__) retu...
https://github.com/pimutils/khal/issues/261
(vdir)gour@atmarama ~/p/vdir> ikhal -a gour Traceback (most recent call last): File "/home/gour/prj/vdir/bin/ikhal", line 9, in <module> load_entry_point('khal==0.6.1.dev83+nge9717c8', 'console_scripts', 'ikhal')() File "/home/gour/prj/vdir/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__ return ...
TypeError
def prepare_context(ctx, config): assert ctx.obj is None ctx.obj = {} try: ctx.obj["conf"] = conf = get_config(config) except InvalidSettingsError: sys.exit(1) logger.debug("khal %s" % __version__) logger.debug("Using config:") logger.debug(to_unicode(stringify_conf(conf), ...
def prepare_context(ctx, config, verbose): if ctx.obj is not None: return if verbose: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO) ctx.obj = {} try: ctx.obj["conf"] = conf = get_config(config) except InvalidSettingsError: sys.exit(1...
https://github.com/pimutils/khal/issues/261
(vdir)gour@atmarama ~/p/vdir> ikhal -a gour Traceback (most recent call last): File "/home/gour/prj/vdir/bin/ikhal", line 9, in <module> load_entry_point('khal==0.6.1.dev83+nge9717c8', 'console_scripts', 'ikhal')() File "/home/gour/prj/vdir/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__ return ...
TypeError
def _get_cli(): @click.group(invoke_without_command=True) @global_options @click.pass_context def cli(ctx): # setting the process title so it looks nicer in ps # shows up as 'khal' under linux and as 'python: khal (python2.7)' # under FreeBSD, which is still nicer than the defaul...
def _get_cli(): @click.group(invoke_without_command=True) @global_options @click.pass_context def cli(ctx, config, verbose): # setting the process title so it looks nicer in ps # shows up as 'khal' under linux and as 'python: khal (python2.7)' # under FreeBSD, which is still nice...
https://github.com/pimutils/khal/issues/261
(vdir)gour@atmarama ~/p/vdir> ikhal -a gour Traceback (most recent call last): File "/home/gour/prj/vdir/bin/ikhal", line 9, in <module> load_entry_point('khal==0.6.1.dev83+nge9717c8', 'console_scripts', 'ikhal')() File "/home/gour/prj/vdir/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__ return ...
TypeError
def cli(ctx): # setting the process title so it looks nicer in ps # shows up as 'khal' under linux and as 'python: khal (python2.7)' # under FreeBSD, which is still nicer than the default setproctitle("khal") if not ctx.invoked_subcommand: command = ctx.obj["conf"]["default"]["default_comma...
def cli(ctx, config, verbose): # setting the process title so it looks nicer in ps # shows up as 'khal' under linux and as 'python: khal (python2.7)' # under FreeBSD, which is still nicer than the default setproctitle("khal") prepare_context(ctx, config, verbose) if not ctx.invoked_subcommand: ...
https://github.com/pimutils/khal/issues/261
(vdir)gour@atmarama ~/p/vdir> ikhal -a gour Traceback (most recent call last): File "/home/gour/prj/vdir/bin/ikhal", line 9, in <module> load_entry_point('khal==0.6.1.dev83+nge9717c8', 'console_scripts', 'ikhal')() File "/home/gour/prj/vdir/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__ return ...
TypeError
def interactive_cli(ctx): """Interactive UI. Also launchable via `khal interactive`.""" controllers.interactive(build_collection(ctx), ctx.obj["conf"])
def interactive_cli(ctx, config, verbose): """Interactive UI. Also launchable via `khal interactive`.""" prepare_context(ctx, config, verbose) controllers.interactive(build_collection(ctx), ctx.obj["conf"])
https://github.com/pimutils/khal/issues/261
(vdir)gour@atmarama ~/p/vdir> ikhal -a gour Traceback (most recent call last): File "/home/gour/prj/vdir/bin/ikhal", line 9, in <module> load_entry_point('khal==0.6.1.dev83+nge9717c8', 'console_scripts', 'ikhal')() File "/home/gour/prj/vdir/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__ return ...
TypeError
def import_event(vevent, collection, locale, batch, random_uid): """import one event into collection, let user choose the collection""" # print all sub-events for sub_event in vevent: if not batch: event = Event.fromVEvents( [sub_event], calendar=collection.default_calen...
def import_event(vevent, collection, locale, batch, random_uid): """import one event into collection, let user choose the collection""" # print all sub-events for sub_event in vevent: if not batch: event = Event.fromVEvents( [sub_event], calendar=collection.default_calen...
https://github.com/pimutils/khal/issues/253
(vdir)gour@atmarama ~/p/vdir> khal import -a gour ~/Downloads/gour-calendar.ics 03.09.2015: Krema vedske mudrosti <2015-09-03 Thu +2w> Repeat: FREQ=WEEKLY;INTERVAL=2 Do you want to import this event into `None`? [y/N]: y Traceback (most recent call last): File "/home/gour/prj/vdir/bin/khal", line 11, in <module> sys.ex...
AttributeError
def prepare_context(ctx, config, verbose): if ctx.obj is not None: return if verbose: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO) ctx.obj = {} try: ctx.obj["conf"] = conf = get_config(config) except InvalidSettingsError: sys.exit(1...
def prepare_context(ctx, config, verbose): if ctx.obj is not None: return if verbose: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO) ctx.obj = {} ctx.obj["conf"] = conf = get_config(config) out = StringIO() conf.write(out) logger.debug("Usin...
https://github.com/pimutils/khal/issues/109
Traceback (most recent call last): File "/usr/local/bin/khal", line 9, in <module> load_entry_point('khal==0.3.1', 'console_scripts', 'khal')() File "/usr/local/lib/python2.7/dist-packages/khal-0.3.1-py2.7.egg/khal/cli.py", line 104, in main_khal color=cal['color'], File "/usr/local/lib/python2.7/dist-packages/configob...
KeyError
def get_config(config_path=None): """reads the config file, validates it and return a config dict :param config_path: path to a custom config file, if none is given the default locations will be searched :type config_path: str :returns: configuration :rtype: dict """ ...
def get_config(config_path=None): """reads the config file, validates it and return a config dict :param config_path: path to a custom config file, if none is given the default locations will be searched :type config_path: str :returns: configuration :rtype: dict """ ...
https://github.com/pimutils/khal/issues/109
Traceback (most recent call last): File "/usr/local/bin/khal", line 9, in <module> load_entry_point('khal==0.3.1', 'console_scripts', 'khal')() File "/usr/local/lib/python2.7/dist-packages/khal-0.3.1-py2.7.egg/khal/cli.py", line 104, in main_khal color=cal['color'], File "/usr/local/lib/python2.7/dist-packages/configob...
KeyError
def config_checks(config): """do some tests on the config we cannot do with configobj's validator""" if len(config["calendars"].keys()) < 1: logger.fatal("Found no calendar section in the config file") raise InvalidSettingsError() test_default_calendar(config) config["sqlite"]["path"] = ...
def config_checks(config): """do some tests on the config we cannot do with configobj's validator""" if len(config["calendars"].keys()) < 1: raise ValueError("Found no calendar in the config file") test_default_calendar(config) config["sqlite"]["path"] = expand_db_path(config["sqlite"]["path"]) ...
https://github.com/pimutils/khal/issues/109
Traceback (most recent call last): File "/usr/local/bin/khal", line 9, in <module> load_entry_point('khal==0.3.1', 'console_scripts', 'khal')() File "/usr/local/lib/python2.7/dist-packages/khal-0.3.1-py2.7.egg/khal/cli.py", line 104, in main_khal color=cal['color'], File "/usr/local/lib/python2.7/dist-packages/configob...
KeyError
def expand(vevent, default_tz, href=""): """ :param vevent: vevent to be expanded :type vevent: icalendar.cal.Event :param default_tz: the default timezone used when we (icalendar) don't understand the embedded timezone :type default_tz: pytz.timezone :param href: the hre...
def expand(vevent, default_tz, href=""): """ :param vevent: vevent to be expanded :type vevent: icalendar.cal.Event :param default_tz: the default timezone used when we (icalendar) don't understand the embedded timezone :type default_tz: pytz.timezone :param href: the hre...
https://github.com/pimutils/khal/issues/60
jason@valis:~> khal --sync Traceback (most recent call last): File "/usr/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.2.0.dev-62-g2c8baea', 'khal') File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 499, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/p...
AttributeError
def expand(vevent, default_tz, href=""): """ :param vevent: vevent to be expanded :type vevent: icalendar.cal.Event :param default_tz: the default timezone used when we (icalendar) don't understand the embedded timezone :type default_tz: pytz.timezone :param href: the hre...
def expand(vevent, default_tz, href=""): """ :param vevent: vevent to be expanded :type vevent: icalendar.cal.Event :param default_tz: the default timezone used when we (icalendar) don't understand the embedded timezone :type default_tz: pytz.timezone :param href: the hre...
https://github.com/pimutils/khal/issues/60
jason@valis:~> khal --sync Traceback (most recent call last): File "/usr/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.2.0.dev-62-g2c8baea', 'khal') File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 499, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/p...
AttributeError
def update(self, vevent, account, href="", etag="", status=OK): """insert a new or update an existing card in the db This is mostly a wrapper around two SQL statements, doing some cleanup before. :param vcard: vcard to be inserted or updated :type vcard: unicode :param href: href of the card o...
def update(self, vevent, account, href="", etag="", status=OK): """insert a new or update an existing card in the db This is mostly a wrapper around two SQL statements, doing some cleanup before. :param vcard: vcard to be inserted or updated :type vcard: unicode :param href: href of the card o...
https://github.com/pimutils/khal/issues/23
Traceback (most recent call last): File "/usr/local/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python2.7/dist-package...
ImportError
def __init__(self, conf): db_path = conf.sqlite.path if db_path is None: db_path = xdg.BaseDirectory.save_data_path("khal") + "/khal.db" self.db_path = path.expanduser(db_path) self.conn = sqlite3.connect(self.db_path) self.cursor = self.conn.cursor() self.debug = conf.debug self._cr...
def __init__(self, conf): db_path = conf.sqlite.path if db_path is None: db_path = xdg.BaseDirectory.save_data_path("khal") + "/khal.db" self.db_path = path.expanduser(db_path) self.conn = sqlite3.connect(self.db_path) self.cursor = self.conn.cursor() self.debug = conf.debug self._cr...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def needs_update(self, account, href_etag_list): """checks if we need to update this vcard :param account: account :param account: string :param href_etag_list: list of tuples of (hrefs and etags) :return: list of hrefs that need an update """ self._check_account(account) needs_update = ...
def needs_update(self, account, href_etag_list): """checks if we need to update this vcard :param account: account :param account: string :param href_etag_list: list of tuples of (hrefs and etags) :return: list of hrefs that need an update """ needs_update = list() for href, etag in href...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def update(self, vevent, account, href="", etag="", status=OK): """insert a new or update an existing card in the db This is mostly a wrapper around two SQL statements, doing some cleanup before. :param vcard: vcard to be inserted or updated :type vcard: unicode :param href: href of the card o...
def update(self, vevent, account, href="", etag="", status=OK): """insert a new or update an existing card in the db This is mostly a wrapper around two SQL statements, doing some cleanup before. :param vcard: vcard to be inserted or updated :type vcard: unicode :param href: href of the card o...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def update_href(self, oldhref, newhref, account, etag="", status=OK): """updates old_href to new_href, can also alter etag and status, see update() for an explanation of these parameters""" self._check_account(account) stuple = (newhref, etag, status, oldhref) sql_s = "UPDATE {0} SET href = ?, etag ...
def update_href(self, oldhref, newhref, account, etag="", status=OK): """updates old_href to new_href, can also alter etag and status, see update() for an explanation of these parameters""" stuple = (newhref, etag, status, oldhref) sql_s = "UPDATE {0} SET href = ?, etag = ?, status = ? \ WH...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def href_exists(self, href, account): """returns True if href already exists in db :param href: href :type href: str() :returns: True or False """ self._check_account(account) sql_s = "SELECT href FROM {0} WHERE href = ?;".format(account) if len(self.sql_ex(sql_s, (href,))) == 0: ...
def href_exists(self, href, account): """returns True if href already exists in db :param href: href :type href: str() :returns: True or False """ sql_s = "SELECT href FROM {0} WHERE href = ?;".format(account) if len(self.sql_ex(sql_s, (href,))) == 0: return False else: ...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_etag(self, href, account): """get etag for href type href: str() return: etag rtype: str() """ self._check_account(account) sql_s = "SELECT etag FROM {0} WHERE href=(?);".format(account + "_m") etag = self.sql_ex(sql_s, (href,))[0][0] return etag
def get_etag(self, href, account): """get etag for href type href: str() return: etag rtype: str() """ sql_s = "SELECT etag FROM {0} WHERE href=(?);".format(account + "_m") etag = self.sql_ex(sql_s, (href,))[0][0] return etag
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def delete(self, href, account): """ removes the event from the db, returns nothing """ self._check_account(account) logging.debug("locally deleting " + str(href)) for dbname in [account + "_d", account + "_dt", account + "_m"]: sql_s = "DELETE FROM {0} WHERE href = ? ;".format(dbnam...
def delete(self, href, account): """ removes the event from the db, returns nothing """ logging.debug("locally deleting " + str(href)) for dbname in [account + "_d", account + "_dt", account + "_m"]: sql_s = "DELETE FROM {0} WHERE href = ? ;".format(dbname) self.sql_ex(sql_s, (hr...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_all_href_from_db(self, accounts): """returns a list with all hrefs""" result = list() for account in accounts: self._check_account(account) hrefs = self.sql_ex("SELECT href FROM {0}".format(account + "_m")) result = result + [(href[0], account) for href in hrefs] return r...
def get_all_href_from_db(self, accounts): """returns a list with all hrefs""" result = list() for account in accounts: hrefs = self.sql_ex("SELECT href FROM {0}".format(account + "_m")) result = result + [(href[0], account) for href in hrefs] return result
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_all_href_from_db_not_new(self, accounts): """returns list of all not new hrefs""" result = list() for account in accounts: self._check_account(account) sql_s = "SELECT href FROM {0} WHERE status != (?)".format(account + "_m") stuple = (NEW,) hrefs = self.sql_ex(sql_s,...
def get_all_href_from_db_not_new(self, accounts): """returns list of all not new hrefs""" result = list() for account in accounts: sql_s = "SELECT href FROM {0} WHERE status != (?)".format(account + "_m") stuple = (NEW,) hrefs = self.sql_ex(sql_s, stuple) result = result + [(...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_time_range( self, start, end, account, color="", readonly=False, unicode_symbols=True, show_deleted=True, ): """returns :type start: datetime.datetime :type end: datetime.datetime :param deleted: include deleted events in returned lsit """ self._check_acco...
def get_time_range( self, start, end, account, color="", readonly=False, unicode_symbols=True, show_deleted=True, ): """returns :type start: datetime.datetime :type end: datetime.datetime :param deleted: include deleted events in returned lsit """ start = time.mkt...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_allday_range( self, start, end=None, account=None, color="", readonly=False, unicode_symbols=True, show_deleted=True, ): self._check_account(account) if account is None: raise Exception("need to specify an account") strstart = start.strftime("%Y%m%d") if e...
def get_allday_range( self, start, end=None, account=None, color="", readonly=False, unicode_symbols=True, show_deleted=True, ): if account is None: raise Exception("need to specify an account") strstart = start.strftime("%Y%m%d") if end is None: end = start +...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def hrefs_by_time_range_datetime(self, start, end, account, color=""): """returns :type start: datetime.datetime :type end: datetime.datetime """ self._check_account(account) start = time.mktime(start.timetuple()) end = time.mktime(end.timetuple()) sql_s = ( "SELECT href FROM {0}...
def hrefs_by_time_range_datetime(self, start, end, account, color=""): """returns :type start: datetime.datetime :type end: datetime.datetime """ start = time.mktime(start.timetuple()) end = time.mktime(end.timetuple()) sql_s = ( "SELECT href FROM {0} WHERE " "dtstart >= ? AN...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def hrefs_by_time_range_date(self, start, end=None, account=None): self._check_account(account) if account is None: raise Exception("need to specify an account") strstart = start.strftime("%Y%m%d") if end is None: end = start + datetime.timedelta(days=1) strend = end.strftime("%Y%m%d...
def hrefs_by_time_range_date(self, start, end=None, account=None): if account is None: raise Exception("need to specify an account") strstart = start.strftime("%Y%m%d") if end is None: end = start + datetime.timedelta(days=1) strend = end.strftime("%Y%m%d") sql_s = ( "SELECT ...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_vevent_from_db( self, href, account, start=None, end=None, readonly=False, color=lambda x: x, unicode_symbols=True, ): """returns the Event matching href, if start and end are given, a specific Event from a Recursion set is returned, the Event as saved in the db ...
def get_vevent_from_db( self, href, account, start=None, end=None, readonly=False, color=lambda x: x, unicode_symbols=True, ): """returns the Event matching href, if start and end are given, a specific Event from a Recursion set is returned, the Event as saved in the db ...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_changed(self, account): """returns list of hrefs of locally edited vevents""" self._check_account(account) sql_s = "SELECT href FROM {0} WHERE status == (?)".format(account + "_m") result = self.sql_ex(sql_s, (CHANGED,)) return [row[0] for row in result]
def get_changed(self, account): """returns list of hrefs of locally edited vevents""" sql_s = "SELECT href FROM {0} WHERE status == (?)".format(account + "_m") result = self.sql_ex(sql_s, (CHANGED,)) return [row[0] for row in result]
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_new(self, account): """returns list of hrefs of locally added vcards""" self._check_account(account) sql_s = "SELECT href FROM {0} WHERE status == (?)".format(account + "_m") result = self.sql_ex(sql_s, (NEW,)) return [row[0] for row in result]
def get_new(self, account): """returns list of hrefs of locally added vcards""" sql_s = "SELECT href FROM {0} WHERE status == (?)".format(account + "_m") result = self.sql_ex(sql_s, (NEW,)) return [row[0] for row in result]
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_marked_delete(self, account): """returns list of tuples (hrefs, etags) of locally deleted vcards""" self._check_account(account) sql_s = "SELECT href, etag FROM {0} WHERE status == (?)".format(account + "_m") result = self.sql_ex(sql_s, (DELETED,)) return result
def get_marked_delete(self, account): """returns list of tuples (hrefs, etags) of locally deleted vcards""" sql_s = "SELECT href, etag FROM {0} WHERE status == (?)".format(account + "_m") result = self.sql_ex(sql_s, (DELETED,)) return result
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def mark_delete(self, href, account): """marks the entry as to be deleted on server on next sync""" self._check_account(account) sql_s = "UPDATE {0} SET STATUS = ? WHERE href = ?".format(account + "_m") self.sql_ex( sql_s, ( DELETED, href, ), )
def mark_delete(self, href, account): """marks the entry as to be deleted on server on next sync""" sql_s = "UPDATE {0} SET STATUS = ? WHERE href = ?".format(account + "_m") self.sql_ex( sql_s, ( DELETED, href, ), )
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError