Merge pull request #13 from jepler/modernize-remove-codeql

Adapt to upstream textual changes
This commit is contained in:
Jeff Epler 2025-04-19 17:29:31 +02:00 committed by GitHub
commit 715ab18902
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 56 deletions

View file

@ -1,48 +0,0 @@
# SPDX-FileCopyrightText: 2022 Jeff Epler
#
# SPDX-License-Identifier: CC0-1.0
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: "53 3 * * 5"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ python ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies (python)
run: pip3 install -r requirements-dev.txt
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"

View file

@ -33,7 +33,7 @@ jobs:
- name: Upload patch
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: patch
path: ~/pre-commit.patch
@ -58,7 +58,7 @@ jobs:
run: python -mbuild
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*

View file

@ -149,7 +149,7 @@ class TOTPLabel(Label, can_focus=True):
def __init__(self, otp: "TOTPData") -> None:
self.otp = otp
super().__init__(
rich.text.Text(otp.name, overflow="ellipsis", no_wrap=True),
rich.text.Text(otp.name),
classes=f"otp-name otp-name-{otp.id} otp-{otp.id}",
expand=True,
)
@ -274,6 +274,7 @@ class TTOTP(App[None]):
.otp-progress { width: 12; }
.otp-value { width: 9; }
.otp-hidden { display: none; }
.otp-name { text-wrap: nowrap; text-overflow: ellipsis; }
TOTPLabel { width: 1fr; height: 1; padding: 0 1; }
Horizontal:focus-within { background: $primary-background; }
Bar > .bar--bar { color: $success; }
@ -396,9 +397,7 @@ class TTOTP(App[None]):
parent = name_widget.parent
assert parent is not None
parent.remove_class("otp-hidden")
name_widget.update(
rich.text.Text(otp.name, overflow="ellipsis", no_wrap=True)
)
name_widget.update(rich.text.Text(otp.name))
return
matcher = Matcher(needle)
@ -409,8 +408,6 @@ class TTOTP(App[None]):
score = matcher.match(otp.name)
if score > 0:
highlighted = matcher.highlight(otp.name)
highlighted.overflow = "ellipsis"
highlighted.no_wrap = True
name_widget.update(highlighted)
parent.remove_class("otp-hidden")
else: