Skip to content

Commit edfd6d2

Browse files
jaracoAvasam
andauthored
Collapse startswith operations
Co-authored-by: Avasam <[email protected]>
1 parent 464735f commit edfd6d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

distutils/ccompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ def _make_relative(base):
989989
# Chop off the drive
990990
no_drive = os.path.splitdrive(base)[1]
991991
# If abs, chop off leading /
992-
is_abs = os.path.isabs(no_drive) or sys.platform == 'win32' and (no_drive.startswith('/') or no_drive.startswith('\\'))
992+
is_abs = os.path.isabs(no_drive) or sys.platform == 'win32' and no_drive.startswith(('/', "\\"))
993993
return no_drive[is_abs:]
994994

995995
def shared_object_filename(self, basename, strip_dir=False, output_dir=''):

0 commit comments

Comments
 (0)