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 visit_dictionary_comprehension(self, e: DictionaryComprehension) -> Type: """Type check a dictionary comprehension.""" with self.chk.binder.frame_context(can_skip=True, fall_through=0): self.check_for_comp(e) # Infer the type of the list comprehension by using a synthetic generic # ...
def visit_dictionary_comprehension(self, e: DictionaryComprehension) -> Type: """Type check a dictionary comprehension.""" with self.chk.binder.frame_context(): self.check_for_comp(e) # Infer the type of the list comprehension by using a synthetic generic # callable type. ktdef ...
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def visit_conditional_expr(self, e: ConditionalExpr) -> Type: cond_type = self.accept(e.cond) self.check_usable_type(cond_type, e) ctx = self.chk.type_context[-1] # Gain type information from isinstance if it is there # but only for the current expression if_map, else_map = self.chk.find_isinst...
def visit_conditional_expr(self, e: ConditionalExpr) -> Type: cond_type = self.accept(e.cond) self.check_usable_type(cond_type, e) ctx = self.chk.type_context[-1] # Gain type information from isinstance if it is there # but only for the current expression if_map, else_map = mypy.checker.find_is...
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def analyze_cond_branch( self, map: Optional[Dict[Expression, Type]], node: Expression, context: Optional[Type], ) -> Type: with self.chk.binder.frame_context(can_skip=True, fall_through=0): if map is None: # We still need to type check node, in case we want to # proc...
def analyze_cond_branch( self, map: Optional[Dict[Expression, Type]], node: Expression, context: Optional[Type], ) -> Type: with self.chk.binder.frame_context(): if map: for var, type in map.items(): self.chk.binder.push(var, type) return self.accept(node,...
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def process_options( args: List[str], require_targets: bool = True ) -> Tuple[List[BuildSource], Options]: """Parse command line arguments.""" # Make the help output a little less jarring. help_factory = lambda prog: argparse.RawDescriptionHelpFormatter( prog=prog, max_help_position=28 ) ...
def process_options( args: List[str], require_targets: bool = True ) -> Tuple[List[BuildSource], Options]: """Parse command line arguments.""" # Make the help output a little less jarring. help_factory = lambda prog: argparse.RawDescriptionHelpFormatter( prog=prog, max_help_position=28 ) ...
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, value: int) -> None: self.value = value self.literal_hash = ("Literal", value)
def __init__(self, value: int) -> None: self.value = value self.literal_hash = value
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, value: str) -> None: self.value = value self.literal_hash = ("Literal", value)
def __init__(self, value: str) -> None: self.value = value self.literal_hash = value
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, value: float) -> None: self.value = value self.literal_hash = ("Literal", value)
def __init__(self, value: float) -> None: self.value = value self.literal_hash = value
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, value: complex) -> None: self.value = value self.literal_hash = ("Literal", value)
def __init__(self, value: complex) -> None: self.value = value self.literal_hash = value
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, base: Expression, index: Expression) -> None: self.base = base self.index = index self.analyzed = None if self.index.literal == LITERAL_YES: self.literal = self.base.literal self.literal_hash = ("Index", base.literal_hash, index.literal_hash)
def __init__(self, base: Expression, index: Expression) -> None: self.base = base self.index = index self.analyzed = None if self.index.literal == LITERAL_YES: self.literal = self.base.literal self.literal_hash = ("Member", base.literal_hash, index.literal_hash)
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, operators: List[str], operands: List[Expression]) -> None: self.operators = operators self.operands = operands self.method_types = [] self.literal = min(o.literal for o in self.operands) self.literal_hash = ( (cast(Any, "Comparison"),) + tuple(operators) + ...
def __init__(self, operators: List[str], operands: List[Expression]) -> None: self.operators = operators self.operands = operands self.method_types = [] self.literal = min(o.literal for o in self.operands) self.literal_hash = ( ("Comparison",) + tuple(operators) + tuple(o.literal_hash for o ...
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, items: List[Expression]) -> None: self.items = items if all(x.literal == LITERAL_YES for x in items): self.literal = LITERAL_YES self.literal_hash = (cast(Any, "List"),) + tuple(x.literal_hash for x in items)
def __init__(self, items: List[Expression]) -> None: self.items = items if all(x.literal == LITERAL_YES for x in items): self.literal = LITERAL_YES self.literal_hash = ("List",) + tuple(x.literal_hash for x in items)
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, items: List[Tuple[Expression, Expression]]) -> None: self.items = items # key is None for **item, e.g. {'a': 1, **x} has # keys ['a', None] and values [1, x]. if all( x[0] and x[0].literal == LITERAL_YES and x[1].literal == LITERAL_YES for x in items ): sel...
def __init__(self, items: List[Tuple[Expression, Expression]]) -> None: self.items = items # key is None for **item, e.g. {'a': 1, **x} has # keys ['a', None] and values [1, x]. if all( x[0] and x[0].literal == LITERAL_YES and x[1].literal == LITERAL_YES for x in items ): sel...
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, items: List[Expression]) -> None: self.items = items if all(x.literal == LITERAL_YES for x in items): self.literal = LITERAL_YES self.literal_hash = (cast(Any, "Tuple"),) + tuple(x.literal_hash for x in items)
def __init__(self, items: List[Expression]) -> None: self.items = items if all(x.literal == LITERAL_YES for x in items): self.literal = LITERAL_YES self.literal_hash = ("Tuple",) + tuple(x.literal_hash for x in items)
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self, items: List[Expression]) -> None: self.items = items if all(x.literal == LITERAL_YES for x in items): self.literal = LITERAL_YES self.literal_hash = (cast(Any, "Set"),) + tuple(x.literal_hash for x in items)
def __init__(self, items: List[Expression]) -> None: self.items = items if all(x.literal == LITERAL_YES for x in items): self.literal = LITERAL_YES self.literal_hash = ("Set",) + tuple(x.literal_hash for x in items)
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def __init__(self) -> None: # -- build options -- self.build_type = BuildType.STANDARD self.python_version = defaults.PYTHON3_VERSION self.platform = sys.platform self.custom_typing_module = None # type: str self.report_dirs = {} # type: Dict[str, str] self.silent_imports = False self....
def __init__(self) -> None: # -- build options -- self.build_type = BuildType.STANDARD self.python_version = defaults.PYTHON3_VERSION self.platform = sys.platform self.custom_typing_module = None # type: str self.report_dirs = {} # type: Dict[str, str] self.silent_imports = False self....
https://github.com/python/mypy/issues/1289
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "mypy/mypy/main.py", line 94, in type_check_only python_path=options.python_path) File "mypy/mypy/build.py", line 210, in build result =...
AttributeError
def map_instance_to_supertypes( instance: Instance, supertype: TypeInfo ) -> List[Instance]: # FIX: Currently we should only have one supertype per interface, so no # need to return an array result = [] # type: List[Instance] for path in class_derivation_paths(instance.type, supertype): ...
def map_instance_to_supertypes( instance: Instance, supertype: TypeInfo ) -> List[Instance]: # FIX: Currently we should only have one supertype per interface, so no # need to return an array result = [] # type: List[Instance] for path in class_derivation_paths(instance.type, supertype): ...
https://github.com/python/mypy/issues/2244
t_test6.py:1: error: Invalid base class t_test6.py:5: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues Traceback (most recent call last): File "/usr/local/bin/mypy", line 6, in <module> main(__file__) File "/usr/local/lib/python3.4/dist-packages/mypy/main.py", line 38, in main res =...
IndexError
def analyze_class_attribute_access( itype: Instance, name: str, context: Context, is_lvalue: bool, builtin_type: Callable[[str], Instance], not_ready_callback: Callable[[str, Context], None], msg: MessageBuilder, ) -> Type: node = itype.type.get(name) if not node: if itype.ty...
def analyze_class_attribute_access( itype: Instance, name: str, context: Context, is_lvalue: bool, builtin_type: Callable[[str], Instance], not_ready_callback: Callable[[str, Context], None], msg: MessageBuilder, ) -> Type: node = itype.type.get(name) if not node: if itype.ty...
https://github.com/python/mypy/issues/1839
Traceback (most recent call last): File "C:\Users\fred\Anaconda3\Scripts\mypy", line 6, in <module> main(__file__) File "C:\Users\fred\Anaconda3\lib\site-packages\mypy\main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "C:\Users\fred\Anaconda3\lib\site-packages\mypy\main.py", line 102, in ...
AttributeError
def visit_member_expr(self, expr: MemberExpr) -> None: base = expr.expr base.accept(self) # Bind references to module attributes. if isinstance(base, RefExpr) and base.kind == MODULE_REF: # This branch handles the case foo.bar where foo is a module. # In this case base.node is the module...
def visit_member_expr(self, expr: MemberExpr) -> None: base = expr.expr base.accept(self) # Bind references to module attributes. if isinstance(base, RefExpr) and base.kind == MODULE_REF: file = cast(MypyFile, base.node) n = file.names.get(expr.name, None) if file is not None else None ...
https://github.com/python/mypy/issues/1839
Traceback (most recent call last): File "C:\Users\fred\Anaconda3\Scripts\mypy", line 6, in <module> main(__file__) File "C:\Users\fred\Anaconda3\lib\site-packages\mypy\main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "C:\Users\fred\Anaconda3\lib\site-packages\mypy\main.py", line 102, in ...
AttributeError
def load_graph(sources: List[BuildSource], manager: BuildManager) -> Graph: """Given some source files, load the full dependency graph.""" graph = {} # type: Graph # The deque is used to implement breadth-first traversal. # TODO: Consider whether to go depth-first instead. This may # affect the or...
def load_graph(sources: List[BuildSource], manager: BuildManager) -> Graph: """Given some source files, load the full dependency graph.""" graph = {} # type: Graph # The deque is used to implement breadth-first traversal. # TODO: Consider whether to go depth-first instead. This may # affect the or...
https://github.com/python/mypy/issues/2017
testdir/main.py:4: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues Traceback (most recent call last): File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/local/Cell...
TypeError
def visit_type_var(self, t: TypeVarType) -> Type: return t
def visit_type_var(self, t: TypeVarType) -> Type: raise RuntimeError("TypeVarType is already analyzed")
https://github.com/python/mypy/issues/1898
*** INTERNAL ERROR *** asd4.py:7: error: Internal error -- please report a bug at https://github.com/python/mypy/issues NOTE: you can use "mypy --pdb ..." to drop into the debugger when this happens. Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "...
RuntimeError
def check_method_override_for_base_with_name( self, defn: FuncBase, name: str, base: TypeInfo ) -> None: base_attr = base.names.get(name) if base_attr: # The name of the method is defined in the base class. # Construct the type of the overriding method. typ = self.method_type(defn) ...
def check_method_override_for_base_with_name( self, defn: FuncBase, name: str, base: TypeInfo ) -> None: base_attr = base.names.get(name) if base_attr: # The name of the method is defined in the base class. # Construct the type of the overriding method. typ = self.method_type(defn) ...
https://github.com/python/mypy/issues/1972
Traceback (most recent call last): File ".../bin/mypy", line 6, in <module> main(__file__) File ".../mypy/main.py", line 40, in main res = type_check_only(sources, bin_dir, options) File ".../mypy/main.py", line 81, in type_check_only options=options) File ".../mypy/build.py", line 177, in build dispatch(sources, manag...
AssertionError
def lookup(self, name: str, ctx: Context) -> SymbolTableNode: """Look up an unqualified name in all active namespaces.""" # 1a. Name declared using 'global x' takes precedence if name in self.global_decls[-1]: if name in self.globals: return self.globals[name] else: s...
def lookup(self, name: str, ctx: Context) -> SymbolTableNode: """Look up an unqualified name in all active namespaces.""" # 1a. Name declared using 'global x' takes precedence if name in self.global_decls[-1]: if name in self.globals: return self.globals[name] else: s...
https://github.com/python/mypy/issues/2001
Traceback (most recent call last): File "/home/machinalis/.virtualenvs/mypy-django/bin/mypy", line 6, in <module> exec(compile(open(__file__).read(), __file__, 'exec')) File "/home/machinalis/oss/mypy/scripts/mypy", line 6, in <module> main(__file__) File "/home/machinalis/oss/mypy/mypy/main.py", line 38, in main res =...
KeyError
def leave_partial_types(self) -> None: """Pop partial type scope. Also report errors for variables which still have partial types, i.e. we couldn't infer a complete type. """ partial_types = self.partial_types.pop() if not self.current_node_deferred: for var, context in partial_types.it...
def leave_partial_types(self) -> None: """Pop partial type scope. Also report errors for variables which still have partial types, i.e. we couldn't infer a complete type. """ partial_types = self.partial_types.pop() if not self.current_node_deferred: for var, context in partial_types.it...
https://github.com/python/mypy/issues/1948
Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 40, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 81, in type_check_only ...
AttributeError
def try_infer_partial_type(self, e: CallExpr) -> None: if isinstance(e.callee, MemberExpr) and isinstance(e.callee.expr, RefExpr): var = cast(Var, e.callee.expr.node) partial_types = self.chk.find_partial_types(var) if partial_types is not None and not self.chk.current_node_deferred: ...
def try_infer_partial_type(self, e: CallExpr) -> None: if isinstance(e.callee, MemberExpr) and isinstance(e.callee.expr, RefExpr): var = cast(Var, e.callee.expr.node) partial_types = self.chk.find_partial_types(var) if partial_types is not None and not self.chk.current_node_deferred: ...
https://github.com/python/mypy/issues/1948
Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 40, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 81, in type_check_only ...
AttributeError
def visit_list_expr(self, e: ListExpr) -> Type: """Type check a list expression [...].""" return self.check_lst_expr(e.items, "builtins.list", "<list>", e)
def visit_list_expr(self, e: ListExpr) -> Type: """Type check a list expression [...].""" return self.check_list_or_set_expr(e.items, "builtins.list", "<list>", e)
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def visit_set_expr(self, e: SetExpr) -> Type: return self.check_lst_expr(e.items, "builtins.set", "<set>", e)
def visit_set_expr(self, e: SetExpr) -> Type: return self.check_list_or_set_expr(e.items, "builtins.set", "<set>", e)
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def visit_tuple_expr(self, e: TupleExpr) -> Type: """Type check a tuple expression.""" ctx = None # type: TupleType # Try to determine type context for type inference. if isinstance(self.chk.type_context[-1], TupleType): t = self.chk.type_context[-1] ctx = t # NOTE: it's possible fo...
def visit_tuple_expr(self, e: TupleExpr) -> Type: """Type check a tuple expression.""" ctx = None # type: TupleType # Try to determine type context for type inference. if isinstance(self.chk.type_context[-1], TupleType): t = self.chk.type_context[-1] if len(t.items) == len(e.items): ...
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def visit_tuple_expr(self, expr: TupleExpr) -> None: for item in expr.items: if isinstance(item, StarExpr): item.valid = True item.accept(self)
def visit_tuple_expr(self, expr: TupleExpr) -> None: for item in expr.items: item.accept(self)
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def visit_list_expr(self, expr: ListExpr) -> None: for item in expr.items: if isinstance(item, StarExpr): item.valid = True item.accept(self)
def visit_list_expr(self, expr: ListExpr) -> None: for item in expr.items: item.accept(self)
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def visit_set_expr(self, expr: SetExpr) -> None: for item in expr.items: if isinstance(item, StarExpr): item.valid = True item.accept(self)
def visit_set_expr(self, expr: SetExpr) -> None: for item in expr.items: item.accept(self)
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def visit_star_expr(self, expr: StarExpr) -> None: if not expr.valid: # XXX TODO Change this error message self.fail("Can use starred expression only as assignment target", expr) else: expr.expr.accept(self)
def visit_star_expr(self, expr: StarExpr) -> None: if not expr.valid: self.fail("Can use starred expression only as assignment target", expr) else: expr.expr.accept(self)
https://github.com/python/mypy/issues/1722
Traceback (most recent call last): File "/home/dominik/.virtualenvs/mypy/bin/mypy", line 6, in <module> main(__file__) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/home/dominik/.virtualenvs/mypy/lib/python3.5/si...
AttributeError
def analyze_base_classes(self, defn: ClassDef) -> None: """Analyze and set up base classes. This computes several attributes on the corresponding TypeInfo defn.info related to the base classes: defn.info.bases, defn.info.mro, and miscellaneous others (at least tuple_type, fallback_to_any, and is_enum.)...
def analyze_base_classes(self, defn: ClassDef) -> None: """Analyze and set up base classes. This computes several attributes on the corresponding TypeInfo defn.info related to the base classes: defn.info.bases, defn.info.mro, and miscellaneous others (at least tuple_type, fallback_to_any, and is_enum.)...
https://github.com/python/mypy/issues/1794
Traceback (most recent call last): File "C:\Program Files\Python35\Scripts\mypy", line 6, in <module> main(__file__) File "C:\Program Files\Python35\lib\site-packages\mypy\main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "C:\Program Files\Python35\lib\site-packages\mypy\main.py", line 10...
AttributeError
def visit_class_def(self, tdef: ClassDef) -> None: for type in tdef.info.bases: self.analyze(type) # Recompute MRO now that we have analyzed all modules, to pick # up superclasses of bases imported from other modules in an # import loop. (Only do so if we succeeded the first time.) if tdef.i...
def visit_class_def(self, tdef: ClassDef) -> None: for type in tdef.info.bases: self.analyze(type) # Recompute MRO now that we have analyzed all modules, to pick # up superclasses of bases imported from other modules in an # import loop. (Only do so if we succeeded the first time.) if tdef.i...
https://github.com/python/mypy/issues/1794
Traceback (most recent call last): File "C:\Program Files\Python35\Scripts\mypy", line 6, in <module> main(__file__) File "C:\Program Files\Python35\lib\site-packages\mypy\main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "C:\Program Files\Python35\lib\site-packages\mypy\main.py", line 10...
AttributeError
def fail(self, msg: str, ctx: Context, *, blocker: bool = False) -> None: self.errors.report(ctx.get_line(), msg)
def fail(self, msg: str, ctx: Context) -> None: self.errors.report(ctx.get_line(), msg)
https://github.com/python/mypy/issues/1794
Traceback (most recent call last): File "C:\Program Files\Python35\Scripts\mypy", line 6, in <module> main(__file__) File "C:\Program Files\Python35\lib\site-packages\mypy\main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "C:\Program Files\Python35\lib\site-packages\mypy\main.py", line 10...
AttributeError
def check_argument_types( self, arg_types: List[Type], arg_kinds: List[int], callee: CallableType, formal_to_actual: List[List[int]], context: Context, messages: MessageBuilder = None, check_arg: ArgChecker = None, ) -> None: """Check argument types against a callable type. Repo...
def check_argument_types( self, arg_types: List[Type], arg_kinds: List[int], callee: CallableType, formal_to_actual: List[List[int]], context: Context, messages: MessageBuilder = None, check_arg: ArgChecker = None, ) -> None: """Check argument types against a callable type. Repo...
https://github.com/python/mypy/issues/1890
Traceback (most recent call last): File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code ...
AttributeError
def map_actuals_to_formals( caller_kinds: List[int], caller_names: List[str], callee_kinds: List[int], callee_names: List[str], caller_arg_type: Callable[[int], Type], ) -> List[List[int]]: """Calculate mapping between actual (caller) args and formals. The result contains a list of caller a...
def map_actuals_to_formals( caller_kinds: List[int], caller_names: List[str], callee_kinds: List[int], callee_names: List[str], caller_arg_type: Callable[[int], Type], ) -> List[List[int]]: """Calculate mapping between actual (caller) args and formals. The result contains a list of caller a...
https://github.com/python/mypy/issues/1553
Traceback (most recent call last): File "./.tox/mypy/bin/mypy", line 6, in <module> main(__file__) File ".../mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File ".../mypy/main.py", line 102, in type_check_only python_path=options.python_path) File ".../mypy/build.py", line 209, in buil...
NotImplementedError
def visit_erased_type(self, left: ErasedType) -> bool: # We can get here when isinstance is used inside a lambda # whose type is being inferred. In any event, we have no reason # to think that an ErasedType will end up being the same as # any other type, even another ErasedType. return False
def visit_erased_type(self, left: ErasedType) -> bool: # Should not get here. raise RuntimeError()
https://github.com/python/mypy/issues/1607
$ python3 -m mypy --py2 rt6.py Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_...
RuntimeError
def visit_break_stmt(self, s: BreakStmt) -> None: if self.loop_depth == 0: self.fail("'break' outside loop", s, True, blocker=True)
def visit_break_stmt(self, s: BreakStmt) -> None: if self.loop_depth == 0: self.fail("'break' outside loop", s, True)
https://github.com/python/mypy/issues/1571
Traceback (most recent call last): File "/Users/rbarton/mypy/scripts/mypy", line 6, in <module> main(__file__) [...] File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mypy/checker.py", line 2028, in visit_break_stmt self.binder.allow_jump(self.binder.loop_frames[-1] - 1) IndexError: li...
IndexError
def visit_continue_stmt(self, s: ContinueStmt) -> None: if self.loop_depth == 0: self.fail("'continue' outside loop", s, True, blocker=True)
def visit_continue_stmt(self, s: ContinueStmt) -> None: if self.loop_depth == 0: self.fail("'continue' outside loop", s, True)
https://github.com/python/mypy/issues/1571
Traceback (most recent call last): File "/Users/rbarton/mypy/scripts/mypy", line 6, in <module> main(__file__) [...] File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mypy/checker.py", line 2028, in visit_break_stmt self.binder.allow_jump(self.binder.loop_frames[-1] - 1) IndexError: li...
IndexError
def visit_yield_from_expr(self, e: YieldFromExpr) -> None: if not self.is_func_scope(): # not sure self.fail("'yield from' outside function", e, True, blocker=True) else: self.function_stack[-1].is_generator = True if e.expr: e.expr.accept(self)
def visit_yield_from_expr(self, e: YieldFromExpr) -> None: if not self.is_func_scope(): # not sure self.fail("'yield from' outside function", e) else: self.function_stack[-1].is_generator = True if e.expr: e.expr.accept(self)
https://github.com/python/mypy/issues/1571
Traceback (most recent call last): File "/Users/rbarton/mypy/scripts/mypy", line 6, in <module> main(__file__) [...] File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mypy/checker.py", line 2028, in visit_break_stmt self.binder.allow_jump(self.binder.loop_frames[-1] - 1) IndexError: li...
IndexError
def visit_yield_expr(self, expr: YieldExpr) -> None: if not self.is_func_scope(): self.fail("'yield' outside function", expr, True, blocker=True) else: self.function_stack[-1].is_generator = True if expr.expr: expr.expr.accept(self)
def visit_yield_expr(self, expr: YieldExpr) -> None: if not self.is_func_scope(): self.fail("'yield' outside function", expr) else: self.function_stack[-1].is_generator = True if expr.expr: expr.expr.accept(self)
https://github.com/python/mypy/issues/1571
Traceback (most recent call last): File "/Users/rbarton/mypy/scripts/mypy", line 6, in <module> main(__file__) [...] File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mypy/checker.py", line 2028, in visit_break_stmt self.binder.allow_jump(self.binder.loop_frames[-1] - 1) IndexError: li...
IndexError
def fail( self, msg: str, ctx: Context, serious: bool = False, *, blocker: bool = False ) -> None: if ( not serious and not self.check_untyped_defs and self.function_stack and self.function_stack[-1].is_dynamic() ): return self.errors.report(ctx.get_line(), msg, b...
def fail(self, msg: str, ctx: Context, serious: bool = False) -> None: if ( not serious and not self.check_untyped_defs and self.function_stack and self.function_stack[-1].is_dynamic() ): return self.errors.report(ctx.get_line(), msg)
https://github.com/python/mypy/issues/1571
Traceback (most recent call last): File "/Users/rbarton/mypy/scripts/mypy", line 6, in <module> main(__file__) [...] File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mypy/checker.py", line 2028, in visit_break_stmt self.binder.allow_jump(self.binder.loop_frames[-1] - 1) IndexError: li...
IndexError
def read_with_python_encoding(path: str, pyversion: Tuple[int, int]) -> str: """Read the Python file with while obeying PEP-263 encoding detection""" source_bytearray = bytearray() encoding = "utf8" if pyversion[0] >= 3 else "ascii" with open(path, "rb") as f: # read first two lines and check i...
def read_with_python_encoding(path: str, pyversion: Tuple[int, int]) -> str: """Read the Python file with while obeying PEP-263 encoding detection""" source_bytearray = bytearray() encoding = "utf8" if pyversion[0] >= 3 else "ascii" with open(path, "rb") as f: # read first two lines and check i...
https://github.com/python/mypy/issues/1521
9.796:LOG: Parsing Lib/test/bad_coding.py (test.bad_coding) Traceback (most recent call last): File "/usr/local/bin/mypy", line 6, in <module> main(__file__) File "/usr/local/lib/python3.2/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/local/lib/python3.2/site...
LookupError
def parse_file(self) -> None: if self.tree is not None: # The file was already parsed (in __init__()). return manager = self.manager modules = manager.modules manager.log("Parsing %s (%s)" % (self.xpath, self.id)) with self.wrap_context(): source = self.source self....
def parse_file(self) -> None: if self.tree is not None: # The file was already parsed (in __init__()). return manager = self.manager modules = manager.modules manager.log("Parsing %s (%s)" % (self.xpath, self.id)) with self.wrap_context(): source = self.source self....
https://github.com/python/mypy/issues/1521
9.796:LOG: Parsing Lib/test/bad_coding.py (test.bad_coding) Traceback (most recent call last): File "/usr/local/bin/mypy", line 6, in <module> main(__file__) File "/usr/local/lib/python3.2/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/local/lib/python3.2/site...
LookupError
def overload_call_target( self, arg_types: List[Type], arg_kinds: List[int], arg_names: List[str], overload: Overloaded, context: Context, messages: MessageBuilder = None, ) -> Type: """Infer the correct overload item to call with given argument types. The return value may be Callab...
def overload_call_target( self, arg_types: List[Type], arg_kinds: List[int], arg_names: List[str], overload: Overloaded, context: Context, messages: MessageBuilder = None, ) -> Type: """Infer the correct overload item to call with given argument types. The return value may be Callab...
https://github.com/python/mypy/issues/1564
Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 102, in type_check_only...
AttributeError
def erased_signature_similarity( self, arg_types: List[Type], arg_kinds: List[int], arg_names: List[str], callee: CallableType, context: Context, ) -> int: """Determine whether arguments could match the signature at runtime. Return similarity level (0 = no match, 1 = can match, 2 = non-...
def erased_signature_similarity( self, arg_types: List[Type], arg_kinds: List[int], arg_names: List[str], callee: CallableType, ) -> int: """Determine whether arguments could match the signature at runtime. Return similarity level (0 = no match, 1 = can match, 2 = non-promotion match). See ...
https://github.com/python/mypy/issues/1564
Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 102, in type_check_only...
AttributeError
def match_signature_types( self, arg_types: List[Type], arg_kinds: List[int], arg_names: List[str], callee: CallableType, context: Context, ) -> bool: """Determine whether arguments types match the signature. Assume that argument counts are compatible. Return True if arguments matc...
def match_signature_types( self, arg_types: List[Type], arg_kinds: List[int], arg_names: List[str], callee: CallableType, ) -> bool: """Determine whether arguments types match the signature. Assume that argument counts are compatible. Return True if arguments match. """ formal_...
https://github.com/python/mypy/issues/1564
Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 102, in type_check_only...
AttributeError
def report(self, msg: str, context: Context, severity: str, file: str = None) -> None: """Report an error or note (unless disabled).""" if self.disable_count <= 0: self.errors.report( context.get_line() if context else -1, msg.strip(), severity=severity, f...
def report(self, msg: str, context: Context, severity: str, file: str = None) -> None: """Report an error or note (unless disabled).""" if self.disable_count <= 0: self.errors.report( context.get_line(), msg.strip(), severity=severity, file=file )
https://github.com/python/mypy/issues/1564
Traceback (most recent call last): File "/usr/lib/python-exec/python3.4/mypy", line 6, in <module> main(__file__) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib64/python3.4/site-packages/mypy/main.py", line 102, in type_check_only...
AttributeError
def infer_arg_types_in_context( self, callee: CallableType, args: List[Node] ) -> List[Type]: """Infer argument expression types using a callable type as context. For example, if callee argument 2 has type List[int], infer the argument expression with List[int] type context. """ # TODO Always c...
def infer_arg_types_in_context( self, callee: CallableType, args: List[Node] ) -> List[Type]: """Infer argument expression types using a callable type as context. For example, if callee argument 2 has type List[int], infer the argument expression with List[int] type context. """ # TODO Always c...
https://github.com/python/mypy/issues/1572
Traceback (most recent call last): File "/nix/store/czly6jrafckfvwm9mjc6wvandc2ddwi9-python3.5-mypy-lang-0.4.1/bin/.mypy-wrapped", line 7, in <module> main(__file__) File "/nix/store/czly6jrafckfvwm9mjc6wvandc2ddwi9-python3.5-mypy-lang-0.4.1/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_o...
RuntimeError
def infer_function_type_arguments_pass2( self, callee_type: CallableType, args: List[Node], arg_kinds: List[int], formal_to_actual: List[List[int]], inferred_args: List[Type], context: Context, ) -> Tuple[CallableType, List[Type]]: """Perform second pass of generic function type argument...
def infer_function_type_arguments_pass2( self, callee_type: CallableType, args: List[Node], arg_kinds: List[int], formal_to_actual: List[List[int]], inferred_args: List[Type], context: Context, ) -> Tuple[CallableType, List[Type]]: """Perform second pass of generic function type argument...
https://github.com/python/mypy/issues/1572
Traceback (most recent call last): File "/nix/store/czly6jrafckfvwm9mjc6wvandc2ddwi9-python3.5-mypy-lang-0.4.1/bin/.mypy-wrapped", line 7, in <module> main(__file__) File "/nix/store/czly6jrafckfvwm9mjc6wvandc2ddwi9-python3.5-mypy-lang-0.4.1/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_o...
RuntimeError
def apply_inferred_arguments( self, callee_type: CallableType, inferred_args: List[Type], context: Context ) -> CallableType: """Apply inferred values of type arguments to a generic function. Inferred_args contains the values of function type arguments. """ # Report error if some of the variables c...
def apply_inferred_arguments( self, callee_type: CallableType, inferred_args: List[Type], context: Context ) -> CallableType: """Apply inferred values of type arguments to a generic function. Inferred_args contains the values of function type arguments. """ # Report error if some of the variables c...
https://github.com/python/mypy/issues/1572
Traceback (most recent call last): File "/nix/store/czly6jrafckfvwm9mjc6wvandc2ddwi9-python3.5-mypy-lang-0.4.1/bin/.mypy-wrapped", line 7, in <module> main(__file__) File "/nix/store/czly6jrafckfvwm9mjc6wvandc2ddwi9-python3.5-mypy-lang-0.4.1/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_o...
RuntimeError
def visit_for_stmt(self, s: ForStmt) -> None: self.analyze_lvalue(s.index) s.body.accept(self) if s.else_body: s.else_body.accept(self)
def visit_for_stmt(self, s: ForStmt) -> None: self.analyze_lvalue(s.index) s.body.accept(self)
https://github.com/python/mypy/issues/1565
Traceback (most recent call last): File "/usr/bin/mypy", line 6, in <module> main(__file__) File "/usr/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib/python3.5/site-packages/mypy/main.py", line 102, in type_check_only python_path=options.pytho...
AttributeError
def visit_while_stmt(self, s: WhileStmt) -> None: s.body.accept(self) if s.else_body: s.else_body.accept(self)
def visit_while_stmt(self, s: WhileStmt) -> None: s.expr.accept(self) self.loop_depth += 1 s.body.accept(self) self.loop_depth -= 1 self.visit_block_maybe(s.else_body)
https://github.com/python/mypy/issues/1565
Traceback (most recent call last): File "/usr/bin/mypy", line 6, in <module> main(__file__) File "/usr/lib/python3.5/site-packages/mypy/main.py", line 54, in main res = type_check_only(sources, bin_dir, options) File "/usr/lib/python3.5/site-packages/mypy/main.py", line 102, in type_check_only python_path=options.pytho...
AttributeError
def visit_func_expr(self, e: FuncExpr) -> Type: """Type check lambda expression.""" inferred_type = self.infer_lambda_type_using_context(e) if not inferred_type: # No useful type context. ret_type = e.expr().accept(self.chk) if not e.arguments: # Form 'lambda: e'; just us...
def visit_func_expr(self, e: FuncExpr) -> Type: """Type check lambda expression.""" inferred_type = self.infer_lambda_type_using_context(e) if not inferred_type: # No useful type context. ret_type = e.expr().accept(self.chk) if not e.arguments: # Form 'lambda: e'; just us...
https://github.com/python/mypy/issues/1421
Traceback (most recent call last): File "/Users/guido/v3/bin/mypy", line 6, in <module> main(__file__) File "/Users/guido/v3/lib/python3.5/site-packages/mypy/main.py", line 52, in main res = type_check_only(sources, bin_dir, options) File "/Users/guido/v3/lib/python3.5/site-packages/mypy/main.py", line 100, in type_che...
KeyError
def visit_assignment_stmt(self, s: AssignmentStmt) -> Type: """Type check an assignment statement. Handle all kinds of assignment statements (simple, indexed, multiple). """ self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None) if len(s.lvalues) > 1: # Chained assignment (e.g. x =...
def visit_assignment_stmt(self, s: AssignmentStmt) -> Type: """Type check an assignment statement. Handle all kinds of assignment statements (simple, indexed, multiple). """ self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None) if len(s.lvalues) > 1: # Chained assignment (e.g. x =...
https://github.com/python/mypy/issues/974
Traceback (most recent call last): File "/Users/me/py-env/crf/bin/mypy", line 6, in <module> main(__file__) File "/Users/me/py-env/crf/lib/python3.5/site-packages/mypy/main.py", line 49, in main type_check_only(sources, bin_dir, options) File "/Users/me/py-env/crf/lib/python3.5/site-packages/mypy/main.py"...
KeyError
def remove_imported_names_from_symtable(names: SymbolTable, module: str) -> None: """Remove all imported names from the symbol table of a module.""" removed = [] # type: List[str] for name, node in names.items(): if node.node is None: continue fullname = node.node.fullname() ...
def remove_imported_names_from_symtable(names: SymbolTable, module: str) -> None: """Remove all imported names from the symbol table of a module.""" removed = [] # type: List[str] for name, node in names.items(): fullname = node.node.fullname() prefix = fullname[: fullname.rfind(".")] ...
https://github.com/python/mypy/issues/1182
Traceback (most recent call last): File "/usr/local/bin/mypy", line 6, in <module> main(__file__) File "/usr/local/lib/python3.4/dist-packages/mypy/main.py", line 53, in main type_check_only(sources, bin_dir, options) File "/usr/local/lib/python3.4/dist-packages/mypy/main.py", line 96, in type_check_only python_path=op...
AttributeError
def try_infer_partial_type_from_indexed_assignment( self, lvalue: IndexExpr, rvalue: Node ) -> None: # TODO: Should we share some of this with try_infer_partial_type? if isinstance(lvalue.base, RefExpr) and isinstance(lvalue.base.node, Var): var = cast(Var, lvalue.base.node) if var is not No...
def try_infer_partial_type_from_indexed_assignment( self, lvalue: IndexExpr, rvalue: Node ) -> None: # TODO: Should we share some of this with try_infer_partial_type? if isinstance(lvalue.base, RefExpr): var = cast(Var, lvalue.base.node) if var is not None and isinstance(var.type, PartialTyp...
https://github.com/python/mypy/issues/1269
Traceback (most recent call last): File "/home/mg/.virtualenvs/mypy/bin/mypy", line 6, in <module> exec(compile(open(__file__).read(), __file__, 'exec')) File "/home/mg/src/mypy/scripts/mypy", line 6, in <module> main(__file__) File "/home/mg/src/mypy/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, op...
AttributeError
def lex_indent(self) -> None: """Analyze whitespace chars at the beginning of a line (indents).""" s = self.match(self.indent_exp) while True: s = self.match(self.indent_exp) if s == "" or s[-1] not in self.comment_or_newline: break # Empty line (whitespace only or commen...
def lex_indent(self) -> None: """Analyze whitespace chars at the beginning of a line (indents).""" s = self.match(self.indent_exp) if s != "" and s[-1] in self.comment_or_newline: # Empty line (whitespace only or comment only). self.add_pre_whitespace(s[:-1]) if s[-1] == "#": ...
https://github.com/python/mypy/issues/1280
Traceback (most recent call last): File "/usr/local/lib/python3.5/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "mypy/__main__.py", line 5, in <module> main(None) File "mypy/main.py", line 50, in main type_c...
RecursionError
def visit_block(self, b: Block) -> None: if b.is_unreachable: return super().visit_block(b)
def visit_block(self, b: Block) -> None: if b.is_unreachable: return self.sem.block_depth[-1] += 1 for node in b.body: node.accept(self) self.sem.block_depth[-1] -= 1
https://github.com/python/mypy/issues/1319
Traceback (most recent call last): File "/home/samuel/code/harrier/env/bin/mypy", line 6, in <module> main(__file__) File "/home/samuel/code/harrier/env/lib/python3.5/site-packages/mypy/main.py", line 54, in main type_check_only(sources, bin_dir, options) File "/home/samuel/code/harrier/env/lib/python3.5/site-packages/...
AttributeError
def read_program(path: str, pyversion: Tuple[int, int]) -> str: try: text = read_with_python_encoding(path, pyversion) except IOError as ioerr: raise CompileError( ["mypy: can't read file '{}': {}".format(path, ioerr.strerror)] ) except UnicodeDecodeError as decodeerr: ...
def read_program(path: str, pyversion: Tuple[int, int]) -> str: try: text = read_with_python_encoding(path, pyversion) except IOError as ioerr: raise CompileError( ["mypy: can't read file '{}': {}".format(path, ioerr.strerror)] ) return text
https://github.com/python/mypy/issues/1204
Traceback (most recent call last): File "/usr/local/bin/mypy", line 6, in <module> main(__file__) File "/usr/local/lib/python3.5/dist-packages/mypy/main.py", line 54, in main type_check_only(sources, bin_dir, options) File "/usr/local/lib/python3.5/dist-packages/mypy/main.py", line 98, in type_check_only python_path=op...
UnicodeDecodeError
def check_argument_kinds( self, funckinds: List[int], sigkinds: List[int], line: int ) -> None: """Check that arguments are consistent. This verifies that they have the same number and the kinds correspond. Arguments: funckinds: kinds of arguments in function definition sigkinds: kinds of...
def check_argument_kinds( self, funckinds: List[int], sigkinds: List[int], line: int ) -> None: """Check that * and ** arguments are consistent. Arguments: funckinds: kinds of arguments in function definition sigkinds: kinds of arguments in signature (after # type:) """ for kind, token...
https://github.com/python/mypy/issues/1207
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/bin/mypy", line 6, in <module> main(__file__) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/mypy/main.py", line 54, in main type_check_only(sources, bin_dir, options) File "/Library/Framework...
IndexError
def visit_func_def(self, defn: FuncDef) -> Type: """Type check a function definition.""" self.check_func_item(defn, name=defn.name()) if defn.info: if not defn.is_dynamic(): self.check_method_override(defn) self.check_inplace_operator_method(defn) if defn.original_def: ...
def visit_func_def(self, defn: FuncDef) -> Type: """Type check a function definition.""" self.check_func_item(defn, name=defn.name()) if defn.info: if not defn.is_dynamic(): self.check_method_override(defn) self.check_inplace_operator_method(defn) if defn.original_def: ...
https://github.com/python/mypy/issues/1126
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "/home/dshea/src/mypy/mypy/main.py", line 53, in main type_check_only(sources, bin_dir, options) File "/home/dshea/src/mypy/mypy/main.py", line 96, in type_check_only python_path=options.python_path) File "/home/dshea/src/...
KeyError
def check_assignment( self, lvalue: Node, rvalue: Node, infer_lvalue_type: bool = True ) -> None: """Type check a single assignment: lvalue = rvalue.""" if isinstance(lvalue, TupleExpr) or isinstance(lvalue, ListExpr): ltuple = cast(Union[TupleExpr, ListExpr], lvalue) self.check_assignment_...
def check_assignment( self, lvalue: Node, rvalue: Node, infer_lvalue_type: bool = True ) -> None: """Type check a single assignment: lvalue = rvalue.""" if isinstance(lvalue, TupleExpr) or isinstance(lvalue, ListExpr): ltuple = cast(Union[TupleExpr, ListExpr], lvalue) self.check_assignment_...
https://github.com/python/mypy/issues/1126
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "/home/dshea/src/mypy/mypy/main.py", line 53, in main type_check_only(sources, bin_dir, options) File "/home/dshea/src/mypy/mypy/main.py", line 96, in type_check_only python_path=options.python_path) File "/home/dshea/src/...
KeyError
def try_infer_partial_type_from_indexed_assignment( self, lvalue: IndexExpr, rvalue: Node ) -> None: # TODO: Should we share some of this with try_infer_partial_type? if isinstance(lvalue.base, RefExpr): var = cast(Var, lvalue.base.node) partial_types = self.find_partial_types(var) i...
def try_infer_partial_type_from_indexed_assignment( self, lvalue: IndexExpr, rvalue: Node ) -> None: # TODO: Should we share some of this with try_infer_partial_type? partial_types = self.partial_types[-1] if not partial_types: # Fast path leave -- no partial types in the current scope. ...
https://github.com/python/mypy/issues/1126
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "/home/dshea/src/mypy/mypy/main.py", line 53, in main type_check_only(sources, bin_dir, options) File "/home/dshea/src/mypy/mypy/main.py", line 96, in type_check_only python_path=options.python_path) File "/home/dshea/src/...
KeyError
def analyze_ref_expr(self, e: RefExpr, lvalue: bool = False) -> Type: result = None # type: Type node = e.node if isinstance(node, Var): # Variable reference. result = self.analyze_var_ref(node, e) if isinstance(result, PartialType): if result.type is None: ...
def analyze_ref_expr(self, e: RefExpr, lvalue: bool = False) -> Type: result = None # type: Type node = e.node if isinstance(node, Var): # Variable reference. result = self.analyze_var_ref(node, e) if isinstance(result, PartialType): if result.type is None: ...
https://github.com/python/mypy/issues/1126
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "/home/dshea/src/mypy/mypy/main.py", line 53, in main type_check_only(sources, bin_dir, options) File "/home/dshea/src/mypy/mypy/main.py", line 96, in type_check_only python_path=options.python_path) File "/home/dshea/src/...
KeyError
def try_infer_partial_type(self, e: CallExpr) -> None: if isinstance(e.callee, MemberExpr) and isinstance(e.callee.expr, RefExpr): var = cast(Var, e.callee.expr.node) partial_types = self.chk.find_partial_types(var) if partial_types is not None: partial_type_type = cast(PartialTy...
def try_infer_partial_type(self, e: CallExpr) -> None: partial_types = self.chk.partial_types[-1] if not partial_types: # Fast path leave -- no partial types in the current scope. return if isinstance(e.callee, MemberExpr) and isinstance(e.callee.expr, RefExpr): var = e.callee.expr.n...
https://github.com/python/mypy/issues/1126
Traceback (most recent call last): File "./scripts/mypy", line 6, in <module> main(__file__) File "/home/dshea/src/mypy/mypy/main.py", line 53, in main type_check_only(sources, bin_dir, options) File "/home/dshea/src/mypy/mypy/main.py", line 96, in type_check_only python_path=options.python_path) File "/home/dshea/src/...
KeyError
def lex(self, text: Union[str, bytes], first_line: int) -> None: """Lexically analyze a string, storing the tokens at the tok list.""" self.i = 0 self.line = first_line if isinstance(text, bytes): if text.startswith(b"\xef\xbb\xbf"): self.enc = "utf8" bom = True ...
def lex(self, text: Union[str, bytes], first_line: int) -> None: """Lexically analyze a string, storing the tokens at the tok list.""" self.i = 0 self.line = first_line if isinstance(text, bytes): if text.startswith(b"\xef\xbb\xbf"): self.enc = "utf8" bom = True ...
https://github.com/python/mypy/issues/1127
Traceback (most recent call last): File "/usr/local/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/guido/src/mypy/mypy/__main__.py", line 5, in <module> main(None) File "/Users/guido/src...
IndexError
def __init__( self, pyversion: Tuple[int, int] = defaults.PYTHON3_VERSION, is_stub_file: bool = False, ) -> None: self.map = {} self.tok = [] self.indents = [0] self.open_brackets = [] self.pyversion = pyversion self.is_stub_file = is_stub_file self.ignored_lines = set() # Fi...
def __init__( self, pyversion: Tuple[int, int] = defaults.PYTHON3_VERSION, is_stub_file: bool = False, ) -> None: self.map = [self.unknown_character] * 256 self.tok = [] self.indents = [0] self.open_brackets = [] self.pyversion = pyversion self.is_stub_file = is_stub_file self.ig...
https://github.com/python/mypy/issues/1127
Traceback (most recent call last): File "/usr/local/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/guido/src/mypy/mypy/__main__.py", line 5, in <module> main(None) File "/Users/guido/src...
IndexError
def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: import lxml.etree as etree self.last_xml = None path = os.path.relpath(tree.path) if stats.is_special_module(path): return if path.startswith(".."): return if "stubs" in path.split("/"): return v...
def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: import lxml.etree as etree self.last_xml = None path = os.path.relpath(tree.path) if stats.is_special_module(path): return if path.startswith(".."): return if "stubs" in path.split("/"): return v...
https://github.com/python/mypy/issues/1002
$ mypy --html-report mypy_dir defaultdict_example.py Traceback (most recent call last): File "/Users/rwilliams/src/oss/mypy/.venv/bin/mypy", line 6, in <module> main(__file__) File "/Users/rwilliams/src/oss/mypy/.venv/lib/python3.5/site-packages/mypy_lang-0.2.0.dev0-py3.5.egg/mypy/main.py", line 91, in main type_check_...
ValueError
def on_finish(self) -> None: import lxml.etree as etree self.last_xml = None # index_path = os.path.join(self.output_dir, 'index.xml') output_files = sorted(self.files, key=lambda x: x.module) root = etree.Element("mypy-report-index", name=self.main_file) doc = etree.ElementTree(root) for...
def on_finish(self) -> None: import lxml.etree as etree self.last_xml = None # index_path = os.path.join(self.output_dir, 'index.xml') output_files = sorted(self.files, key=lambda x: x.module) root = etree.Element("mypy-report-index", name=self.main_file) doc = etree.ElementTree(root) for...
https://github.com/python/mypy/issues/1002
$ mypy --html-report mypy_dir defaultdict_example.py Traceback (most recent call last): File "/Users/rwilliams/src/oss/mypy/.venv/bin/mypy", line 6, in <module> main(__file__) File "/Users/rwilliams/src/oss/mypy/.venv/lib/python3.5/site-packages/mypy_lang-0.2.0.dev0-py3.5.egg/mypy/main.py", line 91, in main type_check_...
ValueError
def check_argument_count( self, callee: CallableType, actual_types: List[Type], actual_kinds: List[int], actual_names: List[str], formal_to_actual: List[List[int]], context: Context, ) -> None: """Check that the number of arguments to a function are valid. Also check that there are ...
def check_argument_count( self, callee: CallableType, actual_types: List[Type], actual_kinds: List[int], actual_names: List[str], formal_to_actual: List[List[int]], context: Context, ) -> None: """Check that the number of arguments to a function are valid. Also check that there are ...
https://github.com/python/mypy/issues/1095
Traceback (most recent call last): File "/usr/bin/mypy", line 6, in <module> main(__file__) File "/usr/lib/python3.5/site-packages/mypy/main.py", line 50, in main type_check_only(sources, bin_dir, options) File "/usr/lib/python3.5/site-packages/mypy/main.py", line 93, in type_check_only python_path=options.python_path)...
UnboundLocalError
def analyze_typevar_declaration( self, t: Type ) -> Optional[List[Tuple[str, TypeVarExpr]]]: if not isinstance(t, UnboundType): return None unbound = cast(UnboundType, t) sym = self.lookup_qualified(unbound.name, unbound) if sym is None or sym.node is None: return None if sym.nod...
def analyze_typevar_declaration(self, t: Type) -> List[Tuple[str, TypeVarExpr]]: if not isinstance(t, UnboundType): return None unbound = cast(UnboundType, t) sym = self.lookup_qualified(unbound.name, unbound) if sym is None: return None if sym.node.fullname() == "typing.Generic": ...
https://github.com/python/mypy/issues/1029
Traceback (most recent call last): File "/Users/guido/src/mypy/scripts/mypy", line 6, in <module> main(__file__) File "/Users/guido/src/mypy/mypy/main.py", line 49, in main type_check_only(sources, bin_dir, options) File "/Users/guido/src/mypy/mypy/main.py", line 92, in type_check_only python_path=options.python_path) ...
AttributeError
def visit_instance(self, t: Instance) -> None: info = t.type # Check type argument count. if len(t.args) != len(info.type_vars): if len(t.args) == 0: # Insert implicit 'Any' type arguments. t.args = [AnyType()] * len(info.type_vars) return # Invalid number...
def visit_instance(self, t: Instance) -> None: info = t.type # Check type argument count. if len(t.args) != len(info.type_vars): if len(t.args) == 0: # Insert implicit 'Any' type arguments. t.args = [AnyType()] * len(info.type_vars) return # Invalid number...
https://github.com/python/mypy/issues/996
Traceback (most recent call last): ... cb = infer_constraints(mapped.args[i], instance.args[i], IndexError: list index out of range
IndexError
def analyze_class_attribute_access( itype: Instance, name: str, context: Context, is_lvalue: bool, builtin_type: Callable[[str], Instance], msg: MessageBuilder, ) -> Type: node = itype.type.get(name) if not node: if itype.type.fallback_to_any: return AnyType() ...
def analyze_class_attribute_access( itype: Instance, name: str, context: Context, is_lvalue: bool, builtin_type: Callable[[str], Instance], msg: MessageBuilder, ) -> Type: node = itype.type.get(name) if not node: if itype.type.fallback_to_any: return AnyType() ...
https://github.com/python/mypy/issues/998
Traceback (most recent call last): File "/Users/guido/src/mypy/scripts/mypy", line 6, in <module> main(__file__) File "/Users/guido/src/mypy/mypy/main.py", line 49, in main type_check_only(sources, bin_dir, options) File "/Users/guido/src/mypy/mypy/main.py", line 92, in type_check_only python_path=options.python_path) ...
AttributeError
def check_compatibility( self, name: str, base1: TypeInfo, base2: TypeInfo, ctx: Context ) -> None: """Check if attribute name in base1 is compatible with base2 in multiple inheritance. Assume base1 comes before base2 in the MRO, and that base1 and base2 don't have a direct subclass relationship (i.e.,...
def check_compatibility( self, name: str, base1: TypeInfo, base2: TypeInfo, ctx: Context ) -> None: """Check if attribute name in base1 is compatible with base2 in multiple inheritance. Assume base1 comes before base2 in the MRO, and that base1 and base2 don't have a direct subclass relationship (i.e.,...
https://github.com/python/mypy/issues/998
Traceback (most recent call last): File "/Users/guido/src/mypy/scripts/mypy", line 6, in <module> main(__file__) File "/Users/guido/src/mypy/mypy/main.py", line 49, in main type_check_only(sources, bin_dir, options) File "/Users/guido/src/mypy/mypy/main.py", line 92, in type_check_only python_path=options.python_path) ...
AttributeError
def visit_type_var(self, template: TypeVarType) -> List[Constraint]: if self.actual: return [Constraint(template.id, self.direction, self.actual)] else: return []
def visit_type_var(self, template: TypeVarType) -> List[Constraint]: return [Constraint(template.id, self.direction, self.actual)]
https://github.com/python/mypy/issues/674
Traceback (most recent call last): File "scripts/mypy", line 182, in <module> main() File "scripts/mypy", line 36, in main type_check_only(path, module, bin_dir, options) File "scripts/mypy", line 80, in type_check_only python_path=options.python_path) File "/home/jukka/project/mypy/mypy/build.py", line 164, in build r...
AttributeError
def create_cloned_field( field: ModelField, *, cloned_types: Dict[Type[BaseModel], Type[BaseModel]] = None, ) -> ModelField: # _cloned_types has already cloned types, to support recursive models if cloned_types is None: cloned_types = dict() original_type = field.type_ if is_dataclas...
def create_cloned_field(field: ModelField) -> ModelField: original_type = field.type_ if is_dataclass(original_type) and hasattr(original_type, "__pydantic_model__"): original_type = original_type.__pydantic_model__ # type: ignore use_type = original_type if lenient_issubclass(original_type, Ba...
https://github.com/tiangolo/fastapi/issues/894
Traceback (most recent call last): File "test.py", line 21, in <module> @app.get('/group/{group_id}', response_model=Group) File "D:\virtualenvs\test\lib\site-packages\fastapi\routing.py", line 494, in decorator callbacks=callbacks, File "D:\virtualenvs\test\lib\site-packages\fastapi\routing.py", line 438, in add_api_r...
RecursionError
async def request_body_to_args( required_params: List[ModelField], received_body: Optional[Union[Dict[str, Any], FormData]], ) -> Tuple[Dict[str, Any], List[ErrorWrapper]]: values = {} errors = [] if required_params: field = required_params[0] field_info = get_field_info(field) ...
async def request_body_to_args( required_params: List[ModelField], received_body: Optional[Union[Dict[str, Any], FormData]], ) -> Tuple[Dict[str, Any], List[ErrorWrapper]]: values = {} errors = [] if required_params: field = required_params[0] field_info = get_field_info(field) ...
https://github.com/tiangolo/fastapi/issues/914
INFO: 127.0.0.1:60652 - "POST /test/ HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/test/venv38/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi result = await app(self.scope, self.receive, self.send) ...
AttributeError
def generate_operation_id(*, route: routing.APIRoute, method: str) -> str: if route.operation_id: return route.operation_id path: str = route.path_format return generate_operation_id_for_path(name=route.name, path=path, method=method)
def generate_operation_id(*, route: routing.APIRoute, method: str) -> str: if route.operation_id: return route.operation_id path: str = route.path_format operation_id = route.name + path operation_id = operation_id.replace("{", "_").replace("}", "_").replace("/", "_") operation_id = operatio...
https://github.com/tiangolo/fastapi/issues/284
ip-10-8-0-198% % uvicorn run:app --reload INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) INFO: Started reloader process [77186] WARNING:root:email-validator not installed, email fields will be treated as str. To install, run: pip install email-validator INFO:uvicorn:Started server process [77188]...
KeyError
def __init__( self, path: str, endpoint: Callable, *, response_model: Type[Any] = None, status_code: int = 200, tags: List[str] = None, dependencies: Sequence[params.Depends] = None, summary: str = None, description: str = None, response_description: str = "Successful Respons...
def __init__( self, path: str, endpoint: Callable, *, response_model: Type[Any] = None, status_code: int = 200, tags: List[str] = None, dependencies: Sequence[params.Depends] = None, summary: str = None, description: str = None, response_description: str = "Successful Respons...
https://github.com/tiangolo/fastapi/issues/284
ip-10-8-0-198% % uvicorn run:app --reload INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) INFO: Started reloader process [77186] WARNING:root:email-validator not installed, email fields will be treated as str. To install, run: pip install email-validator INFO:uvicorn:Started server process [77188]...
KeyError
def get_flat_models_from_routes( routes: Sequence[Type[BaseRoute]], ) -> Set[Type[BaseModel]]: body_fields_from_routes: List[Field] = [] responses_from_routes: List[Field] = [] for route in routes: if getattr(route, "include_in_schema", None) and isinstance( route, routing.APIRoute ...
def get_flat_models_from_routes( routes: Sequence[Type[BaseRoute]], ) -> Set[Type[BaseModel]]: body_fields_from_routes: List[Field] = [] responses_from_routes: List[Field] = [] for route in routes: if getattr(route, "include_in_schema", None) and isinstance( route, routing.APIRoute ...
https://github.com/tiangolo/fastapi/issues/308
INFO: ('127.0.0.1', 55246) - "GET /openapi.json HTTP/1.1" 500 ERROR: Exception in ASGI application Traceback (most recent call last): File "c:\users\user\.virtualenvs\server-xl-s7lqx\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 369, in run_asgi result = await app(self.scope, self.receive, self.send) File...
TypeError
def __init__(self, master): _Base.__init__(self, master) self.name = "Controller" self.variables = [ ("grbl_0", "float", 10, _("$0 Step pulse time [us]")), ("grbl_1", "int", 25, _("$1 Step idle delay [ms]")), ("grbl_2", "int", 0, _("$2 Step port invert [mask]")), ("grbl_3", "...
def __init__(self, master): _Base.__init__(self, master) self.name = "Controller" self.variables = [ ("grbl_0", "int", 10, _("$0 Step pulse time [us]")), ("grbl_1", "int", 25, _("$1 Step idle delay [ms]")), ("grbl_2", "int", 0, _("$2 Step port invert [mask]")), ("grbl_3", "in...
https://github.com/vlachoudis/bCNC/issues/1463
Program : bCNC Version : 0.9.14-dev Last Change : 8 Jan 2019 Platform : linux2 Python : 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 9.2.1 20191008] TkVersion : 8.6 TclVersion : 8.6 Traceback: Traceback (most recent call last): File "/home/randolph/.local/lib/python2.7/site-packages/bCNC/Utils.py", ...
ValueError
def copy(self): """Return a shallow copy of the instance.""" rv = self.__class__(self.capacity) rv._mapping.update(self._mapping) rv._queue.extend(self._queue) return rv
def copy(self): """Return a shallow copy of the instance.""" rv = self.__class__(self.capacity) rv._mapping.update(self._mapping) rv._queue = deque(self._queue) return rv
https://github.com/pallets/jinja/issues/843
from jinja2 import utils cache = utils.LRUCache(1) cache['foo'] = 'bar' copy = cache.copy() copy['blah'] = 'blargh' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "jinja2/utils.py", line 424, in __setitem__ del self._mapping[self._popleft()] IndexError: pop from an empty deque copy._popleft...
IndexError
def open_if_exists(filename, mode="rb"): """Returns a file descriptor for the filename if that file exists, otherwise ``None``. """ if not os.path.isfile(filename): return None return open(filename, mode)
def open_if_exists(filename, mode="rb"): """Returns a file descriptor for the filename if that file exists, otherwise `None`. """ try: return open(filename, mode) except IOError as e: if e.errno not in (errno.ENOENT, errno.EISDIR, errno.EINVAL): raise
https://github.com/pallets/jinja/issues/821
IOError: [Errno 20] Not a directory: 'dir1/foo/test' from jinja2 import FileSystemLoader, Environment loader = FileSystemLoader(['dir1', 'dir2']) env = Environment(loader=loader) env.get_template('foo/test') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/ji...
IOError
def __init__(self, environment, parent, name, blocks): self.parent = parent self.vars = {} self.environment = environment self.eval_ctx = EvalContext(self.environment, name) self.exported_vars = set() self.name = name # create the initial mapping of blocks. Whenever template inheritance ...
def __init__(self, environment, parent, name, blocks): self.parent = parent self.vars = {} self.environment = environment self.eval_ctx = EvalContext(self.environment, name) self.exported_vars = set() self.name = name # create the initial mapping of blocks. Whenever template inheritance ...
https://github.com/pallets/jinja/issues/675
Traceback (most recent call last): File "test.py", line 16, in <module> print env.get_template('test').render(foobar='test') File "/home/adrian/dev/indico/env/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/home/adrian/dev/indico/e...
TypeError
def visit_Template(self, node, frame=None): assert frame is None, "no root frame allowed" eval_ctx = EvalContext(self.environment, self.name) from jinja2.runtime import __all__ as exported self.writeline("from __future__ import %s" % ", ".join(code_features)) self.writeline("from jinja2.runtime im...
def visit_Template(self, node, frame=None): assert frame is None, "no root frame allowed" eval_ctx = EvalContext(self.environment, self.name) from jinja2.runtime import __all__ as exported self.writeline("from __future__ import %s" % ", ".join(code_features)) self.writeline("from jinja2.runtime im...
https://github.com/pallets/jinja/issues/668
Exception occurred while handling uri: "/1" Traceback (most recent call last): File "/Users/mohamed/.virtualenvs/item.tf/lib/python3.6/site-packages/sanic/sanic.py", line 208, in handle_request response = await response File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.p...
SyntaxError
def visit_For(self, node, frame): loop_frame = frame.inner() test_frame = frame.inner() else_frame = frame.inner() # try to figure out if we have an extended loop. An extended loop # is necessary if the loop is in recursive mode if the special loop # variable is accessed in the body. exten...
def visit_For(self, node, frame): loop_frame = frame.inner() test_frame = frame.inner() else_frame = frame.inner() # try to figure out if we have an extended loop. An extended loop # is necessary if the loop is in recursive mode if the special loop # variable is accessed in the body. exten...
https://github.com/pallets/jinja/issues/669
import jinja2 jinja2.Template('{% for value in values recursive %}1{% else %}0{% endfor %}').render(values=[]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ustr/environ/local/lib/python2.7/site-packages/jinja2/environment.py", line 945, in __new__ return env.from_string(source, tem...
SyntaxError
def _convert_flattened_paths( paths: List, quantization: float, scale_x: float, scale_y: float, offset_x: float, offset_y: float, simplify: bool, ) -> "LineCollection": """Convert a list of FlattenedPaths to a :class:`LineCollection`. Args: paths: list of FlattenedPaths ...
def _convert_flattened_paths( paths: List, quantization: float, scale_x: float, scale_y: float, offset_x: float, offset_y: float, simplify: bool, ) -> "LineCollection": """Convert a list of FlattenedPaths to a :class:`LineCollection`. Args: paths: list of FlattenedPaths ...
https://github.com/abey79/vpype/issues/58
Traceback (most recent call last): File "/Users/theuser/.pyenv/versions/plotter/bin/vpype", line 8, in <module> sys.exit(cli()) File "/Users/theuser/.pyenv/versions/3.7.7/envs/plotter/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/Users/theuser/.pyenv/versions...
IndexError
def read_svg( filename: str, quantization: float, simplify: bool = False, return_size: bool = False, ) -> Union["LineCollection", Tuple["LineCollection", float, float]]: """Read a SVG file an return its content as a :class:`LineCollection` instance. All curved geometries are chopped in segments...
def read_svg( filename: str, quantization: float, simplify: bool = False, return_size: bool = False, ) -> Union["LineCollection", Tuple["LineCollection", float, float]]: """Read a SVG file an return its content as a :class:`LineCollection` instance. All curved geometries are chopped in segments...
https://github.com/abey79/vpype/issues/58
Traceback (most recent call last): File "/Users/theuser/.pyenv/versions/plotter/bin/vpype", line 8, in <module> sys.exit(cli()) File "/Users/theuser/.pyenv/versions/3.7.7/envs/plotter/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/Users/theuser/.pyenv/versions...
IndexError
def read_multilayer_svg( filename: str, quantization: float, simplify: bool = False, return_size: bool = False, ) -> Union["VectorData", Tuple["VectorData", float, float]]: """Read a multilayer SVG file and return its content as a :class:`VectorData` instance retaining the SVG's layer structure....
def read_multilayer_svg( filename: str, quantization: float, simplify: bool = False, return_size: bool = False, ) -> Union["VectorData", Tuple["VectorData", float, float]]: """Read a multilayer SVG file and return its content as a :class:`VectorData` instance retaining the SVG's layer structure....
https://github.com/abey79/vpype/issues/58
Traceback (most recent call last): File "/Users/theuser/.pyenv/versions/plotter/bin/vpype", line 8, in <module> sys.exit(cli()) File "/Users/theuser/.pyenv/versions/3.7.7/envs/plotter/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/Users/theuser/.pyenv/versions...
IndexError
def _line_to_path(dwg: svgwrite.Drawing, lines: Union[np.ndarray, LineCollection]): """Convert a line into a SVG path element. Accepts either a single line or a :py:class:`LineCollection`. Args: lines: line(s) to convert to path Returns: (svgwrite element): path element """ ...
def _line_to_path(dwg: svgwrite.Drawing, lines: Union[np.ndarray, LineCollection]): """Convert a line into a SVG path element. Accepts either a single line or a :py:class:`LineCollection`. Args: lines: line(s) to convert to path Returns: (svgwrite element): path element """ ...
https://github.com/abey79/vpype/issues/58
Traceback (most recent call last): File "/Users/theuser/.pyenv/versions/plotter/bin/vpype", line 8, in <module> sys.exit(cli()) File "/Users/theuser/.pyenv/versions/3.7.7/envs/plotter/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/Users/theuser/.pyenv/versions...
IndexError
def single_line_to_path(line: np.ndarray) -> str: if line[0] == line[-1] and len(line) > 2: closed = True line = line[:-1] else: closed = False return ( "M" + " L".join(f"{x},{y}" for x, y in as_vector(line)) + (" Z" if closed else "") )
def single_line_to_path(line: np.ndarray) -> str: if line[0] == line[-1]: closed = True line = line[:-1] else: closed = False return ( "M" + " L".join(f"{x},{y}" for x, y in as_vector(line)) + (" Z" if closed else "") )
https://github.com/abey79/vpype/issues/58
Traceback (most recent call last): File "/Users/theuser/.pyenv/versions/plotter/bin/vpype", line 8, in <module> sys.exit(cli()) File "/Users/theuser/.pyenv/versions/3.7.7/envs/plotter/lib/python3.7/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/Users/theuser/.pyenv/versions...
IndexError
def parseImageBookmark(page): imageList = list() image_bookmark = json.loads(page) for work in image_bookmark["body"]["works"]: if "isAdContainer" in work and work["isAdContainer"]: continue # Issue #822 if "illustId" in work: imageList.append(int(work["illus...
def parseImageBookmark(page): imageList = list() image_bookmark = json.loads(page) for work in image_bookmark["body"]["works"]: if "isAdContainer" in work and work["isAdContainer"]: continue imageList.append(int(work["illustId"])) # temp = page.find('ul', attrs={'class': Pi...
https://github.com/Nandaka/PixivUtil2/issues/822
Importing image bookmarks... Importing user's bookmarked image from page 1 Source URL: https://www.pixiv.net/ajax/user/XXXXXXXX/illusts/bookmarks?tag=&amp;offset=0&amp;limit=48&amp;rest=show Error at process_image_bookmark(): (<class 'KeyError'>, KeyError('illustId'), <traceback object at 0x044FB988>) Traceback (most r...
KeyError
def sanitize_filename(name, rootDir=None): """Replace reserved character/name with underscore (windows), rootDir is not sanitized.""" # get the absolute rootdir if rootDir is not None: rootDir = os.path.abspath(rootDir) # Unescape '&amp;', '&lt;', and '&gt;' name = html.unescape(name) ...
def sanitize_filename(name, rootDir=None): """Replace reserved character/name with underscore (windows), rootDir is not sanitized.""" # get the absolute rootdir if rootDir is not None: rootDir = os.path.abspath(rootDir) # Unescape '&amp;', '&lt;', and '&gt;' name = html.unescape(name) ...
https://github.com/Nandaka/PixivUtil2/issues/663
Member Background : no_background Processing images from 1 to 16 of 16 Traceback (most recent call last): File "PixivUtil2.py", line 492, in process_member download_image(artist.artistAvatar, File "PixivUtil2.py", line 137, in download_image test_utf = open(filename_test + '.test', "wb") PermissionError: [Errno 13] Per...
PermissionError
def sanitize_filename(name, rootDir=None): """Replace reserved character/name with underscore (windows), rootDir is not sanitized.""" # get the absolute rootdir if rootDir is not None: rootDir = os.path.abspath(rootDir) # Unescape '&amp;', '&lt;', and '&gt;' name = html.unescape(name) ...
def sanitize_filename(name, rootDir=None): """Replace reserved character/name with underscore (windows), rootDir is not sanitized.""" # get the absolute rootdir if rootDir is not None: rootDir = os.path.abspath(rootDir) # Unescape '&amp;', '&lt;', and '&gt;' name = html.unescape(name) ...
https://github.com/Nandaka/PixivUtil2/issues/663
Member Background : no_background Processing images from 1 to 16 of 16 Traceback (most recent call last): File "PixivUtil2.py", line 492, in process_member download_image(artist.artistAvatar, File "PixivUtil2.py", line 137, in download_image test_utf = open(filename_test + '.test', "wb") PermissionError: [Errno 13] Per...
PermissionError
def parseBookmark(page, root_directory, db_path, locale="en", is_json=False): """Parse favorite artist page""" from PixivDBManager import PixivDBManager bookmarks = list() result2 = list() db = PixivDBManager(root_directory=root_directory, target=db_path) if is_json: parsed = json.load...
def parseBookmark(page, root_directory, db_path, locale="en", is_json=False): """Parse favorite artist page""" from PixivDBManager import PixivDBManager bookmarks = list() result2 = list() db = PixivDBManager(root_directory=root_directory, target=db_path) if is_json: parsed = json.load...
https://github.com/Nandaka/PixivUtil2/issues/622
Input: 5 Include Private bookmarks [y/n/o]: Start Page (default=1): End Page (default=0, 0 for no limit): Importing Bookmarks... Exporting page 1 Source URL: https://www.pixiv.net/bookmark.php?type=user&amp;p=1 Using default DB Path: /mnt/c/PixivUtil2/db.sqlite No more data Result: 0 items. Error at process_bookmark()...
ZeroDivisionError
def parseImageBookmark(page): imageList = list() image_bookmark = json.loads(page) for work in image_bookmark["body"]["works"]: if "isAdContainer" in work and work["isAdContainer"]: continue imageList.append(work["illustId"]) # temp = page.find('ul', attrs={'class': PixivBo...
def parseImageBookmark(page): imageList = list() temp = page.find("ul", attrs={"class": PixivBookmark.__re_imageULItemsClass}) temp = temp.findAll("a") if temp is None or len(temp) == 0: return imageList for item in temp: href = re.search(r"/artworks/(\d+)", str(item)) if hr...
https://github.com/Nandaka/PixivUtil2/issues/622
Input: 5 Include Private bookmarks [y/n/o]: Start Page (default=1): End Page (default=0, 0 for no limit): Importing Bookmarks... Exporting page 1 Source URL: https://www.pixiv.net/bookmark.php?type=user&amp;p=1 Using default DB Path: /mnt/c/PixivUtil2/db.sqlite No more data Result: 0 items. Error at process_bookmark()...
ZeroDivisionError
def get_image_bookmark(hide, start_page=1, end_page=0, tag="", sorting=None): """Get user's image bookmark""" total_list = list() i = start_page offset = 0 limit = 48 member_id = __br__._myId while True: if end_page != 0 and i > end_page: print("Page Limit reached: " + s...
def get_image_bookmark(hide, start_page=1, end_page=0, tag="", sorting=None): """Get user's image bookmark""" total_list = list() i = start_page while True: if end_page != 0 and i > end_page: print("Page Limit reached: " + str(end_page)) break url = "https://www....
https://github.com/Nandaka/PixivUtil2/issues/622
Input: 5 Include Private bookmarks [y/n/o]: Start Page (default=1): End Page (default=0, 0 for no limit): Importing Bookmarks... Exporting page 1 Source URL: https://www.pixiv.net/bookmark.php?type=user&amp;p=1 Using default DB Path: /mnt/c/PixivUtil2/db.sqlite No more data Result: 0 items. Error at process_bookmark()...
ZeroDivisionError
def get_bookmarks(hide, start_page=1, end_page=0, member_id=None): """Get User's bookmarked artists""" total_list = list() i = start_page limit = 24 offset = 0 is_json = False while True: if end_page != 0 and i > end_page: print("Limit reached") break ...
def get_bookmarks(hide, start_page=1, end_page=0, member_id=None): """Get User's bookmarked artists""" total_list = list() i = start_page limit = 24 offset = 0 is_json = False while True: if end_page != 0 and i > end_page: print("Limit reached") break ...
https://github.com/Nandaka/PixivUtil2/issues/622
Input: 5 Include Private bookmarks [y/n/o]: Start Page (default=1): End Page (default=0, 0 for no limit): Importing Bookmarks... Exporting page 1 Source URL: https://www.pixiv.net/bookmark.php?type=user&amp;p=1 Using default DB Path: /mnt/c/PixivUtil2/db.sqlite No more data Result: 0 items. Error at process_bookmark()...
ZeroDivisionError
def menu_download_from_online_image_bookmark(opisvalid, args): __log__.info("User's Image Bookmark mode.") start_page = 1 end_page = 0 hide = "n" tag = "" sorting = "desc" if opisvalid and len(args) > 0: hide = args[0].lower() if hide not in ("y", "n", "o"): prin...
def menu_download_from_online_image_bookmark(opisvalid, args): __log__.info("User's Image Bookmark mode.") start_page = 1 end_page = 0 hide = "n" tag = "" sorting = "desc" if opisvalid and len(args) > 0: hide = args[0].lower() if hide not in ("y", "n", "o"): prin...
https://github.com/Nandaka/PixivUtil2/issues/622
Input: 5 Include Private bookmarks [y/n/o]: Start Page (default=1): End Page (default=0, 0 for no limit): Importing Bookmarks... Exporting page 1 Source URL: https://www.pixiv.net/bookmark.php?type=user&amp;p=1 Using default DB Path: /mnt/c/PixivUtil2/db.sqlite No more data Result: 0 items. Error at process_bookmark()...
ZeroDivisionError