Skip to content

Commit ed64c01

Browse files
pre-commit-ci[bot]web-flowTakishima
authored
[pre-commit.ci] pre-commit autoupdate (#55)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.272 → v0.0.275](astral-sh/ruff-pre-commit@v0.0.272...v0.0.275) * Update CHANGELOG * Fix ruff warnings --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <noreply@github.com> Co-authored-by: Damien Nguyen <ngn.damien@gmail.com>
1 parent 5981333 commit ed64c01

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ repos:
6262
additional_dependencies: [black==23.3.0]
6363

6464
- repo: https://github.com/charliermarsh/ruff-pre-commit
65-
rev: v0.0.272
65+
rev: v0.0.275
6666
hooks:
6767
- id: ruff
6868
args: [--fix, --exit-non-zero-on-fix, --show-source, --show-fixes]

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- blacken-docs
2424
- Update `thomaseizinger/create-pull-request` GitHub Action to v1.3.0
2525
- Update `asottile/blacken-docs` hook to v1.14.0
26-
- Update `charliermarsh/ruff-pre-commit` hook to v0.0.272
26+
- Update `charliermarsh/ruff-pre-commit` hook to v0.0.275
2727
- Update `codespell-project/codespell` hook to v2.2.5
2828
- Update `Lucas-C/pre-commit-hooks` hook to v1.5.1
2929
- Update `pre-commit/pre-commit-hooks` hook to v4.3.0

pylint_secure_coding_standard.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414

1515
"""Main file for the pylint_secure_coding_standard plugin."""
1616

17+
from __future__ import annotations
18+
1719
import operator
1820
import platform
1921
import stat
22+
from typing import ClassVar
2023

2124
import astroid
2225
from pylint.checkers import BaseChecker
@@ -425,7 +428,7 @@ class SecureCodingStandardChecker(BaseChecker): # pylint: disable=too-many-inst
425428
)
426429
priority = -1
427430

428-
msgs = {
431+
msgs: ClassVar[dict[str, tuple[str, str, str]]] = {
429432
'R8000': (
430433
'Use `os.path.realpath()` instead of `os.path.abspath()` and `os.path.relpath()`',
431434
'replace-os-relpath-abspath',

tests/shelve_open_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from __future__ import annotations
16+
17+
from typing import ClassVar
18+
1519
import astroid
1620
import pylint.testutils
1721
import pytest
@@ -39,7 +43,7 @@ def test_shelve_open_ok(self):
3943
for node in nodes:
4044
self.checker.visit_call(node)
4145

42-
_not_ok = [
46+
_not_ok: ClassVar[list[str]] = [
4347
'shelve.open("file.txt")',
4448
'shelve.open(filename)',
4549
]

0 commit comments

Comments
 (0)