added pre-commit

This commit is contained in:
2023-10-17 09:29:53 -04:00
parent 2f40aef212
commit 3b32187ba9
5 changed files with 43 additions and 26 deletions

1
.gitignore vendored
View File

@@ -409,4 +409,3 @@ bh_unicode_properties.cache
# Sublime-github package stores a github token in this file # Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github # https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings GitHub.sublime-settings

View File

@@ -1 +1 @@
C:/Users/danny/PycharmProjects/aws_control_panel/.venv/Scripts/python.exe C:/Users/danny/PycharmProjects/aws_control_panel/.venv/Scripts/python.exe

15
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,15 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py311-plus]

41
pdm.lock generated
View File

@@ -149,42 +149,42 @@ files = [
[[package]] [[package]]
name = "boto3" name = "boto3"
version = "1.28.57" version = "1.28.64"
requires_python = ">= 3.7" requires_python = ">= 3.7"
summary = "The AWS SDK for Python" summary = "The AWS SDK for Python"
dependencies = [ dependencies = [
"botocore<1.32.0,>=1.31.57", "botocore<1.32.0,>=1.31.64",
"jmespath<2.0.0,>=0.7.1", "jmespath<2.0.0,>=0.7.1",
"s3transfer<0.8.0,>=0.7.0", "s3transfer<0.8.0,>=0.7.0",
] ]
files = [ files = [
{file = "boto3-1.28.57-py3-none-any.whl", hash = "sha256:5ddf24cf52c7fb6aaa332eaa08ae8c2afc8f2d1e8860680728533dd573904e32"}, {file = "boto3-1.28.64-py3-none-any.whl", hash = "sha256:a99150a30c038c73e89662836820a8cce914afab5ea377942a37c484b85f4438"},
{file = "boto3-1.28.57.tar.gz", hash = "sha256:e2d2824ba6459b330d097e94039a9c4f96ae3f4bcdc731d620589ad79dcd16d3"}, {file = "boto3-1.28.64.tar.gz", hash = "sha256:a5cf93b202568e9d378afdc84be55a6dedf11d30156289fe829e23e6d7dccabb"},
] ]
[[package]] [[package]]
name = "boto3-stubs" name = "boto3-stubs"
version = "1.28.57" version = "1.28.64"
requires_python = ">=3.7" requires_python = ">=3.7"
summary = "Type annotations for boto3 1.28.57 generated with mypy-boto3-builder 7.19.0" summary = "Type annotations for boto3 1.28.64 generated with mypy-boto3-builder 7.19.0"
dependencies = [ dependencies = [
"botocore-stubs", "botocore-stubs",
"types-s3transfer", "types-s3transfer",
"typing-extensions>=4.1.0; python_version < \"3.12\"", "typing-extensions>=4.1.0; python_version < \"3.12\"",
] ]
files = [ files = [
{file = "boto3-stubs-1.28.57.tar.gz", hash = "sha256:61cd792792c2a16d70801d187ebed705c39962a70e90b5dc0f33d04001fb39ae"}, {file = "boto3-stubs-1.28.64.tar.gz", hash = "sha256:ce4cbf2c1afa1a14c5c3cc56a74f78c0c188480cda960a26f998b93ff163ce06"},
{file = "boto3_stubs-1.28.57-py3-none-any.whl", hash = "sha256:b389a693e33d75ed19d38b4a2ba99d25f4f2045a3136f816d7fec4d27a71ddb4"}, {file = "boto3_stubs-1.28.64-py3-none-any.whl", hash = "sha256:8ba0537fa1fd40210ab42c116ab2bae0b8b6dcce5d4f2a61cb9890b50d87fcf9"},
] ]
[[package]] [[package]]
name = "boto3-stubs" name = "boto3-stubs"
version = "1.28.57" version = "1.28.64"
extras = ["essential"] extras = ["essential"]
requires_python = ">=3.7" requires_python = ">=3.7"
summary = "Type annotations for boto3 1.28.57 generated with mypy-boto3-builder 7.19.0" summary = "Type annotations for boto3 1.28.64 generated with mypy-boto3-builder 7.19.0"
dependencies = [ dependencies = [
"boto3-stubs==1.28.57", "boto3-stubs==1.28.64",
"mypy-boto3-cloudformation<1.29.0,>=1.28.0", "mypy-boto3-cloudformation<1.29.0,>=1.28.0",
"mypy-boto3-dynamodb<1.29.0,>=1.28.0", "mypy-boto3-dynamodb<1.29.0,>=1.28.0",
"mypy-boto3-ec2<1.29.0,>=1.28.0", "mypy-boto3-ec2<1.29.0,>=1.28.0",
@@ -194,23 +194,23 @@ dependencies = [
"mypy-boto3-sqs<1.29.0,>=1.28.0", "mypy-boto3-sqs<1.29.0,>=1.28.0",
] ]
files = [ files = [
{file = "boto3-stubs-1.28.57.tar.gz", hash = "sha256:61cd792792c2a16d70801d187ebed705c39962a70e90b5dc0f33d04001fb39ae"}, {file = "boto3-stubs-1.28.64.tar.gz", hash = "sha256:ce4cbf2c1afa1a14c5c3cc56a74f78c0c188480cda960a26f998b93ff163ce06"},
{file = "boto3_stubs-1.28.57-py3-none-any.whl", hash = "sha256:b389a693e33d75ed19d38b4a2ba99d25f4f2045a3136f816d7fec4d27a71ddb4"}, {file = "boto3_stubs-1.28.64-py3-none-any.whl", hash = "sha256:8ba0537fa1fd40210ab42c116ab2bae0b8b6dcce5d4f2a61cb9890b50d87fcf9"},
] ]
[[package]] [[package]]
name = "botocore" name = "botocore"
version = "1.31.57" version = "1.31.64"
requires_python = ">= 3.7" requires_python = ">= 3.7"
summary = "Low-level, data-driven core of boto 3." summary = "Low-level, data-driven core of boto 3."
dependencies = [ dependencies = [
"jmespath<2.0.0,>=0.7.1", "jmespath<2.0.0,>=0.7.1",
"python-dateutil<3.0.0,>=2.1", "python-dateutil<3.0.0,>=2.1",
"urllib3<1.27,>=1.25.4", "urllib3<2.1,>=1.25.4; python_version >= \"3.10\"",
] ]
files = [ files = [
{file = "botocore-1.31.57-py3-none-any.whl", hash = "sha256:af006248276ff8e19e3ec7214478f6257035eb40aed865e405486500471ae71b"}, {file = "botocore-1.31.64-py3-none-any.whl", hash = "sha256:7b709310343a5b430ec9025b2e17c0bac6b16c05f1ac1d9521dece3f10c71bac"},
{file = "botocore-1.31.57.tar.gz", hash = "sha256:301436174635bec739b225b840fc365ca00e5c1a63e5b2a19ee679d204e01b78"}, {file = "botocore-1.31.64.tar.gz", hash = "sha256:d8eb4b724ac437343359b318d73de0cfae0fecb24095827e56135b0ad6b44caf"},
] ]
[[package]] [[package]]
@@ -732,7 +732,7 @@ files = [
[[package]] [[package]]
name = "nicegui" name = "nicegui"
version = "1.3.15" version = "1.3.17"
requires_python = ">=3.8,<4.0" requires_python = ">=3.8,<4.0"
summary = "Create web-based user interfaces with Python. The nice way." summary = "Create web-based user interfaces with Python. The nice way."
dependencies = [ dependencies = [
@@ -747,14 +747,15 @@ dependencies = [
"markdown2<3.0.0,>=2.4.7", "markdown2<3.0.0,>=2.4.7",
"orjson<4.0.0,>=3.8.6; platform_machine != \"i386\" and platform_machine != \"i686\"", "orjson<4.0.0,>=3.8.6; platform_machine != \"i386\" and platform_machine != \"i686\"",
"python-multipart<0.0.7,>=0.0.6", "python-multipart<0.0.7,>=0.0.6",
"python-socketio>=5.9.0",
"typing-extensions>=3.10.0", "typing-extensions>=3.10.0",
"uvicorn[standard]<0.23.0,>=0.22.0", "uvicorn[standard]<0.23.0,>=0.22.0",
"vbuild>=0.8.2", "vbuild>=0.8.2",
"watchfiles<1.0.0,>=0.18.1", "watchfiles<1.0.0,>=0.18.1",
] ]
files = [ files = [
{file = "nicegui-1.3.15-py3-none-any.whl", hash = "sha256:99416e285c276d443d91106ca155e90fc4ade3709a3954a60ad7dbdf2448574b"}, {file = "nicegui-1.3.17-py3-none-any.whl", hash = "sha256:96a492654702b3608eda2ae569c59143d5459f68fa0fbc508ba8cf09582e5cab"},
{file = "nicegui-1.3.15.tar.gz", hash = "sha256:551301163cbe0ab2eb3ce977a25c7ca5bbb14259c6582f22e2c3e98fe8daee67"}, {file = "nicegui-1.3.17.tar.gz", hash = "sha256:605943e2e3bcc07a7a762396d396b5316a032cb507fa28b647543738ac7ae1ee"},
] ]
[[package]] [[package]]

View File

@@ -68,7 +68,7 @@ def update_instance_table(
if tag["Key"] == "Name": if tag["Key"] == "Name":
name = tag["Value"] name = tag["Value"]
table.add_rows({"name": name, "status": instance.state["Name"]}) table.add_rows({"name": name, "status": instance.state["Name"]})
log.info("Table updated") log.debug("Table updated")info
def nicegui_ui() -> None: def nicegui_ui() -> None:
@@ -92,9 +92,11 @@ def nicegui_ui() -> None:
15, lambda: update_instance_table(ec2_resource, container, columns) 15, lambda: update_instance_table(ec2_resource, container, columns)
) )
label = ui.label() label = ui.label()
ui.slider(min=5, max=120, step=5, value=15).bind_value_to( slider = (
timer, "interval" ui.slider(min=5, max=120, step=5, value=15)
).bind_value_to(label, "text") .bind_value_to(timer, "interval")
.bind_value_to(label, "text")
)
ui.run() ui.run()