Skip to content

Commit

Permalink
Black linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fauust committed Jun 21, 2024
1 parent 57cbc62 commit c6ec932
Show file tree
Hide file tree
Showing 22 changed files with 474 additions and 379 deletions.
19 changes: 12 additions & 7 deletions buildbot.tac
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,33 @@ import os
from twisted.application import service
from buildbot.master import BuildMaster

basedir = '.'
log_basedir = '/var/log/buildbot/'
basedir = "."
log_basedir = "/var/log/buildbot/"

rotateLength = 20000000
maxRotatedFiles = 30
configfile = 'master.cfg'
configfile = "master.cfg"

# Default umask for server
umask = None

# if this is a relocatable tac file, get the directory containing the TAC
if basedir == '.':
if basedir == ".":
import os

basedir = os.path.abspath(os.path.dirname(__file__))

# note: this line is matched against to check that this is a buildmaster
# directory; do not edit it.
application = service.Application('buildmaster')
application = service.Application('buildmaster') # fmt: skip
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath(os.path.join(log_basedir, "%s"), rotateLength=rotateLength,
maxRotatedFiles=maxRotatedFiles)

logfile = LogFile.fromFullPath(
os.path.join(log_basedir, "%s"),
rotateLength=rotateLength,
maxRotatedFiles=maxRotatedFiles,
)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)

m = BuildMaster(basedir, configfile, umask)
Expand Down
22 changes: 16 additions & 6 deletions ci_build_images/buildbot.tac
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ from buildbot_worker.bot import Worker

# setup worker
basedir = os.path.abspath(os.path.dirname(__file__))
application = service.Application('buildbot-worker')
application = service.Application('buildbot-worker') # fmt: skip


application.setComponent(ILogObserver, FileLogObserver(sys.stdout).emit)
# and worker on the same process!
buildmaster_host = os.environ.get("BUILDMASTER", 'localhost')
buildmaster_host = os.environ.get("BUILDMASTER", "localhost")
port = int(os.environ.get("BUILDMASTER_PORT", 9989))
workername = os.environ.get("WORKERNAME", 'docker')
workername = os.environ.get("WORKERNAME", "docker")
passwd = os.environ.get("WORKERPASS")

# delete the password from the environ so that it is not leaked in the log
Expand All @@ -33,7 +33,17 @@ maxdelay = 300
allow_shutdown = None
maxretries = 10

s = Worker(buildmaster_host, port, workername, passwd, basedir,
keepalive, umask=umask, maxdelay=maxdelay,
allow_shutdown=allow_shutdown, maxRetries=maxretries, unicode_encoding='utf-8')
s = Worker(
buildmaster_host,
port,
workername,
passwd,
basedir,
keepalive,
umask=umask,
maxdelay=maxdelay,
allow_shutdown=allow_shutdown,
maxRetries=maxretries,
unicode_encoding="utf-8",
)
s.setServiceParent(application)
4 changes: 2 additions & 2 deletions cross-reference/crossreference/cr/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class CrConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'cr'
default_auto_field = "django.db.models.BigAutoField"
name = "cr"
Loading

0 comments on commit c6ec932

Please sign in to comment.