From 24e8b8163c27c9b5f9785e064f72c49232a98ac3 Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Sun, 7 Jul 2019 08:39:56 -0400 Subject: [PATCH] pyflakes: Change to `normalize_path()` for filename normalization It's unnecessary to call the `normalize_paths()` function because it is intended for dealing with multiple paths to normalize. Given that `normalize_paths()` utilizes `normalize_path()`, just call `normalize_path()` directly. --- src/flake8/plugins/pyflakes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake8/plugins/pyflakes.py b/src/flake8/plugins/pyflakes.py index 9be0c81..018d1c9 100644 --- a/src/flake8/plugins/pyflakes.py +++ b/src/flake8/plugins/pyflakes.py @@ -65,7 +65,7 @@ class FlakesChecker(pyflakes.checker.Checker): def __init__(self, tree, file_tokens, filename): """Initialize the PyFlakes plugin with an AST tree and filename.""" - filename = utils.normalize_paths(filename)[0] + filename = utils.normalize_path(filename) with_doctest = self.with_doctest included_by = [ include