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

Add file permission check for pathlib chmod #1043

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Aug 16, 2023

  1. Add file permission check for pathlib chmod

    This extends the existing implementation for detecting
    bad file permissions to account for calls to pathlib
    module functions in addition to those from the os module.
    
    The pathlib chmod and lchmod functions are really just
    wrappers around the os module equivalents. However, since
    they are class methods, the pre-existing logic in the
    code did not consider the corresponding pathlib function calls.
    
    Note that the filename is not easily parsable in the case of pathlib.
    
    Resolves PyCQA#1042
    costaparas committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    91b2179 View commit details
    Browse the repository at this point in the history
  2. Add newline

    costaparas committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    17fa758 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. Check if pathlib is imported

    This strengthens the check to reduce false positives.
    costaparas committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    8c0c501 View commit details
    Browse the repository at this point in the history