mirror of https://github.com/borgbase/vorta
Merge ad93bb77b3
into 9cabbbd193
This commit is contained in:
commit
c5d4c6b366
|
@ -22,7 +22,7 @@ jobs:
|
|||
python-version: 3.11
|
||||
pre-commit: true
|
||||
|
||||
- name: Test formatting with Flake8, ruff and Black
|
||||
- name: Test formatting with ruff and Black
|
||||
shell: bash
|
||||
run: make lint
|
||||
|
||||
|
|
|
@ -56,12 +56,6 @@ repos:
|
|||
# py39,
|
||||
# ]
|
||||
|
||||
# check pep8 conformity using flake8
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 6.0.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
|
||||
# configuration for the pre-commit.ci bot
|
||||
# only relevant when actually using the bot
|
||||
ci:
|
||||
|
|
|
@ -10,5 +10,6 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[tool.ruff]
|
||||
select = ["T", "I"]
|
||||
exclude = ["package"]
|
||||
fixable = ["I"]
|
||||
line-length = 120
|
||||
exclude = ["package", "build", "dist", ".git", ".idea", ".cache", ".tox", ".eggs", "./src/vorta/__init__.py", ".direnv", "env"]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
black==22.*
|
||||
coverage
|
||||
flake8
|
||||
macholib
|
||||
nox
|
||||
pkgconfig
|
||||
|
|
16
setup.cfg
16
setup.cfg
|
@ -72,16 +72,8 @@ source = vorta
|
|||
omit = tests/*
|
||||
relative_files = true
|
||||
|
||||
[flake8]
|
||||
ignore =
|
||||
max-line-length = 120
|
||||
extend-ignore = E203,E121,E123,E126,E226,E24,E704,W503,W504
|
||||
exclude =
|
||||
build,dist,.git,.idea,.cache,.tox,.eggs,
|
||||
./src/vorta/__init__.py,.direnv,env
|
||||
|
||||
[tox:tox]
|
||||
envlist = py36,py37,py38,flake8
|
||||
envlist = py36,py37,py38
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
|
@ -92,10 +84,10 @@ deps =
|
|||
commands=pytest
|
||||
passenv = DISPLAY
|
||||
|
||||
[testenv:flake8]
|
||||
[testenv:ruff]
|
||||
deps =
|
||||
flake8
|
||||
commands=flake8 src tests
|
||||
ruff
|
||||
commands=ruff check src tests
|
||||
|
||||
[pycodestyle]
|
||||
max_line_length = 120
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# flake8: noqa
|
||||
# ruff: noqa
|
||||
|
||||
"""
|
||||
A dirty objc implementation to access the macOS Keychain. Because the
|
||||
|
@ -10,8 +10,10 @@ Adapted from https://gist.github.com/apettinen/5dc7bf1f6a07d148b2075725db6b1950
|
|||
import logging
|
||||
import sys
|
||||
from ctypes import c_char
|
||||
|
||||
import objc
|
||||
from Foundation import NSBundle
|
||||
|
||||
from .abc import VortaKeyring
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -47,14 +49,14 @@ class VortaDarwinKeyring(VortaKeyring):
|
|||
|
||||
objc.loadBundleFunctions(Security, globals(), S_functions)
|
||||
|
||||
SecKeychainRef = objc.registerCFSignature('SecKeychainRef', b'^{OpaqueSecKeychainRef=}', SecKeychainGetTypeID())
|
||||
SecKeychainItemRef = objc.registerCFSignature(
|
||||
objc.registerCFSignature('SecKeychainRef', b'^{OpaqueSecKeychainRef=}', SecKeychainGetTypeID())
|
||||
objc.registerCFSignature(
|
||||
'SecKeychainItemRef',
|
||||
b'^{OpaqueSecKeychainItemRef=}',
|
||||
SecKeychainItemGetTypeID(),
|
||||
)
|
||||
|
||||
PassBuffRef = objc.createOpaquePointerType('PassBuffRef', b'^{OpaquePassBuff=}', None)
|
||||
objc.createOpaquePointerType('PassBuffRef', b'^{OpaquePassBuff=}', None)
|
||||
|
||||
# Get the login keychain
|
||||
result, login_keychain = SecKeychainOpen(b'login.keychain', None)
|
||||
|
|
Loading…
Reference in New Issue