From 347902ba96d52c3d472257d0ead57ab9dfc8fba8 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 14 Jul 2023 14:24:50 +0530 Subject: [PATCH] ci: bump flake8 --- .pre-commit-config.yaml | 2 +- frappe/email/receive.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 98bd4fcbaf..2659149426 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 additional_dependencies: ['flake8-bugbear',] diff --git a/frappe/email/receive.py b/frappe/email/receive.py index 525703c8a2..5ddd71a4f6 100644 --- a/frappe/email/receive.py +++ b/frappe/email/receive.py @@ -857,7 +857,7 @@ class InboundMail(Email): """Remove Prefixes like 'fw', FWD', 're' etc from subject.""" # Match strings like "fw:", "re :" etc. regex = r"(^\s*(fw|fwd|wg)[^:]*:|\s*(re|aw)[^:]*:\s*)*" - return frappe.as_unicode(strip(re.sub(regex, "", subject, 0, flags=re.IGNORECASE))) + return frappe.as_unicode(strip(re.sub(regex, "", subject, count=0, flags=re.IGNORECASE))) @staticmethod def get_email_fields(doctype):