MCPcopy Index your code
hub / github.com/clips/pattern / _basename

Function _basename

pattern/web/imap/__init__.py:82–90  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

80 "date", "from", "subject", "body", "attachments"
81
82def _basename(folder):
83 # [Gmail]/INBOX => inbox
84 f = folder.replace("[Gmail]/","")
85 f = f.replace("[Gmail]","")
86 f = f.replace("Mail", "") # "Sent Mail" alias = "sent".
87 f = f.replace("INBOX.", "") # "inbox.sent" alias = "sent".
88 f = f.lower()
89 f = f.strip()
90 return f
91
92class MailError(Exception):
93 pass

Callers 2

foldersMethod · 0.85
nameMethod · 0.85

Calls 1

stripMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…