aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-25 16:08:01 +0200
committerAlban Gruin2017-09-25 16:08:01 +0200
commitaa7ccf13a8735f162e2ea859ad1d8ebe9f34f657 (patch)
tree686b7782c87b0848d7965d99031977f22110d9d3 /utils.py
parent3d2fa6b15c58b775bc7e60e148f3a6bf1f2631d0 (diff)
Utilisation de pylint pour améliorer la qualité du code
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils.py b/utils.py
index 3ded68e..c3b4531 100644
--- a/utils.py
+++ b/utils.py
@@ -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