Skip to content

Commit

Permalink
fix gdrive link pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Jan 11, 2021
1 parent 11b3f7c commit 0ad9034
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions userge/core/methods/utils/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ async def restart(self, update_req: bool = False) -> None: # pylint: disable=ar
print(_LOG_STR % c_e)
if update_req:
print(_LOG_STR % "Installing Requirements...")
# nosec
os.system(
os.system( # nosec
"pip3 install -U pip && pip3 install --no-cache-dir -r requirements.txt")
os.execl(sys.executable, sys.executable, '-m', 'userge') # nosec
sys.exit()
1 change: 0 additions & 1 deletion userge/core/types/bound/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def parse(cls, client: Union['_client.Userge', '_client._UsergeBot'],
message: RawMessage, **kwargs: Union[str, bool]) -> 'Message':
""" parse message """
mvars = vars(message)
del message
for key_ in ['_client', '_filtered', '_filtered_input_str',
'_flags', '_process_canceled', '_module', '_kwargs']:
if key_ in mvars:
Expand Down
4 changes: 1 addition & 3 deletions userge/core/types/raw/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,4 @@ def _format_about(about: Union[str, Dict[str, Union[str, List[str], Dict[str, st
else:
tmp_chelp += '\n'
tmp_chelp += t_d
chelp = tmp_chelp.replace('{tr}', Config.CMD_TRIGGER)
del tmp_chelp
return chelp
return tmp_chelp.replace('{tr}', Config.CMD_TRIGGER)
3 changes: 1 addition & 2 deletions userge/plugins/misc/gdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
G_DRIVE_FILE_LINK = "📄 <a href='https://drive.google.com/open?id={}'>{}</a> __({})__"
G_DRIVE_FOLDER_LINK = "📁 <a href='https://drive.google.com/drive/folders/{}'>{}</a> __(folder)__"
_GDRIVE_ID = re.compile(
r'https://drive.google.com/[\w?.&=]+([-\w]{33}|(?<=[/=])0(?:A[-\w]{17}|B[-\w]{26}))')
r'https://drive.google.com/[\w?.&=/]+([-\w]{33}|(?<=[/=])0(?:A[-\w]{17}|B[-\w]{26}))')

_LOG = userge.getLogger(__name__)
_SAVED_SETTINGS = get_collection("CONFIGS")
Expand Down Expand Up @@ -161,7 +161,6 @@ def _search(self,
page_token = response.get('nextPageToken', None)
if page_token is None:
break
del results
if not msg:
return "`Not Found!`"
if parent_id and not force:
Expand Down
1 change: 0 additions & 1 deletion userge/plugins/misc/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def unpack_path(self) -> None:
temp_file_names = []
if temp_file_names:
chunked_file_names.append(temp_file_names)
del temp_file_names, temp_size, min_chunk_size
dir_name = splitext(basename(self._file_path))[0]
self._final_file_path = join(
Config.DOWN_PATH, dir_name.replace('.tar', '').replace('.', '_'))
Expand Down

0 comments on commit 0ad9034

Please sign in to comment.