Skip to content

Commit

Permalink
Fix lint checks and docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Feb 8, 2024
1 parent 3565a0b commit 4b91ad8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
18 changes: 17 additions & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
docutils<0.17,>=0.15 # sphinx-book-theme 0.2.0 has requirement docutils<0.17,>=0.15
Sphinx<5,>=3 # sphinx-book-theme 0.3.3 has requirement sphinx<5,>=3
sphinx-book-theme<=0.3.99
lesscpy
linkify-it-py
myst-parser
sphinx-autobuild
pydata-sphinx-theme<=0.8.99
sphinx-book-theme==0.3.3
sphinx-copybutton
sphinx-sitemap
sphinx-togglebutton
sphinxcontrib-spelling
sphinxext-opengraph
sphinxcontrib-applehelp==1.0.4 # https://github.com/plone/documentation/issues/1604
sphinxcontrib-devhelp==1.0.2 # https://github.com/plone/documentation/issues/1604
sphinxcontrib-htmlhelp==2.0.1 # https://github.com/plone/documentation/issues/1604
sphinxcontrib-qthelp==1.0.3 # https://github.com/plone/documentation/issues/1604
sphinxcontrib-serializinghtml==1.1.5 # https://github.com/plone/documentation/issues/1604
sphinxcontrib-video
vale==2.30.0
10 changes: 5 additions & 5 deletions src/plone/api/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
from plone.uuid.interfaces import IUUID
from Products.CMFCore.DynamicType import DynamicType
from Products.CMFCore.WorkflowCore import WorkflowException
from zope.component import ComponentLookupError
from zope.component import getMultiAdapter
from zope.component import getSiteManager
from zope.component import ComponentLookupError
from zope.container.interfaces import INameChooser
from zope.globalrequest import getRequest
from zope.interface import Interface
from zope.interface import providedBy


import random
import transaction

Expand Down Expand Up @@ -527,14 +526,14 @@ def get_view(name=None, context=None, request=None):

try:
return getMultiAdapter((context, request), name=name)
except ComponentLookupError:
#Getting all available views
except ComponentLookupError:
# Getting all available views
sm = getSiteManager()
available_views = sm.adapters.lookupAll(
required=(providedBy(context), providedBy(request)),
provided=Interface,
)

# Check if the requested view is available
# by getting the names of all available views
available_view_names = [view[0] for view in available_views]
Expand All @@ -549,6 +548,7 @@ def get_view(name=None, context=None, request=None):
),
)


@required_parameters("obj")
def get_uuid(obj=None):
"""Get the object's Universally Unique IDentifier (UUID).
Expand Down
1 change: 1 addition & 0 deletions src/plone/api/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Heavily inspired by collective.relationhelpers.
"""

from AccessControl.SecurityManagement import getSecurityManager
from collections import defaultdict
from plone.api.exc import InvalidParameterError
Expand Down
1 change: 1 addition & 0 deletions src/plone/api/tests/test_content.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for plone.api.content."""

from Acquisition import aq_base
from OFS.CopySupport import CopyError
from OFS.event import ObjectWillBeMovedEvent
Expand Down

0 comments on commit 4b91ad8

Please sign in to comment.