Open kloczek opened 3 months ago
Looks like some code can be removed now
[tkloczko@pers-jacek wrapt-1.16.0]$ grep -rE "PY2|PY3" src/wrapt/decorators.py:PY2 = sys.version_info[0] == 2 src/wrapt/decorators.py:if PY2: src/wrapt/decorators.py: if PY2: src/wrapt/decorators.py: if PY2: src/wrapt/decorators.py: if PY2: src/wrapt/importer.py:PY2 = sys.version_info[0] == 2 src/wrapt/importer.py:if PY2: src/wrapt/patches.py:PY2 = sys.version_info[0] == 2 src/wrapt/patches.py:if PY2: src/wrapt/wrappers.py:PY2 = sys.version_info[0] == 2 src/wrapt/wrappers.py:if PY2: src/wrapt/wrappers.py: if not PY2: src/wrapt/wrappers.py: if not PY2: tests/compat.py:PY2 = sys.version_info[0] < 3 tests/compat.py:PY3 = sys.version_info[0] >= 3 tests/compat.py:if PY3: tests/test_adapter.py:from compat import PY2, exec_, getfullargspec tests/test_adapter.py: if PY2: tests/test_adapter_py3.py:from compat import PY2, exec_ tests/test_adapter_py3.py: if PY2: tests/test_adapter_py33.py:from compat import PY2, PY3, exec_ tests/test_adapter_py33.py: if PY2: tests/test_class.py:from compat import PY2, PY3, exec_ tests/test_class_py37.py:from compat import PY2, PY3, exec_ tests/test_function_wrapper.py:from compat import PY2, PY3, exec_ tests/test_object_proxy.py:from compat import PY2, PY3, exec_ tests/test_object_proxy.py: if PY3: tests/test_object_proxy.py: if PY3: tests/test_object_proxy.py: if PY3: tests/test_object_proxy.py: if not PY3: tests/test_object_proxy.py: if PY3: tests/test_post_import_hooks.py:from compat import PY2, PY3 tests/test_post_import_hooks.py: if PY2: tests/test_update_attributes.py:from compat import PY2, PY3, exec_ tests/test_update_attributes.py: if PY3: tests/test_update_attributes.py: if PY3: tests/test_update_attributes.py: if PY3: tests/test_update_attributes.py: if PY3:
On top of that all code should be filtered over pyupgrade --py38-plus and ruff.
pyupgrade --py38-plus
ruff
Looks like some code can be removed now