Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

utils.py 421B

1234567891011121314
  1. # This file is dual licensed under the terms of the Apache License, Version
  2. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3. # for complete details.
  4. from __future__ import absolute_import, division, print_function
  5. import re
  6. _canonicalize_regex = re.compile(r"[-_.]+")
  7. def canonicalize_name(name):
  8. # This is taken from PEP 503.
  9. return _canonicalize_regex.sub("-", name).lower()