mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
add config file for pre-commit (#235)
* add config file * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add isort * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
from datetime import datetime as dt
|
||||
|
||||
def format_date(dt_, fmt = "%m/%d/%Y, %H:%M:%S"):
|
||||
|
||||
def format_date(dt_, fmt="%m/%d/%Y, %H:%M:%S"):
|
||||
return dt_.strftime(fmt)
|
||||
|
||||
def now(fmt = "%m/%d/%Y, %H:%M:%S"):
|
||||
|
||||
def now(fmt="%m/%d/%Y, %H:%M:%S"):
|
||||
return format_date(dt.now(), fmt)
|
||||
|
||||
|
||||
def remove_class(element, className):
|
||||
element.element.classList.remove(className)
|
||||
|
||||
|
||||
def add_class(element, className):
|
||||
element.element.classList.add(className)
|
||||
element.element.classList.add(className)
|
||||
|
||||
Reference in New Issue
Block a user