From 0edf0724228651452ce3be2ac3292c795d3665e9 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 6 Dec 2023 10:31:15 -0500 Subject: [PATCH 1/3] Update CI Python versions. 3.6-3.8 no longer supported. Signed-off-by: Chris PeBenito --- .github/workflows/tests.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 01f8c5e8..883edaa5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,17 +27,14 @@ jobs: matrix: build-opts: - - {python: '3.6', tox: python3.6} - - {python: '3.7', tox: python3.7} - - {python: '3.8', tox: python3.8} - {python: '3.9', tox: python3.9} - {python: '3.10', tox: python3.10} - {python: '3.11', tox: python3.11} - - {python: '3.6', tox: pep8} - - {python: '3.6', tox: lint} - - {python: '3.6', tox: mypy} - - {python: '3.6', tox: coverage} - - {python: '3.6', tox: install} + - {python: '3.11', tox: pep8} + - {python: '3.11', tox: lint} + - {python: '3.11', tox: mypy} + - {python: '3.11', tox: coverage} + - {python: '3.11', tox: install} steps: - uses: actions/checkout@v3 From 4bde9ecf08503dd6ef0388adc0c148b510d338a8 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 6 Dec 2023 11:08:49 -0500 Subject: [PATCH 2/3] Wrapper: Correct lint errors. Signed-off-by: Chris PeBenito --- setools/diff/difference.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setools/diff/difference.py b/setools/diff/difference.py index 692b4528..fabec63c 100644 --- a/setools/diff/difference.py +++ b/setools/diff/difference.py @@ -137,8 +137,9 @@ class Wrapper(ABC, Generic[T]): __slots__ = ("origin", "key") - def __init__(self, symbol: T) -> None: - pass + def __init__(self, origin: T, key: int) -> None: + self.origin = origin + self.key = key def __repr__(self): # pylint: disable=no-member @@ -176,9 +177,8 @@ class SymbolWrapper(Wrapper[S]): __slots__ = ("name",) def __init__(self, symbol: S) -> None: - self.origin = symbol - self.name = str(symbol) - self.key = hash(self.name) + super().__init__(symbol, hash(symbol.name)) + self.name = symbol.name def __hash__(self): return self.key From 0e379f9b77c9c8a505dcf0122c637a722b0c8858 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 6 Dec 2023 11:09:39 -0500 Subject: [PATCH 3/3] DefaultQueryTab/SEToolsTableView: Correct PEP8 issues. Signed-off-by: Chris PeBenito --- setoolsgui/apol/defaultquery.py | 3 ++- setoolsgui/tableview.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setoolsgui/apol/defaultquery.py b/setoolsgui/apol/defaultquery.py index e09692ee..75760f7d 100644 --- a/setoolsgui/apol/defaultquery.py +++ b/setoolsgui/apol/defaultquery.py @@ -166,7 +166,8 @@ def run(self, button): self.query.default = self.default_value.currentData(Qt.ItemDataRole.UserRole) if self.default_range_value.isEnabled(): - self.query.default_range = self.default_range_value.currentData(Qt.ItemDataRole.UserRole) + self.query.default_range = self.default_range_value.currentData( + Qt.ItemDataRole.UserRole) else: self.query.default_range = None diff --git a/setoolsgui/tableview.py b/setoolsgui/tableview.py index 9ba49aa5..af764256 100644 --- a/setoolsgui/tableview.py +++ b/setoolsgui/tableview.py @@ -76,7 +76,9 @@ def save_csv(self, filename): # write headers csv_row = [] for col in range(col_count): - csv_row.append(datamodel.headerData(col, Qt.Orientation.Horizontal, Qt.ItemDataRole.DisplayRole)) + csv_row.append(datamodel.headerData(col, + Qt.Orientation.Horizontal, + Qt.ItemDataRole.DisplayRole)) writer.writerow(csv_row)