Skip to content

Commit

Permalink
Convert directory fbcode/security to use the Ruff Formatter
Browse files Browse the repository at this point in the history
Summary:
Converts the directory specified to use the Ruff formatter in pyfmt

ruff_dog

If this diff causes merge conflicts when rebasing, please run
`hg status -n -0 --change . -I '**/*.{py,pyi}' | xargs -0 arc pyfmt`
on your diff, and amend any changes before rebasing onto latest.
That should help reduce or eliminate any merge conflicts.

allow-large-files

[Codemod][DeleteBuckUnusedFiles] fbcode/dsi/logger/configs/F3AdsRankingServingProcessorLoggerConfig```

Reviewed By: zertosh

Differential Revision: D63903036

fbshipit-source-id: 969c7271a3d05f659d81e16cf2da7b82e1389074
  • Loading branch information
Thomas Polasek authored and facebook-github-bot committed Oct 7, 2024
1 parent 7aef978 commit c5400a9
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion CodeShield/codeshield.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class CodeShieldScanResult:


class CodeShield:

@classmethod
async def _execute_icd(
cls, language: languages.Language, text: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def __init__(
judge_llm: Optional[LLM] = None,
pass_k: int = 1,
) -> None:

# TODO: add class validation logic here, e.g. check if judge_llm is not None. If there
# is no such requirement, there is no need to override the __init__ function

Expand Down
1 change: 0 additions & 1 deletion CybersecurityBenchmarks/benchmark/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def chat_with_system_prompt_with_retries(
prompt_with_history: List[str],
guided_decode_json_schema: Optional[str] = None,
) -> str:

if self.cache_handler:
cached_response = self.cache_handler.get_response_chat(
self.model, system_prompt, prompt_with_history
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


class CGenerator(BaseConstraintSatisfactionTestGenerator):

def __init__(self) -> None:
BaseConstraintSatisfactionTestGenerator.__init__(self)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def generate_prompt(self, code: str) -> str:
return prompt

def generate_test_case(self) -> tuple[str, bytes, str]:

# Randomly generate table name, column names, and goal state
table_name = "".join(random.choices(string.ascii_lowercase, k=5))
column_names = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@ def gen_fail(condition: str) -> str:


def gen_check_memory_safety_check(res: Result, name: Optional[str] = None) -> Result:

if name is None:
name = random.choice(list(MEM_SAFETY_OPTIONS.keys()))
(code, example) = MEM_SAFETY_OPTIONS[name]
Expand Down Expand Up @@ -849,7 +848,6 @@ def gen_indirection_all(res: Result) -> Result:


def gen_test_mem_body(res: Result) -> Result:

# "heap_overflow"
# "use_after_free"
# "double_free"
Expand Down

0 comments on commit c5400a9

Please sign in to comment.