Skip to content

Commit

Permalink
style: clean remaining pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
simbuerg committed Nov 3, 2022
1 parent 7a5f85a commit 6702cc1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion benchbuild/cli/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from benchbuild.environments.domain.declarative import ContainerImage
from benchbuild.project import ProjectIndex, Project
from benchbuild.settings import CFG
from benchbuild.source import enumerate_revisions


class BBProject(cli.Application):
Expand Down
8 changes: 4 additions & 4 deletions benchbuild/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,14 @@ def __default_revision(self) -> source.Revision: # pylint: disable=unused-priva
run_uuid: uuid.UUID = attr.ib()

@run_uuid.default
def __default_run_uuid(self): # pylint: disable=no-self-use,unused-private-member
def __default_run_uuid(self): # pylint: disable=unused-private-member
run_group = getenv("BB_DB_RUN_GROUP", None)
if run_group:
return uuid.UUID(run_group)
return uuid.uuid4()

@run_uuid.validator
def __check_if_uuid(self, _: tp.Any, value: uuid.UUID) -> None: # pylint: disable=no-self-use,unused-private-member
def __check_if_uuid(self, _: tp.Any, value: uuid.UUID) -> None: # pylint: disable=unused-private-member
if not isinstance(value, uuid.UUID):
raise TypeError("{attribute} must be a valid UUID object")

Expand Down Expand Up @@ -405,7 +405,7 @@ def source_of(self, name: str) -> tp.Optional[str]:
src = revision.source_by_name(name)
return str(self.builddir / src.local)
except KeyError:
LOG.debug(f"{name} not found in revision. Skipping.")
LOG.debug("%s not found in revision. Skipping.", name)

all_sources = source.sources_as_dict(*self.source)
if name in all_sources:
Expand All @@ -429,7 +429,7 @@ def version_of(self, name: str) -> tp.Optional[str]:
return str(revision.variant_by_name(name))

except KeyError:
LOG.debug(f"{name} not found in revision. Skipping.")
LOG.debug("%s not found in revision. Skipping.", name)

return None

Expand Down
2 changes: 1 addition & 1 deletion benchbuild/projects/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class TestProject(project.Project):
CONTAINER = ContainerImage().from_('benchbuild:alpine')

def compile(self):
with open('test.cpp', 'w') as test_source:
with open('test.cpp', 'w', encoding="utf-8") as test_source:
lines = """
#include <iostream>
int main(int argc, char **argv) {
Expand Down

0 comments on commit 6702cc1

Please sign in to comment.