Skip to content

Commit 6c2c086

Browse files
committed
chore: add flake8-bugbear ruff checker
1 parent 2b2958c commit 6c2c086

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ exclude_lines = [
7070

7171
[tool.ruff.lint]
7272
select = [
73+
"B", # flake8-bugbear
7374
"D", # pydocstyle
7475
"E", # pycodestyle
7576
"F", # pyflakes

scim2_models/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ def mark_with_schema(self):
608608
"""Navigate through attributes and sub-attributes of type ComplexAttribute, and mark them with a '_schema' attribute. '_schema' will later be used by 'get_attribute_urn'."""
609609
from scim2_models.rfc7643.resource import Resource
610610

611-
for field_name, field in self.model_fields.items():
611+
for field_name in self.model_fields:
612612
attr_type = self.get_field_root_type(field_name)
613613
if not is_complex_attribute(attr_type):
614614
continue

scim2_models/rfc7644/list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_schema_from_payload(payload: Any) -> Optional[str]:
4040
payload_schemas = (
4141
payload.get("schemas", [])
4242
if isinstance(payload, dict)
43-
else getattr(payload, "schemas")
43+
else payload.schemas
4444
)
4545

4646
resource_types_schemas = [

0 commit comments

Comments
 (0)