diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d1072fd..047c851e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/psf/black - rev: 24.10.0 # Replace by any tag/version: https://github.com/psf/black/tags + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.3.1 # Replace by any tag/version: https://github.com/psf/black/tags hooks: - id: black args: # arguments to configure black @@ -15,14 +15,14 @@ repos: - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 9.0.0a3 hooks: - id: isort name: isort (python) # flake8 - repo: https://github.com/PyCQA/flake8 - rev: 7.1.1 + rev: 7.3.0 hooks: - id: flake8 args: # arguments to configure flake8 @@ -33,7 +33,7 @@ repos: # https://flake8.pycqa.org/en/latest/user/error-codes.html - "--ignore=E203,E266,E501,W503,F403,F401,E402,F811" - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.5 + rev: v1.5.6 hooks: - id: insert-license files: "^.*py$" diff --git a/client_code/Autocomplete/__init__.py b/client_code/Autocomplete/__init__.py index 9b8a8b54..fe004fca 100644 --- a/client_code/Autocomplete/__init__.py +++ b/client_code/Autocomplete/__init__.py @@ -20,8 +20,7 @@ __version__ = "3.6.2" -_html_injector.css( - """ +_html_injector.css(""" .anvil-role-ae-autocomplete { padding: 0 !important; } @@ -60,8 +59,7 @@ .anvil-role-ae-autocomplete a:hover, .anvil-role-ae-autocomplete a.anvil-role-ae-autocomplete-active { background-color: #eee; } -""" -) +""") TB = _pluggable_ui["anvil.TextBox"] diff --git a/client_code/Chip/__init__.py b/client_code/Chip/__init__.py index 1ec37417..5ac979cb 100644 --- a/client_code/Chip/__init__.py +++ b/client_code/Chip/__init__.py @@ -13,8 +13,7 @@ __version__ = "3.6.2" -_html_injector.css( - """.ae-chip{ +_html_injector.css(""".ae-chip{ height: 32px; font-size: 14px; font-weight: 500; @@ -41,8 +40,7 @@ .ae-chip span, .ae-chip a > div { padding: 0 !important; } -""" -) +""") _defaults = { "icon": "", diff --git a/client_code/ChipsInput/__init__.py b/client_code/ChipsInput/__init__.py index fdc597b7..3b665972 100644 --- a/client_code/ChipsInput/__init__.py +++ b/client_code/ChipsInput/__init__.py @@ -17,8 +17,7 @@ _primary = _get_color(None) -_html_injector.css( - """ +_html_injector.css(""" .ae-chips-input input { box-shadow: none !important; border: none !important; @@ -36,8 +35,7 @@ padding-bottom: 4px; } -""" -) +""") _defaults = { "primary_placeholder": "", diff --git a/client_code/Pivot/__init__.py b/client_code/Pivot/__init__.py index 4a62ab79..c74c7f20 100644 --- a/client_code/Pivot/__init__.py +++ b/client_code/Pivot/__init__.py @@ -24,8 +24,7 @@ _jquery = anvil.js.window.jQuery -helpers._html_injector.css( - """.anvil-container-overflow, .anvil-panel-col { +helpers._html_injector.css(""".anvil-container-overflow, .anvil-panel-col { overflow: visible; } .ae-pivot-container { @@ -34,8 +33,7 @@ .pivot-placeholder { overflow: auto } - """ -) + """) if "ui" not in _jquery.keys(): helpers._html_injector.cdn(jqueryui) diff --git a/client_code/Slider/__init__.py b/client_code/Slider/__init__.py index edf5a9bb..08d55959 100644 --- a/client_code/Slider/__init__.py +++ b/client_code/Slider/__init__.py @@ -33,8 +33,7 @@ HANDLE_SIZE = "--ae-slider-handle-size" -_html_injector.css( - f""" +_html_injector.css(f""" .ae-slider-container {{ padding: calc(calc(var({HANDLE_SIZE}) - var({BAR_HEIGHT}) + 8px) / 2) calc(var({HANDLE_SIZE}) / 2); }} @@ -60,8 +59,7 @@ .noUi-pips-horizontal {{ height: 40px; }} -""" -) +""") import json diff --git a/client_code/Tabs/__init__.py b/client_code/Tabs/__init__.py index f8d792d6..08ede5d1 100644 --- a/client_code/Tabs/__init__.py +++ b/client_code/Tabs/__init__.py @@ -22,8 +22,7 @@ __version__ = "3.6.2" -_html_injector.css( - """ +_html_injector.css(""" .ae-tabs-container.anvil-role-card { border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; @@ -104,8 +103,7 @@ background-color: rgb(from var(--color) r g b / 0.4); } } -""" -) +""") if _supports_relative_colors(): _get_rgb = _get_color diff --git a/client_code/animation.py b/client_code/animation.py index bca24cda..a118cd43 100644 --- a/client_code/animation.py +++ b/client_code/animation.py @@ -238,13 +238,11 @@ def _compute(self): # add a method to the window.Animation class for our convenience -_window.Function( - """ +_window.Function(""" Animation.prototype.wait = function() { return this.finished; }; -""" -)() +""")() class Animation: