Skip to content

Commit

Permalink
Split off more deps into extras
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablyFaiz committed Nov 9, 2024
1 parent 97de631 commit 6132c7c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ dependencies = [
"tqdm",
"ipdb",
"requests",
"regex",
"python-dotenv",
"unidecode",
"StrEnum",
# TODO: Maybe move into an extra?
"watchdog",
"pydantic>=2",
"typing-extensions",
"legal-segmenter @ git+https://github.com/lexeme-dev/legal-segmenter@main",
]

[project.optional-dependencies]
segmenter = [
"unidecode",
"legal-segmenter @ git+https://github.com/lexeme-dev/legal-segmenter@main",
]
devsync = [
"watchdog",
]
sherlock = [
"pexpect",
"pyotp",
Expand Down
6 changes: 3 additions & 3 deletions rl/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import os
import random
import re
import subprocess
import threading
import time
Expand All @@ -13,7 +14,6 @@
import paramiko
import pexpect # type: ignore
import questionary
import regex
import rich
import rich.progress
import rich.table
Expand Down Expand Up @@ -75,8 +75,8 @@
_DEFAULT_SSH_TUNNEL_PORT = 5549


_MFA_LINE_REGEX = regex.compile(
r"\s*(?P<number>\d+)\. Duo Push to XXX-XXX-0199\s*", regex.IGNORECASE
_MFA_LINE_REGEX = re.compile(
r"\s*(?P<number>\d+)\. Duo Push to XXX-XXX-0199\s*", re.IGNORECASE
)

# endregion
Expand Down
5 changes: 2 additions & 3 deletions rl/utils/core.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import collections
import re
from collections.abc import Callable, Iterable
from typing import Any, TypeVar

import regex

import rl.utils.io

K = TypeVar("K")
Expand Down Expand Up @@ -31,7 +30,7 @@ def dig(d: dict, *keys: str) -> Any:
return d


def safe_extract(pattern: regex.Pattern, text: str, key: str) -> str | None:
def safe_extract(pattern: re.Pattern, text: str, key: str) -> str | None:
match = pattern.search(text)
if match:
return match.group(key)
Expand Down
22 changes: 10 additions & 12 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6132c7c

Please sign in to comment.