normalize paths for MacOS (but do nothing on other platforms)
(path)
| 164 | |
| 165 | |
| 166 | def normalize_path(path): |
| 167 | """normalize paths for MacOS (but do nothing on other platforms)""" |
| 168 | # HFS+ converts paths to a canonical form, so users shouldn't be required to enter an exact match. |
| 169 | # Windows and Unix filesystems allow different forms, so users always have to enter an exact match. |
| 170 | return unicodedata.normalize("NFD", path) if sys.platform == "darwin" else path |
| 171 | |
| 172 | |
| 173 | class PatternBase: |