fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 171 | get_callbacks | def | function | def get_callbacks(self, node):
"""Get callbacks from handler for the visited node."""
klass = node.__class__
methods = self._cache.get(klass)
if methods is None:
handler = self.handler
kid = klass.__name__.lower()
e_method = getattr(
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 189 | visit | def | function | def visit(self, node):
"""Walk on the tree from <node>, getting callbacks from handler."""
method = self.get_callbacks(node)[0]
if method is not None:
method(node)
def leave(self, node):
"""Walk on the tree from <node>, getting callbacks from handler."""
meth... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 191 | get_callbacks | ref | function | method = self.get_callbacks(node)[0]
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 193 | method | ref | function | method(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 195 | leave | def | function | def leave(self, node):
"""Walk on the tree from <node>, getting callbacks from handler."""
method = self.get_callbacks(node)[1]
if method is not None:
method(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 197 | get_callbacks | ref | function | method = self.get_callbacks(node)[1]
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 199 | method | ref | function | method(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 202 | LocalsVisitor | def | class | __init__ visit |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 209 | visit | def | function | def visit(self, node):
"""Walk on the tree from <node>, getting callbacks from handler."""
method = self.get_callbacks(node)[0]
if method is not None:
method(node)
def leave(self, node):
"""Walk on the tree from <node>, getting callbacks from handler."""
meth... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 215 | get_callbacks | ref | function | methods = self.get_callbacks(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 220 | visit | ref | function | self.visit(local_node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 226 | get_annotation_label | def | function | def get_annotation_label(ann: Union[nodes.Name, nodes.Subscript]) -> str:
label = ""
if isinstance(ann, nodes.Subscript):
label = ann.as_string()
elif isinstance(ann, nodes.Name):
label = ann.name
return label
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 229 | as_string | ref | function | label = ann.as_string()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 235 | get_annotation | def | function | def get_annotation(
node: Union[nodes.AssignAttr, nodes.AssignName]
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 253 | infer | ref | function | default, *_ = node.infer()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 257 | get_annotation_label | ref | function | label = get_annotation_label(ann)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 270 | infer_node | def | function | def infer_node(node: Union[nodes.AssignAttr, nodes.AssignName]) -> set:
"""Return a set containing the node annotation if it exists
otherwise return a set of the inferred types using the NodeNG.infer method
"""
ann = get_annotation(node)
try:
if ann:
if isinstance(ann, nodes.Sub... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 275 | get_annotation | ref | function | ann = get_annotation(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 280 | infer | ref | function | return set(ann.infer())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 281 | infer | ref | function | return set(node.infer())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/utils.py | pylint/pyreverse/utils.py | 286 | check_graphviz_availability | def | function | def check_graphviz_availability():
"""Check if the ``dot`` command is available on the machine.
This is needed if image output is desired and ``dot`` is used to convert
from *.dot or *.gv into the final output format.
"""
if shutil.which("dot") is None:
print(
"The requested outp... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 187 | VCGPrinter | def | class | _open_graph _close_graph emit_node _build_label_for_node emit_edge _write_attributes |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 188 | _open_graph | def | function | def _open_graph(self) -> None:
"""Emit the header lines."""
self.emit("graph:{\n")
self._inc_indent()
self._write_attributes(
GRAPH_ATTRS,
title=self.title,
layoutalgorithm="dfs",
late_edge_labels="yes",
port_sharing="no",
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 190 | emit | ref | function | self.emit("graph:{\n")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 191 | _inc_indent | ref | function | self._inc_indent()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 192 | _write_attributes | ref | function | self._write_attributes(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 201 | _write_attributes | ref | function | self._write_attributes(GRAPH_ATTRS, orientation=ORIENTATION[self.layout])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 203 | _close_graph | def | function | def _close_graph(self) -> None:
"""Emit the lines needed to properly close the graph."""
self._dec_indent()
self.emit("}")
def emit_node(
self,
name: str,
type_: NodeType,
properties: Optional[NodeProperties] = None,
) -> None:
"""Create a new... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 205 | _dec_indent | ref | function | self._dec_indent()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 206 | emit | ref | function | self.emit("}")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 208 | emit_node | def | function | def emit_node(
self,
name: str,
type_: NodeType,
properties: Optional[NodeProperties] = None,
) -> None:
"""Create a new node. Nodes can be classes, packages, participants etc."""
if properties is None:
properties = NodeProperties(label=name)
e... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 216 | NodeProperties | ref | function | properties = NodeProperties(label=name)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 219 | emit | ref | function | self.emit(f'node: {{title:"{name}"', force_newline=False)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 220 | _write_attributes | ref | function | self._write_attributes(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 222 | _build_label_for_node | ref | function | label=self._build_label_for_node(properties),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 225 | emit | ref | function | self.emit("}")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 228 | _build_label_for_node | def | function | def _build_label_for_node(properties: NodeProperties) -> str:
fontcolor = "\f09" if properties.fontcolor == "red" else ""
label = rf"\fb{fontcolor}{properties.label}\fn"
if properties.attrs is None and properties.methods is None:
# return a compact form which only displays the cl... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 249 | emit_edge | def | function | def emit_edge(
self,
from_node: str,
to_node: str,
type_: EdgeType,
label: Optional[str] = None,
) -> None:
"""Create an edge from one node to another to display relationships."""
self.emit(
f'edge: {{sourcename:"{from_node}" targetname:"{to_no... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 257 | emit | ref | function | self.emit(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 264 | _write_attributes | ref | function | self._write_attributes(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 268 | emit | ref | function | self.emit("}")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 270 | _write_attributes | def | function | def _write_attributes(self, attributes_dict: Mapping[str, Any], **args) -> None:
"""Write graph, node or edge attributes."""
for key, value in args.items():
try:
_type = attributes_dict[key]
except KeyError as e:
raise Exception(
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 281 | emit | ref | function | self.emit(f'{key}:"{value}"\n')
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 283 | emit | ref | function | self.emit(f"{key}:{int(value)}\n")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/vcg_printer.py | pylint/pyreverse/vcg_printer.py | 285 | emit | ref | function | self.emit(f"{key}:{value}\n")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 37 | DiagramWriter | def | class | __init__ write write_packages write_classes set_printer get_package_properties get_class_properties get_shape_color save |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 42 | get_printer_for_filetype | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 74 | exists | ref | function | if os.path.exists(self.config.output_directory):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 76 | set_printer | ref | function | self.set_printer(file_name, basename)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 78 | write_classes | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 80 | write_packages | ref | function | self.write_packages(diagram)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 81 | save | ref | function | self.save()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 83 | write_packages | def | function | def write_packages(self, diagram: PackageDiagram) -> None:
"""Write a package diagram."""
# sorted to get predictable (hence testable) results
for module in sorted(diagram.modules(), key=lambda x: x.title):
module.fig_id = module.node.qname()
self.printer.emit_node(
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 86 | modules | ref | function | for module in sorted(diagram.modules(), key=lambda x: x.title):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 87 | qname | ref | function | module.fig_id = module.node.qname()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 88 | emit_node | ref | function | self.printer.emit_node(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 91 | get_package_properties | ref | function | properties=self.get_package_properties(module),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 94 | get_relationships | ref | function | for rel in diagram.get_relationships("depends"):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 95 | emit_edge | ref | function | self.printer.emit_edge(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 101 | write_classes | def | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 105 | qname | ref | function | obj.fig_id = obj.node.qname()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 107 | emit_node | ref | function | self.printer.emit_node(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 108 | get_class_properties | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 111 | get_relationships | ref | function | for rel in diagram.get_relationships("specialization"):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 112 | emit_edge | ref | function | self.printer.emit_edge(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 118 | get_relationships | ref | function | for rel in diagram.get_relationships("implements"):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 119 | emit_edge | ref | function | self.printer.emit_edge(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 125 | get_relationships | ref | function | for rel in diagram.get_relationships("association"):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 126 | emit_edge | ref | function | self.printer.emit_edge(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 133 | set_printer | def | function | def set_printer(self, file_name: str, basename: str) -> None:
"""Set printer."""
self.printer = self.printer_class(basename)
self.file_name = file_name
def get_package_properties(self, obj: PackageEntity) -> NodeProperties:
"""Get label and shape for packages."""
return ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 135 | printer_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 138 | get_package_properties | def | function | def get_package_properties(self, obj: PackageEntity) -> NodeProperties:
"""Get label and shape for packages."""
return NodeProperties(
label=obj.title,
color=self.get_shape_color(obj) if self.config.colorized else "black",
)
def get_class_properties(self, obj: Cl... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 140 | NodeProperties | ref | function | return NodeProperties(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 142 | get_shape_color | ref | function | color=self.get_shape_color(obj) if self.config.colorized else "black",
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 145 | get_class_properties | def | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 147 | NodeProperties | ref | function | properties = NodeProperties(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 151 | is_exception | ref | function | fontcolor="red" if is_exception(obj.node) else "black",
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 152 | get_shape_color | ref | function | color=self.get_shape_color(obj) if self.config.colorized else "black",
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 156 | get_shape_color | def | function | def get_shape_color(self, obj: DiagramEntity) -> str:
"""Get shape color."""
qualified_name = obj.node.qname()
if modutils.is_standard_module(qualified_name.split(".", maxsplit=1)[0]):
return "grey"
if isinstance(obj.node, nodes.ClassDef):
package = qualified_... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 158 | qname | ref | function | qualified_name = obj.node.qname()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 159 | is_standard_module | ref | function | if modutils.is_standard_module(qualified_name.split(".", maxsplit=1)[0]):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 172 | save | def | function | def save(self) -> None:
"""Write to disk."""
self.printer.generate(self.file_name)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/pyreverse/writer.py | pylint/pyreverse/writer.py | 174 | generate | ref | function | self.printer.generate(self.file_name)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/__init__.py | pylint/reporters/__init__.py | 37 | initialize | def | function | def initialize(linter: "PyLinter") -> None:
"""Initialize linter with reporters in this package."""
utils.register_plugins(linter, __path__[0])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/__init__.py | pylint/reporters/__init__.py | 39 | register_plugins | ref | function | utils.register_plugins(linter, __path__[0])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 17 | BaseReporter | def | class | __init__ handle_message set_output writeln display_reports _display display_messages on_set_current_module on_close |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 36 | handle_message | def | function | def handle_message(self, msg: Message) -> None:
"""Handle a new message triggered on the current file."""
self.messages.append(msg)
def set_output(self, output: Optional[TextIO] = None) -> None:
"""Set output stream."""
# pylint: disable-next=fixme
# TODO: Remove this me... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 40 | set_output | def | function | def set_output(self, output: Optional[TextIO] = None) -> None:
"""Set output stream."""
# pylint: disable-next=fixme
# TODO: Remove this method after depreciation
warn(
"'set_output' will be removed in 3.0, please use 'reporter.out = stream' instead",
Deprecat... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 50 | writeln | def | function | def writeln(self, string: str = "") -> None:
"""Write a line in the output buffer."""
print(string, file=self.out)
def display_reports(self, layout: "Section") -> None:
"""Display results encapsulated in the layout tree."""
self.section = 0
if layout.report_id:
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 54 | display_reports | def | function | def display_reports(self, layout: "Section") -> None:
"""Display results encapsulated in the layout tree."""
self.section = 0
if layout.report_id:
if isinstance(layout.children[0].children[0], Text):
layout.children[0].children[0].data += f" ({layout.report_id})"
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 62 | _display | ref | function | self._display(layout)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 64 | _display | def | function | def _display(self, layout: "Section") -> None:
"""Display the layout."""
raise NotImplementedError()
def display_messages(self, layout: Optional["Section"]) -> None:
"""Hook for displaying the messages of the reporter.
This will be called whenever the underlying messages
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 68 | display_messages | def | function | def display_messages(self, layout: Optional["Section"]) -> None:
"""Hook for displaying the messages of the reporter.
This will be called whenever the underlying messages
needs to be displayed. For some reporters, it probably
doesn't make sense to display messages as soon as they
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 81 | on_set_current_module | def | function | def on_set_current_module(self, module: str, filepath: Optional[str]) -> None:
"""Hook called when a module starts to be analysed."""
def on_close(
self,
stats: LinterStats,
previous_stats: LinterStats,
) -> None:
"""Hook called when a module finished analyzing."""
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/base_reporter.py | pylint/reporters/base_reporter.py | 84 | on_close | def | function | def on_close(
self,
stats: LinterStats,
previous_stats: LinterStats,
) -> None:
"""Hook called when a module finished analyzing."""
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/collecting_reporter.py | pylint/reporters/collecting_reporter.py | 10 | CollectingReporter | def | class | __init__ reset _display |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/collecting_reporter.py | pylint/reporters/collecting_reporter.py | 19 | reset | def | function | def reset(self) -> None:
self.messages = []
def _display(self, layout: "Section") -> None:
pass
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/collecting_reporter.py | pylint/reporters/collecting_reporter.py | 22 | _display | def | function | def _display(self, layout: "Section") -> None:
pass
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/json_reporter.py | pylint/reporters/json_reporter.py | 26 | JSONReporter | def | class | display_messages display_reports _display |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/reporters/json_reporter.py | pylint/reporters/json_reporter.py | 33 | display_messages | def | function | def display_messages(self, layout: Optional["Section"]) -> None:
"""Launch layouts display."""
json_dumpable = [
{
"type": msg.category,
"module": msg.module,
"obj": msg.obj,
"line": msg.line,
"column": msg.c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.