Skip to content

Commit

Permalink
Fix new flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Aug 29, 2024
1 parent 959ab23 commit da33488
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.py[co]
.DS_Store

# Packages
*.egg
Expand Down
1 change: 1 addition & 0 deletions picas/batchid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from os import environ


def add_batch_management_id(doc):
"""
Add job number id of the batch system to a token/document
Expand Down
6 changes: 4 additions & 2 deletions picas/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from .documents import Document
from .picaslogger import picaslogger


class CouchDB:

"""Client class to handle communication with the CouchDB back-end."""
Expand Down Expand Up @@ -186,8 +187,9 @@ def delete_documents(self, docs):
try:
self.delete(doc)
except ResourceConflict as ex:
picaslogger.info(f"Could not delete document {doc.id} (rev {doc.rev}) "
"due to resource conflict: {str(ex)}", file=sys.stderr)
picaslogger.info(
f"Could not delete document {doc.id} (rev {doc.rev}) due to resource conflict: {str(ex)}",
file=sys.stderr)
result[i] = False
except Exception as ex:
picaslogger.info(f"Could not delete document {str(doc)}: {str(ex)}", file=sys.stderr)
Expand Down
1 change: 0 additions & 1 deletion picas/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ class Task(Document):
'error': [],
}


def __init__(self, task=None):
if task is None:
task = {}
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[metadata]
description-file = README.md

[flake8]
max-line-length = 199
1 change: 1 addition & 0 deletions tests/test_executers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from picas.executers import execute


class TestExecutors(unittest.TestCase):

def test_run_command(self):
Expand Down
1 change: 1 addition & 0 deletions tests/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from picas.generators import TokenGenerator


class TestGenerators(unittest.TestCase):

def setUp(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_taskviewiterator(self):
self.assertEqual(len(self.db.saved), 1)

def stop_function(self, stop_value=2):
self.stop_value=stop_value
self.stop_value = stop_value
return len(self.db.saved) == stop_value

def test_endlessviewiterator(self):
Expand Down
1 change: 1 addition & 0 deletions tests/test_modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from picas.documents import Task
from picas.modifiers import BasicTokenModifier


class TestModifier(unittest.TestCase):

def setUp(self):
Expand Down

0 comments on commit da33488

Please sign in to comment.