Skip to content

Commit

Permalink
docstrings <= 79 chars, manually
Browse files Browse the repository at this point in the history
  • Loading branch information
luthando5 committed Oct 15, 2023
1 parent 4f41d45 commit b6e2759
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
4 changes: 3 additions & 1 deletion src/bika/extras/browser/listingview/clientfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def before_render(self):
self.listing.review_states[i]["columns"].remove(bulk)
member_disc = "MemberDiscountApplies"
if member_disc in self.listing.review_states[i]["columns"]:
self.listing.review_states[i]["columns"].remove(member_disc)
self.listing.review_states[i]["columns"].remove(
member_disc
)
if "MemberDiscountApplies" in self.listing.columns:
del self.listing.columns["MemberDiscountApplies"]
if "BulkDiscount" in self.listing.columns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import collections

from AccessControl import ClassSecurityInfo
from bika.lims import api
from bika.lims import bikaMessageFactory as _
from bika.lims.api.security import check_permission
Expand All @@ -33,8 +32,6 @@
from bika.lims.utils import get_link
from bika.lims.utils import to_choices
from plone.memoize import view
from Products.Archetypes.Registry import registerWidget
from Products.Archetypes.Widget import TypesWidget
from Products.CMFCore.utils import getToolByName


Expand Down Expand Up @@ -219,7 +216,8 @@ def folderitem(self, obj, item, index):
item["before"]["Keyword"] = get_image(
"dynamic_analysisspec.png",
title=_(
"Found Dynamic Analysis Specification for '{}' in '{}'".format(
"Found Dynamic Analysis Specification "
"for '{}' in '{}'".format(
keyword, self.dynamic_spec.Title()
)
),
Expand Down
30 changes: 16 additions & 14 deletions src/bika/extras/browser/overrides/setupdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def Import(self):
or "Brand" not in row
):
logger.info(
"Unable to import '%s'. Missing supplier, manufacturer or type"
% row.get("title", "")
"Unable to import '%s'. Missing supplier, "
"manufacturer or type" % row.get("title", "")
)
continue

Expand Down Expand Up @@ -260,7 +260,8 @@ def Import(self):
methods_brains = catalog.searchResults(
{"portal_type": "Method"}
)
# If a the new method has the same MethodID as a created method, remove MethodID value.
# If a the new method has the same MethodID as a created
# method, remove MethodID value.
for methods in methods_brains:
if (
methods.getObject().get("MethodID", "") != ""
Expand Down Expand Up @@ -348,8 +349,8 @@ def load_service_uncertainties(self):
)
if not service:
warning = (
"Unable to load an Analysis Service uncertainty. Service '%s' not found."
% row.get("Service_title")
"Unable to load an Analysis Service uncertainty. "
"Service '%s' not found." % row.get("Service_title")
)
logger.warning(warning)
continue
Expand Down Expand Up @@ -493,14 +494,14 @@ def Import(self):
# Analysis Service - Instrument considerations:
# By default, an Analysis Services will be associated automatically
# with several Instruments due to the Analysis Service - Methods
# relation (an Instrument can be assigned to a Method and one Method
# can have zero or n Instruments associated). There is no need to
# set this assignment directly, the AnalysisService object will
# find those instruments.
# relation (an Instrument can be assigned to a Method and one
# Method can have zero or n Instruments associated). There
# is no need to set this assignment directly, the AnalysisService
# object will find those instruments.
# Besides this 'automatic' behavior, an Analysis Service can also
# have 0 or n Instruments manually associated ('Instruments' field).
# In this case, the attribute 'AllowInstrumentEntryOfResults' should
# be set to True.
# have 0 or n Instruments manually associated
# ('Instruments' field). In this case, the attribute
# 'AllowInstrumentEntryOfResults' should be set to True.
#
# To make it easier, if a DefaultInstrument is declared in the
# Analysis_Services spreadsheet, but the same AS has no instrument
Expand All @@ -525,8 +526,9 @@ def Import(self):
)

# Analysis Service - Calculation considerations:
# By default, the AnalysisService will use the Calculation associated
# to the Default Method (the field "UseDefaultCalculation"==True).
# By default, the AnalysisService will use the Calculation
# associated to the
# Default Method (the field "UseDefaultCalculation"==True).
# If the Default Method for this AS doesn't have any Calculation
# associated and the field "UseDefaultCalculation" is True, no
# Calculation will be used for this AS ("_Calculation" field is
Expand Down
3 changes: 2 additions & 1 deletion src/bika/extras/extenders/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,6 @@ class ExtStringField(ExtensionField, public.StringField):
class ExtTextField(ExtensionField, public.TextField):
"Field extender"


class ExtUIDReferenceField(ExtensionField, UIDReferenceField):
"Field extender"
"Field extender"

0 comments on commit b6e2759

Please sign in to comment.