diff options
author | Alban Gruin | 2017-09-25 16:08:01 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-25 16:08:01 +0200 |
commit | aa7ccf13a8735f162e2ea859ad1d8ebe9f34f657 (patch) | |
tree | 686b7782c87b0848d7965d99031977f22110d9d3 /utils.py | |
parent | 3d2fa6b15c58b775bc7e60e148f3a6bf1f2631d0 (diff) |
Utilisation de pylint pour améliorer la qualité du code
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -13,11 +13,11 @@ # You should have received a copy of the GNU Affero General Public License # along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>. -from django.utils import timezone - import datetime import re +from django.utils import timezone + def get_current_week(): return timezone.now().isocalendar()[:2] @@ -60,7 +60,7 @@ def parse_group(name): # \(.+\)) un ou plusieurs caractères quelconques entre parenthèses # ? groupe optionnel # $ fin de la ligne - group_regex = re.compile("^([\w ]+?)\s+((CM(\w))|(TD(\w)(\d))|(TP(\w)(\d)(\d)))?(\s\(.+\))?$") + group_regex = re.compile(r"^([\w ]+?)\s+((CM(\w))|(TD(\w)(\d))|(TP(\w)(\d)(\d)))?(\s\(.+\))?$") search = group_regex.search(name) if search is None: return name, None, None, None |