]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix missing leading slash due to `relative_to()` resolution
authorŁukasz Langa <lukasz@langa.pl>
Mon, 4 Jun 2018 19:18:27 +0000 (12:18 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Mon, 4 Jun 2018 19:18:27 +0000 (12:18 -0700)
black.py

index b3b37ef3295687460e646679c0683c753e89926a..e59a1e5b6f4a291d2c46252ad419c93a6435a019 100644 (file)
--- a/black.py
+++ b/black.py
@@ -2826,7 +2826,7 @@ def gen_python_files_in_dir(
     """
     assert root.is_absolute(), f"INTERNAL ERROR: `root` must be absolute but is {root}"
     for child in path.iterdir():
-        normalized_path = child.resolve().relative_to(root).as_posix()
+        normalized_path = "/" + child.resolve().relative_to(root).as_posix()
         if child.is_dir():
             normalized_path += "/"
         exclude_match = exclude.search(normalized_path)