Skip to content

Commit bec3ba3

Browse files
committed
update ruff
1 parent 6e3939c commit bec3ba3

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ repos:
44
hooks:
55
- id: actionlint-docker
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: v0.9.4
7+
rev: v0.14.0
88
hooks:
9-
- id: ruff
9+
- id: ruff-check
1010
files: ^(cloudsplaining/|setup.py)
1111
- id: ruff-format

cloudsplaining/scan/role_details.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ def get_all_iam_statements_for_role(self, name: str) -> list[StatementDetail] |
106106
@property
107107
def role_names(self) -> list[str]:
108108
"""Get a list of all role names in the account"""
109-
results = [role_detail.role_name for role_detail in self.roles]
110-
results.sort()
111-
return results
109+
return sorted(role_detail.role_name for role_detail in self.roles)
112110

113111
@property
114112
def all_infrastructure_modification_actions_by_inline_policies(self) -> list[str]:

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[tool.mypy]
22
files = "cloudsplaining"
33
local_partial_types = true # will become the new default from version 2
4+
allow_redefinition_new = true # will become the new default from version 2
5+
fixed_format_cache = true # new caching mechanism
46
strict = true
57
pretty = true
68
disallow_untyped_decorators = false
@@ -34,6 +36,7 @@ select = [
3436
"PIE",
3537
"PLE",
3638
"PLW",
39+
"PYI",
3740
"RUF",
3841
"S",
3942
"SIM",

requirements-dev.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
-r requirements.txt
12
# CI
23
pre-commit==4.3.0
34
# Unit testing
45
pytest==8.4.2
56
coverage==7.10.7
67
# type check
7-
mypy[faster-cache]==1.18.2
8-
boto3-stubs-lite[iam,s3,sts]==1.40.49
8+
mypy==1.18.2
9+
boto3-stubs-lite[iam,s3,sts]==1.40.50
910
types-PyYAML==6.0.12.20250915

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# AWS
2-
boto3==1.40.49
3-
botocore==1.40.49
2+
boto3==1.40.50
3+
botocore==1.40.50
44
# Speeds up IAM logic
55
cached-property==2.0.1
66
# Command line
7-
click==8.1.8
7+
click==8.1.8 # 8.2+ needs Python 3.10+
88
click_option_group==0.5.9
99
# Templating - required for exclusions YAML files and inserting content to HTML report
1010
jinja2==3.1.6
1111
pyyaml==6.0.3
1212
# We render Markdown glossary files as HTML in the Cloudsplaining report
1313
markdown==3.9
1414
# AWS IAM Logic
15-
policy-sentry==0.14.0
15+
policy-sentry==0.14.1
1616
# Schema validation
1717
schema==0.7.7

0 commit comments

Comments
 (0)