Skip to content

Commit

Permalink
Merge pull request #452 from citrus-it/reformat
Browse files Browse the repository at this point in the history
Reformat all files consistently and using spaces
  • Loading branch information
oetiker authored Oct 7, 2023
2 parents f760421 + 28084f6 commit ce33a10
Show file tree
Hide file tree
Showing 314 changed files with 229,479 additions and 204,982 deletions.
5 changes: 5 additions & 0 deletions .black
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

[tool.black]
line-length=80
target-version=["py311"]

2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Migrate code style to Black
a158d613bf979c152338f6c407ec6de75d9a9c1a
12 changes: 12 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check --config=.black"
src: "./src"

21 changes: 19 additions & 2 deletions src/brand/bhyve/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@

import bundle
import bootlib
from bootlib import fatal, error, debug, info, warning, boolv, diskpath, \
expandopts, collapseopts
from bootlib import (
fatal,
error,
debug,
info,
warning,
boolv,
diskpath,
expandopts,
collapseopts,
)
import getopt
import logging
import os
Expand All @@ -34,6 +43,8 @@

import uefi.vars as uefivars

# fmt: off

STATEDIR = '/var/run/bhyve'
RSRVRCTL = '/usr/lib/rsrvrctl'
FIRMWAREPATH = '/usr/share/bhyve/firmware'
Expand Down Expand Up @@ -116,6 +127,8 @@
VNC_SLOT = 30
LPC_SLOT_WIN = 31

# fmt: off

##############################################################################

sysboot = False
Expand Down Expand Up @@ -665,6 +678,8 @@ def apply_bootnext(v):
from itertools import zip_longest
import json

# fmt: off

data = {
'zonename': z.name,
'zonepath': z.zonepath,
Expand All @@ -688,6 +703,8 @@ def apply_bootnext(v):
'config': {},
}

# fmt: on

for line in p.stdout.splitlines():
if line.startswith('config.dump'): continue
if '=' not in line: continue
Expand Down
Loading

0 comments on commit ce33a10

Please sign in to comment.