Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
altlinux-packages-bot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Unitsaev
altlinux-packages-bot
Commits
bcaea74f
Verified
Commit
bcaea74f
authored
Mar 09, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils: deduplicate date_format in package handler
parent
2a43bc86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
package.py
src/handlers/package.py
+1
-10
No files found.
src/handlers/package.py
View file @
bcaea74f
...
...
@@ -3,15 +3,13 @@ from telegrinder.rules import Command, Argument
from
telegrinder.tools.formatting
import
HTMLFormatter
,
link
from
datetime
import
datetime
from
altrepo
import
altrepo
from
altrepo.api.errors
import
DataNotFoundError
,
RequestValidationError
from
data.keyboards
import
package_keyboards
from
database.models
import
User
from
database.func
import
DB
from
services.utils
import
_bold
from
services.utils
import
_bold
,
date_format
from
config
import
APPSTREAM_SKIP_LIST
...
...
@@ -138,13 +136,6 @@ async def package_info_handler(
)
async
def
date_format
(
time
)
->
str
:
if
isinstance
(
time
,
(
int
,
float
)):
dt
=
datetime
.
fromtimestamp
(
time
)
elif
isinstance
(
time
,
str
):
dt
=
datetime
.
fromisoformat
(
time
)
return
dt
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
async
def
ftbfs_message_format
(
beehive
):
return
HTMLFormatter
(
link
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment