Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Jan 26, 2022
1 parent 6304983 commit 00b4d0e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ venv

# Node
node_modules
package.json
package-lock.json

# Makefile
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ share

# Node
node_modules
package.json
package-lock.json

# Makefile
Expand Down
14 changes: 5 additions & 9 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,18 @@ div.bordered-content {
div.parent-list-numbers ol {
counter-reset: item;
}

div.parent-list-numbers ol li {
counter-increment: item;
}
/*div.parent-list-numbers > li:before {
content: counters(item, ".") " ";
counter-increment: item
}*/

div.parent-list-numbers ol ol > li::before {
content: counters(item, ".")")";
content: counters(item, ".") ")";
margin-left: -3em;
}
div.parent-list-numbers ol li {
counter-increment: item;
}

div.parent-list-numbers > ol > li > ol > li {
list-style: None;
list-style: none;
display: inline-flex;
display: -webkit-box;
}
24 changes: 12 additions & 12 deletions magpie/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def resource_scoped(cls):

@classproperty
@abc.abstractmethod
def resource_multi(cls): # noqa
def resource_multi(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> bool
"""
Indicates if the :term:`Service` supports multiple simultaneous :term:`Resource` references.
Expand All @@ -954,7 +954,7 @@ def resource_multi(cls): # noqa

@classproperty
@abc.abstractmethod
def resource_param(cls): # noqa
def resource_param(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> Union[Str, List[Str]]
"""
Name of the request query parameter(s) to access requested leaf children resource.
Expand All @@ -973,15 +973,15 @@ def resource_param(cls): # noqa

@classproperty
@abc.abstractmethod
def resource_types_permissions(cls): # noqa
def resource_types_permissions(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> ResourceTypePermissions
"""
Explicit permissions provided for resources for a given :term:`OWS` implementation.
"""
raise NotImplementedError

@classproperty
def params_expected(cls): # noqa
def params_expected(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> List[Str]
"""
Specify typical `Geoserver` request query parameters expected for any sub-service implementation.
Expand Down Expand Up @@ -1472,7 +1472,7 @@ class ServiceGeoserver(ServiceGeoserverBase):
}

@classproperty
def service_ows_supported(cls): # noqa
def service_ows_supported(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> Set[Type[ServiceOWS]]
return set(cls.service_map.values())

Expand Down Expand Up @@ -1517,7 +1517,7 @@ def get_config(self):
return self._config

@classproperty
def params_expected(cls): # noqa
def params_expected(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> List[Str]
params = set()
for svc in cls.service_ows_supported:
Expand All @@ -1528,7 +1528,7 @@ def params_expected(cls): # noqa
return list(params)

@classproperty
def permissions(cls): # noqa
def permissions(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> List[Permission]
perms = set()
for svc in cls.service_ows_supported:
Expand All @@ -1539,7 +1539,7 @@ def permissions(cls): # noqa
return list(perms)

@classproperty
def resource_types_permissions(cls): # noqa
def resource_types_permissions(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> ResourceTypePermissions
perms = {} # type: ResourceTypePermissions
for svc in cls.service_ows_supported:
Expand Down Expand Up @@ -1578,7 +1578,7 @@ def service_requested(self):
# since all OWS services are accessed using '/geoserver/<SERVICE>?request=...'
# attempt to match using applicable path fragment
svc_path = self.request.path.rsplit("/", 1)[-1].lower()
for svc_ows in type(self).service_ows_supported:
for svc_ows in type(self).service_ows_supported: # pylint: disable=E1133,not-an-iterable
if svc_path == svc_ows.service_base:
svc = svc_ows.service_base
break
Expand All @@ -1590,19 +1590,19 @@ def service_requested(self):
return self._service_requested

@classproperty
def resource_scoped(cls): # noqa
def resource_scoped(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> bool
svc = cls.service_requested()
return svc.resource_scoped if svc else False

@classproperty
def resource_multi(cls): # noqa
def resource_multi(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> bool
svc = cls.service_requested()
return svc.resource_multi if svc else False

@classproperty
def resource_param(cls): # noqa
def resource_param(cls): # noqa # pylint: disable=E0213,no-self-argument
# type: () -> Union[Str, List[Str]]
svc = cls.service_requested()
return cls.resource_param if svc else []
Expand Down
2 changes: 1 addition & 1 deletion magpie/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ def __call__(cls, *args, **kwargs):
return cls._instances[cls]


class classproperty(property):
class classproperty(property): # pylint: disable=C0103,invalid-name
"""
Mimics :class:`property` decorator, but applied onto ``classmethod`` in backward compatible way.
Expand Down

0 comments on commit 00b4d0e

Please sign in to comment.