Merge pull request #992 from marxin/str.split

simplify str.split
This commit is contained in:
Martin Liška 2023-01-18 10:21:21 +01:00 committed by GitHub
commit 7a3f1c6b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class DuplicatesCheck(AbstractCheck):
@staticmethod
def _get_prefix(pkgfile):
"""Return first two directories in the given path."""
pathlist = str.split(pkgfile.name, '/')
pathlist = pkgfile.name.split('/')
if len(pathlist) == 3:
return '/'.join(pathlist[0:2])
return '/'.join(pathlist[0:3])