Skip to content

Remove fallback from inspect wrapper #5513

Closed
@Zac-HD

Description

@Zac-HD

Now that the master branch only has to be compatible with Python 3.5+, we can simplify the following code because inspect.unwrap was added in 3.4:

real_unwrap = getattr(inspect, "unwrap", None)
if real_unwrap is None:
yield
else:

So we can just use real_unwrap = inspect.unwrap, and unconditionally run the else: block. This is a good issue for a first-time contributor!

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortype: refactoringinternal improvements to the code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions