Merge pull request #3767 from 0xDEADFED5/syntax

fix SyntaxWarnings
This commit is contained in:
Griatch 2025-04-14 22:52:47 +02:00 committed by GitHub
commit a15bf66daf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -212,7 +212,7 @@ class CmdBan(COMMAND_DEFAULT_CLASS):
typ = "IP"
ban = ipban[0]
# replace * with regex form and compile it
ipregex = ban.replace(".", "\.")
ipregex = ban.replace(".", r"\.")
ipregex = ipregex.replace("*", "[0-9]{1,3}")
ipregex = re.compile(r"%s" % ipregex)
bantup = ("", ban, ipregex, now, reason)

View file

@ -3249,7 +3249,7 @@ class CmdFind(COMMAND_DEFAULT_CLASS):
try:
# Check that rhs is either a valid dbref or dbref range
bounds = tuple(
sorted(dbref(x, False) for x in re.split("[-\s]+", self.rhs.strip()))
sorted(dbref(x, False) for x in re.split(r"[-\s]+", self.rhs.strip()))
)
# dbref() will return either a valid int or None

View file

@ -814,7 +814,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
return "#"
def web_get_detail_url(self):
"""
r"""
Returns the URI path for a View that allows users to view details for
this object.
@ -850,7 +850,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
return "#"
def web_get_update_url(self):
"""
r"""
Returns the URI path for a View that allows users to update this
object.
@ -886,7 +886,7 @@ class DefaultChannel(ChannelDB, metaclass=TypeclassBase):
return "#"
def web_get_delete_url(self):
"""
r"""
Returns the URI path for a View that allows users to delete this object.
ex. Oscar (Character) = '/characters/oscar/1/delete/'

View file

@ -128,7 +128,7 @@ class FileHelpEntry:
return LockHandler(self)
def web_get_detail_url(self):
"""
r"""
Returns the URI path for a View that allows users to view details for
this object.