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

Create is_pip() function #3391

Merged
merged 1 commit into from
May 30, 2021
Merged

Create is_pip() function #3391

merged 1 commit into from
May 30, 2021

Commits on May 30, 2021

  1. Create is_pip() function

    Returns `True` if file is part of pip package. Useful for contextual behavior modification.
    
    ```python
    def is_pip():
        # Is file in a pip package?
        return 'site-packages' in Path(__file__).absolute().parts
    ```
    glenn-jocher committed May 30, 2021
    Configuration menu
    Copy the full SHA
    098f9ea View commit details
    Browse the repository at this point in the history