PATH: //opt/cloudlinux/venv/lib/python3.11/site-packages/astroid/brain
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 brain_argparse.py
↓
X
📄 brain_attrs.py
↓
X
📄 brain_boto3.py
↓
X
📄 brain_builtin_inference.py
↓
X
📄 brain_collections.py
↓
X
📄 brain_crypt.py
↓
X
📄 brain_ctypes.py
↓
X
📄 brain_curses.py
↓
X
📄 brain_dataclasses.py
↓
X
📄 brain_dateutil.py
↓
X
📄 brain_fstrings.py
↓
X
📄 brain_functools.py
↓
X
📄 brain_gi.py
↓
X
📄 brain_hashlib.py
↓
X
📄 brain_http.py
↓
X
📄 brain_hypothesis.py
↓
X
📄 brain_io.py
↓
X
📄 brain_mechanize.py
↓
X
📄 brain_multiprocessing.py
↓
X
📄 brain_namedtuple_enum.py
↓
X
📄 brain_nose.py
↓
X
📄 brain_numpy_core_einsumfunc.py
↓
X
📄 brain_numpy_core_fromnumeric.py
↓
X
📄 brain_numpy_core_function_base.py
↓
X
📄 brain_numpy_core_multiarray.py
↓
X
📄 brain_numpy_core_numeric.py
↓
X
📄 brain_numpy_core_numerictypes.py
↓
X
📄 brain_numpy_core_umath.py
↓
X
📄 brain_numpy_ma.py
↓
X
📄 brain_numpy_ndarray.py
↓
X
📄 brain_numpy_random_mtrand.py
↓
X
📄 brain_numpy_utils.py
↓
X
📄 brain_pathlib.py
↓
X
📄 brain_pkg_resources.py
↓
X
📄 brain_pytest.py
↓
X
📄 brain_qt.py
↓
X
📄 brain_random.py
↓
X
📄 brain_re.py
↓
X
📄 brain_regex.py
↓
X
📄 brain_responses.py
↓
X
📄 brain_scipy_signal.py
↓
X
📄 brain_signal.py
↓
X
📄 brain_six.py
↓
X
📄 brain_sqlalchemy.py
↓
X
📄 brain_ssl.py
↓
X
📄 brain_subprocess.py
↓
X
📄 brain_threading.py
↓
X
📄 brain_type.py
↓
X
📄 brain_typing.py
↓
X
📄 brain_unittest.py
↓
X
📄 brain_uuid.py
↓
X
📄 helpers.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: brain_fstrings.py
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt from __future__ import annotations import collections.abc from typing import TypeVar from astroid import nodes from astroid.manager import AstroidManager _NodeT = TypeVar("_NodeT", bound=nodes.NodeNG) def _clone_node_with_lineno( node: _NodeT, parent: nodes.NodeNG, lineno: int | None ) -> _NodeT: cls = node.__class__ other_fields = node._other_fields _astroid_fields = node._astroid_fields init_params = {"lineno": lineno, "col_offset": node.col_offset, "parent": parent} postinit_params = {param: getattr(node, param) for param in _astroid_fields} if other_fields: init_params.update({param: getattr(node, param) for param in other_fields}) new_node = cls(**init_params) if hasattr(node, "postinit") and _astroid_fields: for param, child in postinit_params.items(): if child and not isinstance(child, collections.abc.Sequence): cloned_child = _clone_node_with_lineno( node=child, lineno=new_node.lineno, parent=new_node ) postinit_params[param] = cloned_child new_node.postinit(**postinit_params) return new_node def _transform_formatted_value( # pylint: disable=inconsistent-return-statements node: nodes.FormattedValue, ) -> nodes.FormattedValue | None: if node.value and node.value.lineno == 1: if node.lineno != node.value.lineno: new_node = nodes.FormattedValue( lineno=node.lineno, col_offset=node.col_offset, parent=node.parent ) new_value = _clone_node_with_lineno( node=node.value, lineno=node.lineno, parent=new_node ) new_node.postinit( value=new_value, conversion=node.conversion, format_spec=node.format_spec, ) return new_node # TODO: this fix tries to *patch* http://bugs.python.org/issue29051 # The problem is that FormattedValue.value, which is a Name node, # has wrong line numbers, usually 1. This creates problems for pylint, # which expects correct line numbers for things such as message control. AstroidManager().register_transform(nodes.FormattedValue, _transform_formatted_value)
SIMPAN PERUBAHAN