Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: remove use PY2 and PY3 in the module code #265

Open
kloczek opened this issue May 30, 2024 · 1 comment
Open

RFE: remove use PY2 and PY3 in the module code #265

kloczek opened this issue May 30, 2024 · 1 comment

Comments

@kloczek
Copy link

kloczek commented May 30, 2024

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:
@kloczek
Copy link
Author

kloczek commented May 30, 2024

On top of that all code should be filtered over pyupgrade --py38-plus and ruff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant