diff --git a/flake8/utils.py b/flake8/utils.py index 1ceb76f..8341a06 100644 --- a/flake8/utils.py +++ b/flake8/utils.py @@ -48,9 +48,12 @@ def normalize_path(path, parent=os.curdir): :rtype: str """ - if '/' in path: + # NOTE(sigmavirus24): Using os.path.sep allows for Windows paths to + # be specified and work appropriately. + separator = os.path.sep + if separator in path: path = os.path.abspath(os.path.join(parent, path)) - return path.rstrip('/') + return path.rstrip(separator) def stdin_get_value():