get_discord_emoji
doesn't contain any code208 else:
209 raise Exception(f"NetworkError: {resp.status}==>\t{_url}")
210
211 def get_discord_emoji(self, _id: int, /) -> Optional[BytesIO]:212 pass
213
214 def get_file_path(self, emoji: str) -> str:
download_emoji
doesn't contain any code150 code_points = [f'{ord(c):04X}' for c in emoji]
151 return f"./resources/emoji/openmoji/{'-'.join(code_points)}.png"
152
153 def download_emoji(self, download_url):154 pass
155
156
get_discord_emoji
doesn't contain any code143 安装路径:./resources/emoji/openmoji
144 """
145
146 def get_discord_emoji(self, _id: int, /) -> Optional[BytesIO]:147 pass
148
149 def get_file_path(self, emoji: str) -> str:
Description
The function/method has been left empty here, without any comment or docstring. This can cause confusion later on why this was left empty.
- If it is intentionally left blank, a nested comment should explain the reason why it is being done.
- If this is not yet, or never will be, supported, an exception should be thrown rather than leaving it blank.
Not preferred:
def myfunc1(foo="Noncompliant"):
pass
class MyClass:
def mymethod1(self, foo="Noncompliant"):
pass
Preferred:
def myfunc1():
pass # comment explaining why this function is empty
def myfunc2():
raise NotImplementedError()
def myfunc3():
'''
Docstring explaining why this function is empty.
'''
class MyClass:
def mymethod1(self):
pass # comment explaining why this function is empty
def mymethod2(self):
raise NotImplementedError()
def mymethod3(self):
'''
Docstring explaining why this method is empty. Note that this is not recommended for classes
which are meant to be subclassed.
'''