Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
__pycache__/
*.egg-info/
.nox/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix buildbot version in upgraded platforms ([#32](../../pull/32))
- Fix missing m4 dependencies in Python CLI output ([#33](../../pull/33))

### Added
- Configure flake8 and nox ([#34](../../pull/34))

## [2.4.1-1] - 2019-09-20
### Added
- Upgrade to buildbot 2.4.1 ([#29](../../pull/29))
Expand Down
3 changes: 2 additions & 1 deletion scripts/docker-buildbot-worker/.flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
max-complexity = 10
select = C,E,F,W,B,B9
ignore = E203, E501, W503
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Image:

def release_key(platform):
"""Return a key function to sort releases."""

def key(release):
if (platform, release) == ("opensuse", "42"):
return (14,)
Expand Down
21 changes: 21 additions & 0 deletions scripts/docker-buildbot-worker/noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import nox


nox.options.sessions = ("lint",)

locations = "noxfile.py", "docker_buildbot_worker"


@nox.session(python="3.7")
def black(session):
"""Run black code formatter."""
session.install("black")
session.run("black", *locations)


@nox.session(python="3.7")
def lint(session):
"""Lint using flake8."""
session.install("flake8", "flake8-bugbear", "flake8-import-order", "black")
session.run("black", "--check", *locations)
session.run("flake8", *locations)