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/constants.py
pylint/constants.py
99
DeletedMessage
ref
function
DeletedMessage("W1602", "basestring-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
100
DeletedMessage
ref
function
DeletedMessage("W1603", "buffer-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
101
DeletedMessage
ref
function
DeletedMessage("W1604", "cmp-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
102
DeletedMessage
ref
function
DeletedMessage("W1605", "coerce-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
103
DeletedMessage
ref
function
DeletedMessage("W1606", "execfile-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
104
DeletedMessage
ref
function
DeletedMessage("W1607", "file-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
105
DeletedMessage
ref
function
DeletedMessage("W1608", "long-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
106
DeletedMessage
ref
function
DeletedMessage("W1609", "raw_input-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
107
DeletedMessage
ref
function
DeletedMessage("W1610", "reduce-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
108
DeletedMessage
ref
function
DeletedMessage("W1611", "standarderror-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
109
DeletedMessage
ref
function
DeletedMessage("W1612", "unicode-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
110
DeletedMessage
ref
function
DeletedMessage("W1613", "xrange-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
111
DeletedMessage
ref
function
DeletedMessage("W1614", "coerce-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
112
DeletedMessage
ref
function
DeletedMessage("W1615", "delslice-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
113
DeletedMessage
ref
function
DeletedMessage("W1616", "getslice-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
114
DeletedMessage
ref
function
DeletedMessage("W1617", "setslice-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
115
DeletedMessage
ref
function
DeletedMessage("W1618", "no-absolute-import"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
116
DeletedMessage
ref
function
DeletedMessage("W1619", "old-division"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
117
DeletedMessage
ref
function
DeletedMessage("W1620", "dict-iter-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
118
DeletedMessage
ref
function
DeletedMessage("W1621", "dict-view-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
119
DeletedMessage
ref
function
DeletedMessage("W1622", "next-method-called"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
120
DeletedMessage
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
121
DeletedMessage
ref
function
DeletedMessage(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
124
DeletedMessage
ref
function
DeletedMessage("W1625", "raising-string", [("W0701", "old-raising-string")]),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
125
DeletedMessage
ref
function
DeletedMessage("W1626", "reload-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
126
DeletedMessage
ref
function
DeletedMessage("W1627", "oct-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
127
DeletedMessage
ref
function
DeletedMessage("W1628", "hex-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
128
DeletedMessage
ref
function
DeletedMessage("W1629", "nonzero-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
129
DeletedMessage
ref
function
DeletedMessage("W1630", "cmp-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
130
DeletedMessage
ref
function
DeletedMessage("W1632", "input-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
131
DeletedMessage
ref
function
DeletedMessage("W1633", "round-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
132
DeletedMessage
ref
function
DeletedMessage("W1634", "intern-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
133
DeletedMessage
ref
function
DeletedMessage("W1635", "unichr-builtin"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
134
DeletedMessage
ref
function
DeletedMessage(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
137
DeletedMessage
ref
function
DeletedMessage("W1637", "zip-builtin-not-iterating"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
138
DeletedMessage
ref
function
DeletedMessage("W1638", "range-builtin-not-iterating"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
139
DeletedMessage
ref
function
DeletedMessage("W1639", "filter-builtin-not-iterating"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
140
DeletedMessage
ref
function
DeletedMessage("W1640", "using-cmp-argument"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
141
DeletedMessage
ref
function
DeletedMessage("W1641", "eq-without-hash"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
142
DeletedMessage
ref
function
DeletedMessage("W1642", "div-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
143
DeletedMessage
ref
function
DeletedMessage("W1643", "idiv-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
144
DeletedMessage
ref
function
DeletedMessage("W1644", "rdiv-method"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
145
DeletedMessage
ref
function
DeletedMessage("W1645", "exception-message-attribute"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
146
DeletedMessage
ref
function
DeletedMessage("W1646", "invalid-str-codec"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
147
DeletedMessage
ref
function
DeletedMessage("W1647", "sys-max-int"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
148
DeletedMessage
ref
function
DeletedMessage("W1648", "bad-python3-import"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
149
DeletedMessage
ref
function
DeletedMessage("W1649", "deprecated-string-function"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
150
DeletedMessage
ref
function
DeletedMessage("W1650", "deprecated-str-translate-call"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
151
DeletedMessage
ref
function
DeletedMessage("W1651", "deprecated-itertools-function"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
152
DeletedMessage
ref
function
DeletedMessage("W1652", "deprecated-types-field"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
153
DeletedMessage
ref
function
DeletedMessage("W1653", "next-method-defined"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
154
DeletedMessage
ref
function
DeletedMessage("W1654", "dict-items-not-iterating"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
155
DeletedMessage
ref
function
DeletedMessage("W1655", "dict-keys-not-iterating"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
156
DeletedMessage
ref
function
DeletedMessage("W1656", "dict-values-not-iterating"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
157
DeletedMessage
ref
function
DeletedMessage("W1657", "deprecated-operator-function"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
158
DeletedMessage
ref
function
DeletedMessage("W1658", "deprecated-urllib-function"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
159
DeletedMessage
ref
function
DeletedMessage("W1659", "xreadlines-attribute"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
160
DeletedMessage
ref
function
DeletedMessage("W1660", "deprecated-sys-function"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
161
DeletedMessage
ref
function
DeletedMessage("W1661", "exception-escape"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
162
DeletedMessage
ref
function
DeletedMessage("W1662", "comprehension-escape"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
164
DeletedMessage
ref
function
DeletedMessage("W0312", "mixed-indentation"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
166
DeletedMessage
ref
function
DeletedMessage(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/constants.py
pylint/constants.py
176
DeletedMessage
ref
function
DeletedMessage("C0330", "bad-continuation"),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
69
_get_env
def
function
def _get_env(): """Extracts the environment PYTHONPATH and appends the current 'sys.path' to it. """ env = dict(os.environ) env["PYTHONPATH"] = os.pathsep.join(sys.path) return env
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
78
lint
def
function
def lint(filename, options=()): """Pylint the given file. When run from emacs we will be in the directory of a file, and passed its filename. If this file is part of a package and is trying to import other modules from within its own package or another package rooted in a directory below it, pylint will classify it as a failed import. To get around this, we traverse down the directory tree to find the root of the package this module is in. We then invoke pylint from this directory. Finally, we must correct the filenames in the output generated by pylint so Emacs doesn't become confused (it will expect just the original filename, while pylint may extend it with extra directories if we've traversed down the tree) """ # traverse downwards until we are out of a python package full_path = os.path.abspath(filename) parent_path = os.path.dirname(full_path) child_path = os.path.basename(full_path) while parent_path != "/" and os.path.exists( os.path.join(parent_path, "__init__.py") ): child_path = os.path.join(os.path.basename(parent_path), child_path) parent_path = os.path.dirname(parent_path) # Start pylint # Ensure we use the python and pylint associated with the running epylint run_cmd = "import sys; from pylint.lint import Run; Run(sys.argv[1:])" cmd = ( [sys.executable, "-c", run_cmd] + [ "--msg-template", "{path}:{line}: {category} ({msg_id}, {symbol}, {obj}) {msg}", "-r", "n", child_path, ] + list(options) ) with Popen( cmd, stdout=PIPE, cwd=parent_path, env=_get_env(), universal_newlines=_True ) as process: for line in process.stdout: # remove pylintrc warning if line.startswith("No config file found"): continue # modify the file name that's put out to reverse the path traversal we made parts = line.split(":") if parts and parts[0] == child_path: line = ":".join([filename] + parts[1:]) print(line, end=" ") process.wait() return process.returncode
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
95
abspath
ref
function
full_path = os.path.abspath(filename)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
96
dirname
ref
function
parent_path = os.path.dirname(full_path)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
97
basename
ref
function
child_path = os.path.basename(full_path)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
99
exists
ref
function
while parent_path != "/" and os.path.exists(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
102
basename
ref
function
child_path = os.path.join(os.path.basename(parent_path), child_path)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
103
dirname
ref
function
parent_path = os.path.dirname(parent_path)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
121
_get_env
ref
function
cmd, stdout=PIPE, cwd=parent_path, env=_get_env(), universal_newlines=True
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
139
py_run
def
function
null
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
179
_get_env
ref
function
env=_get_env(),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
189
Run
def
function
def Run(argv: Optional[Sequence[str]] = None): if not argv and len(sys.argv) == 1: print(f"Usage: {sys.argv[0]} <filename> [options]") sys.exit(1) argv = argv or sys.argv[1:] if not os.path.exists(argv[0]): print(f"{argv[0]} does not exist") sys.exit(1) else: sys.exit(lint(argv[0], argv[1:]))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
195
exists
ref
function
if not os.path.exists(argv[0]):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
199
lint
ref
function
sys.exit(lint(argv[0], argv[1:]))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/epylint.py
pylint/epylint.py
203
Run
ref
function
Run()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
17
InvalidMessageError
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
21
UnknownMessageError
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
25
EmptyReportError
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
29
InvalidReporterError
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
33
InvalidArgsError
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
37
NoLineSuppliedError
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
InvalidMessageError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
Exception
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
UnknownMessageError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
Exception
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
EmptyReportError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
Exception
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
InvalidReporterError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
Exception
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
InvalidArgsError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
ValueError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
NoLineSuppliedError
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/exceptions.py
pylint/exceptions.py
-1
Exception
ref
function
none
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/__init__.py
pylint/extensions/__init__.py
11
initialize
def
function
def initialize(linter: "PyLinter") -> None: """Initialize linter with checkers in the extensions directory.""" register_plugins(linter, __path__[0])
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/__init__.py
pylint/extensions/__init__.py
13
register_plugins
ref
function
register_plugins(linter, __path__[0])
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/_check_docs_utils.py
pylint/extensions/_check_docs_utils.py
35
space_indentation
def
function
def space_indentation(s): """The number of leading spaces in a string. :param str s: input string :rtype: int :return: number of leading spaces """ return len(s) - len(s.lstrip(" "))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/_check_docs_utils.py
pylint/extensions/_check_docs_utils.py
46
get_setters_property_name
def
function
def get_setters_property_name(node): """Get the name of the property that the given node is a setter for. :param node: The node to get the property name for. :type node: str :rtype: str or None :returns: The name of the property that the node is a setter for, or None if one could not be found. """ decorators = node.decorators.nodes if node.decorators else [] for decorator in decorators: if ( isinstance(decorator, nodes.Attribute) and decorator.attrname == "setter" and isinstance(decorator.expr, nodes.Name) ): return decorator.expr.name return None