mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-23 00:07:38 +00:00
black integration
This commit is contained in:
parent
7973fc5ec2
commit
adb1c36215
4 changed files with 23 additions and 2 deletions
12
.github/workflows/black.yaml
vendored
Normal file
12
.github/workflows/black.yaml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# https://black.readthedocs.io/en/stable/integrations/github_actions.html#usage
|
||||||
|
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: psf/black@stable
|
|
@ -4,3 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
write_to = "src/borg/_version.py"
|
write_to = "src/borg/_version.py"
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 120
|
||||||
|
skip-magic-trailing-comma = true
|
||||||
|
|
|
@ -106,7 +106,8 @@ markers =
|
||||||
# W504 line break after binary operator
|
# W504 line break after binary operator
|
||||||
|
|
||||||
# borg code style guidelines:
|
# borg code style guidelines:
|
||||||
ignore = E226, W503
|
# Ignoring E203 due to https://github.com/PyCQA/pycodestyle/issues/373
|
||||||
|
ignore = E226, W503, E203
|
||||||
|
|
||||||
# Code style violation exceptions:
|
# Code style violation exceptions:
|
||||||
# please note that the values are adjusted so that they do not cause failures
|
# please note that the values are adjusted so that they do not cause failures
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
# this set must be kept complete, otherwise the RobustUnpacker might malfunction:
|
# this set must be kept complete, otherwise the RobustUnpacker might malfunction:
|
||||||
|
# fmt: off
|
||||||
ITEM_KEYS = frozenset(['path', 'source', 'rdev', 'chunks', 'chunks_healthy', 'hardlink_master', 'hlid',
|
ITEM_KEYS = frozenset(['path', 'source', 'rdev', 'chunks', 'chunks_healthy', 'hardlink_master', 'hlid',
|
||||||
'mode', 'user', 'group', 'uid', 'gid', 'mtime', 'atime', 'ctime', 'birthtime', 'size',
|
'mode', 'user', 'group', 'uid', 'gid', 'mtime', 'atime', 'ctime', 'birthtime', 'size',
|
||||||
'xattrs', 'bsdflags', 'acl_nfs4', 'acl_access', 'acl_default', 'acl_extended',
|
'xattrs', 'bsdflags', 'acl_nfs4', 'acl_access', 'acl_default', 'acl_extended',
|
||||||
'part'])
|
'part'])
|
||||||
|
# fmt: on
|
||||||
|
|
||||||
# this is the set of keys that are always present in items:
|
# this is the set of keys that are always present in items:
|
||||||
REQUIRED_ITEM_KEYS = frozenset(['path', 'mtime', ])
|
REQUIRED_ITEM_KEYS = frozenset(['path', 'mtime', ])
|
||||||
|
|
||||||
# this set must be kept complete, otherwise rebuild_manifest might malfunction:
|
# this set must be kept complete, otherwise rebuild_manifest might malfunction:
|
||||||
|
# fmt: off
|
||||||
ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'hostname', 'username', 'time', 'time_end',
|
ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'hostname', 'username', 'time', 'time_end',
|
||||||
'comment', 'chunker_params',
|
'comment', 'chunker_params',
|
||||||
'recreate_cmdline',
|
'recreate_cmdline',
|
||||||
'recreate_source_id', 'recreate_args', 'recreate_partial_chunks', # used in 1.1.0b1 .. b2
|
'recreate_source_id', 'recreate_args', 'recreate_partial_chunks', # used in 1.1.0b1 .. b2
|
||||||
'size', 'nfiles', 'size_parts', 'nfiles_parts', ])
|
'size', 'nfiles', 'size_parts', 'nfiles_parts'])
|
||||||
|
# fmt: on
|
||||||
|
|
||||||
# this is the set of keys that are always present in archives:
|
# this is the set of keys that are always present in archives:
|
||||||
REQUIRED_ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'time', ])
|
REQUIRED_ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'time', ])
|
||||||
|
|
Loading…
Reference in a new issue