mirror of
https://github.com/rjNemo/pass-gen
synced 2026-06-06 02:26:42 +00:00
chore: linter
This commit is contained in:
parent
6332b9e233
commit
a4e3b02673
3 changed files with 9 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ def save(
|
|||
random: bool = True,
|
||||
) -> None:
|
||||
sqlite_repo = sqlite.get_instance()
|
||||
seed = r.randint(0, 100) if random else 0
|
||||
seed = r.randint(0, 100) if random else 0 # nosec
|
||||
options = pass_gen.PassGenOptions(
|
||||
service=service,
|
||||
seed=seed,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pydantic import SecretStr
|
||||
|
||||
from app.models.password import Password
|
||||
|
||||
|
||||
class FakeRepository:
|
||||
_values = {}
|
||||
_values: dict[str, SecretStr] = {}
|
||||
|
||||
def save(self, service: str, password: str) -> None:
|
||||
self._values[service] = password
|
||||
self._values[service] = SecretStr(password)
|
||||
|
||||
def list_all(self) -> list[Password]:
|
||||
return [
|
||||
|
|
@ -17,6 +19,6 @@ class FakeRepository:
|
|||
def exists(self, service: str) -> bool:
|
||||
return service in self._values.keys()
|
||||
|
||||
@classmethod
|
||||
def get_instance(cls) -> FakeRepository:
|
||||
@staticmethod
|
||||
def get_instance() -> FakeRepository:
|
||||
return FakeRepository()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import subprocess
|
||||
import subprocess # nosec
|
||||
|
||||
|
||||
def copy_to_clipboard(password: str) -> None:
|
||||
subprocess.run("pbcopy", universal_newlines=True, input=password)
|
||||
subprocess.run("pbcopy", universal_newlines=True, input=password) # nosec
|
||||
|
||||
|
||||
def save_to_file(file: str, password: str) -> None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue