1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-22 15:57:15 +00:00

black integration

This commit is contained in:
Andrey Bienkowski 2022-03-02 06:19:33 +03:00 committed by Thomas Waldmann
parent 7973fc5ec2
commit adb1c36215
4 changed files with 23 additions and 2 deletions

12
.github/workflows/black.yaml vendored Normal file
View 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

View file

@ -4,3 +4,7 @@ build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "src/borg/_version.py"
[tool.black]
line-length = 120
skip-magic-trailing-comma = true

View file

@ -106,7 +106,8 @@ markers =
# W504 line break after binary operator
# 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:
# please note that the values are adjusted so that they do not cause failures

View file

@ -1,18 +1,22 @@
# 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',
'mode', 'user', 'group', 'uid', 'gid', 'mtime', 'atime', 'ctime', 'birthtime', 'size',
'xattrs', 'bsdflags', 'acl_nfs4', 'acl_access', 'acl_default', 'acl_extended',
'part'])
# fmt: on
# this is the set of keys that are always present in items:
REQUIRED_ITEM_KEYS = frozenset(['path', 'mtime', ])
# 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',
'comment', 'chunker_params',
'recreate_cmdline',
'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:
REQUIRED_ARCHIVE_KEYS = frozenset(['version', 'name', 'items', 'cmdline', 'time', ])