Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruff: Fix PTH100, merge PTH10 #11502

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions dojo/management/commands/import_surveys.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from pathlib import Path

from django.core.management.base import BaseCommand
Expand Down Expand Up @@ -28,7 +27,7 @@ def handle(self, *args, **options):
row = cursor.fetchone()
ctype_id = row[0]
# Find the current id in the surveys file
path = Path(os.path.abspath(__file__)).parent
path = Path(__file__).parent.absolute()
path = path[:-19] + "fixtures/initial_surveys.json"
contents = open(path, encoding="utf-8").readlines()
for line in contents:
Expand Down
2 changes: 1 addition & 1 deletion dojo/settings/settings.dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def saml2_attrib_map_format(dict):
SAML_ATTRIBUTE_MAPPING = saml2_attrib_map_format(env("DD_SAML2_ATTRIBUTES_MAP"))
SAML_FORCE_AUTH = env("DD_SAML2_FORCE_AUTH")
SAML_ALLOW_UNKNOWN_ATTRIBUTES = env("DD_SAML2_ALLOW_UNKNOWN_ATTRIBUTE")
BASEDIR = Path(path.abspath(__file__)).parent
BASEDIR = Path(__file__).parent.absolute()
if len(env("DD_SAML2_ENTITY_ID")) == 0:
SAML2_ENTITY_ID = f"{SITE_URL}/saml2/metadata/"
else:
Expand Down
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ select = [
"TCH",
"INT",
"ARG003", "ARG004", "ARG005",
"PTH2", "PTH101", "PTH102", "PTH103", "PTH104", "PTH105", "PTH106", "PTH107", "PTH108", "PTH109", "PTH110", "PTH111", "PTH112", "PTH113", "PTH114", "PTH115", "PTH116", "PTH117", "PTH119", "PTH120", "PTH121", "PTH122", "PTH124",
"PTH2", "PTH10", "PTH110", "PTH111", "PTH112", "PTH113", "PTH114", "PTH115", "PTH116", "PTH117", "PTH119", "PTH120", "PTH121", "PTH122", "PTH124",
"TD001", "TD004", "TD005",
"PD",
"PGH",
Expand Down
Loading