From 4a4cd24cabe865d90fa064cc978d7559a38c2a52 Mon Sep 17 00:00:00 2001 From: sol HYUN Date: Thu, 23 Mar 2017 17:32:40 +0900 Subject: [PATCH] Meaningless function removal (associated with subpath) --- rest_framework/schemas.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index ec6d7f3c3..432f09952 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -83,18 +83,6 @@ def field_to_schema(field): return coreschema.String(title=title, description=description) -def common_path(paths): - split_paths = [path.strip('/').split('/') for path in paths] - s1 = min(split_paths) - s2 = max(split_paths) - common = s1 - for i, c in enumerate(s1): - if c != s2[i]: - common = s1[:i] - break - return '/' + '/'.join(common) - - def get_pk_name(model): meta = model._meta.concrete_model._meta return _get_pk(meta).name