aboutsummaryrefslogtreecommitdiff
path: root/newspipe
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2022-01-02 18:02:18 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2022-01-02 18:02:18 +0100
commitb5aa79f0641a0589f2a9e783035db2546561052f (patch)
tree691d4b247f183a3ce3615792c86a4f36bca22c05 /newspipe
parentvarious !minor fixes (diff)
downloadnewspipe-b5aa79f0641a0589f2a9e783035db2546561052f.tar.gz
newspipe-b5aa79f0641a0589f2a9e783035db2546561052f.tar.bz2
newspipe-b5aa79f0641a0589f2a9e783035db2546561052f.zip
Resolved some flakes warnings.
Diffstat (limited to 'newspipe')
-rw-r--r--newspipe/lib/utils.py2
-rw-r--r--newspipe/models/user.py6
-rw-r--r--newspipe/web/forms.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/newspipe/lib/utils.py b/newspipe/lib/utils.py
index 7e6f3cf4..beef75ac 100644
--- a/newspipe/lib/utils.py
+++ b/newspipe/lib/utils.py
@@ -82,7 +82,7 @@ def clear_string(data):
and consecutive white spaces (more that one).
"""
p = re.compile("<[^>]+>") # HTML tags
- q = re.compile("\s") # consecutive white spaces
+ q = re.compile(r"\s") # consecutive white spaces
return p.sub("", q.sub(" ", data))
diff --git a/newspipe/models/user.py b/newspipe/models/user.py
index c119e1b0..158da03e 100644
--- a/newspipe/models/user.py
+++ b/newspipe/models/user.py
@@ -20,9 +20,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__author__ = "Cedric Bonhomme"
-__version__ = "$Revision: 0.4 $"
+__version__ = "$Revision: 0.5 $"
__date__ = "$Date: 2013/11/05 $"
-__revision__ = "$Date: 2014/04/12 $"
+__revision__ = "$Date: 2022/01/02 $"
__copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
@@ -94,7 +94,7 @@ class User(db.Model, UserMixin, RightMixin):
@staticmethod
def make_valid_nickname(nickname):
- return re.sub("[^a-zA-Z0-9_\.]", "", nickname)
+ return re.sub("[^a-zA-Z0-9_-]", "", nickname)
@validates("bio")
def validates_bio(self, key, value):
diff --git a/newspipe/web/forms.py b/newspipe/web/forms.py
index c73d58fa..7dd21161 100644
--- a/newspipe/web/forms.py
+++ b/newspipe/web/forms.py
@@ -87,7 +87,7 @@ class SignupForm(FlaskForm):
self.nickname.errors.append(
lazy_gettext(
"This nickname has invalid characters. "
- "Please use letters, numbers, dots and underscores only."
+ "Please use letters, numbers, dash and underscores only."
)
)
validated = False
bgstack15