mirror of https://github.com/borgbase/vorta
Compare commits
20 Commits
e7e19e04f2
...
c5d4c6b366
Author | SHA1 | Date |
---|---|---|
Sam | c5d4c6b366 | |
Manu | 9cabbbd193 | |
Sam | ad93bb77b3 | |
Sam | 49a3437de7 | |
Sam | b375d51024 | |
Sam | 62e1381ae0 | |
Sam | e21c9b5806 | |
Sam | 0c332780f8 | |
Sam | e6faa54dee | |
Sam | 2f40b7c405 | |
Sam | a5c6729064 | |
Sam | 1d76358404 | |
Sam | 767dcc126a | |
Sam | 4f03af6675 | |
Sam | d21316b920 | |
Sam | 4b299f9a4c | |
Sam | b4f2e64662 | |
Sam | 5f07abd8d0 | |
Sam | 7b800661c2 | |
Sam | 6abd0f5862 |
|
@ -3,17 +3,21 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to use for building macOS release'
|
||||
description: 'Branch to use for building release'
|
||||
required: true
|
||||
default: 'master'
|
||||
borg_version:
|
||||
description: 'Borg version to package'
|
||||
required: true
|
||||
default: '1.2.1'
|
||||
default: '1.2.8'
|
||||
macos_version:
|
||||
description: 'macOS version for building'
|
||||
required: true
|
||||
default: 'macos-11'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-11
|
||||
runs-on: ${{ github.event.inputs.macos_version }}
|
||||
|
||||
steps:
|
||||
- name: Check out selected branch
|
||||
|
|
|
@ -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