Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Nov 15, 2024
1 parent 6e8a56e commit acc5591
Show file tree
Hide file tree
Showing 22 changed files with 41 additions and 284 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ graft docs
include *.rst
exclude tox.ini
exclude *.txt
exclude *.cfg
exclude .gitlab-ci.yml
exclude .coveragerc
global-exclude *.pyc
239 changes: 0 additions & 239 deletions docs/conf.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Installer for the collective.formsupport.counter package."""

from setuptools import find_packages
Expand All @@ -21,6 +20,7 @@
long_description=long_description,
# Get more from https://pypi.org/classifiers/
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: Addon",
Expand Down
1 change: 0 additions & 1 deletion src/collective/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
__import__("pkg_resources").declare_namespace(__name__)
1 change: 0 additions & 1 deletion src/collective/formsupport/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# -*- coding: utf-8 -*-
__import__("pkg_resources").declare_namespace(__name__)
2 changes: 1 addition & 1 deletion src/collective/formsupport/counter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
"""Init and utils."""

from zope.i18nmessageid import MessageFactory

import logging
Expand Down
1 change: 0 additions & 1 deletion src/collective/formsupport/counter/adapters/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
<adapter factory=".data.DataAdapterWithCounter" />

</configure>

10 changes: 7 additions & 3 deletions src/collective/formsupport/counter/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="collective.formsupport.counter">
i18n_domain="collective.formsupport.counter"
>

<!-- Set overrides folder for Just-a-Bunch-Of-Templates product -->
<include package="z3c.jbot" file="meta.zcml" />
<include
package="z3c.jbot"
file="meta.zcml"
/>
<browser:jbot
directory="overrides"
layer="collective.formsupport.counter.interfaces.ICollectiveFormsupportCounterLayer"
/>

<!-- Publish static files -->
<plone:static
directory="static"
name="collective.formsupport.counter"
type="plone"
directory="static"
/>

</configure>
7 changes: 4 additions & 3 deletions src/collective/formsupport/counter/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="collective.formsupport.counter">
i18n_domain="collective.formsupport.counter"
>

<i18n:registerTranslations directory="locales" />

Expand All @@ -25,18 +26,18 @@
<genericsetup:registerProfile
name="default"
title="collective.formsupport.counter"
directory="profiles/default"
description="Installs the collective.formsupport.counter add-on."
provides="Products.GenericSetup.interfaces.EXTENSION"
directory="profiles/default"
post_handler=".setuphandlers.post_install"
/>

<genericsetup:registerProfile
name="uninstall"
title="collective.formsupport.counter (uninstall)"
directory="profiles/uninstall"
description="Uninstalls the collective.formsupport.counter add-on."
provides="Products.GenericSetup.interfaces.EXTENSION"
directory="profiles/uninstall"
post_handler=".setuphandlers.uninstall"
/>

Expand Down
1 change: 0 additions & 1 deletion src/collective/formsupport/counter/events/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
/>

</configure>

1 change: 0 additions & 1 deletion src/collective/formsupport/counter/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Module where all interfaces, events and exceptions live."""

from collective.volto.formsupport.interfaces import ICollectiveVoltoFormsupportLayer
Expand Down
6 changes: 2 additions & 4 deletions src/collective/formsupport/counter/locales/update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import os
import pkg_resources
import subprocess
Expand All @@ -26,7 +24,7 @@ def locale_folder_setup():
else:
lc_messages_path = lang + "/LC_MESSAGES/"
os.mkdir(lc_messages_path)
cmd = "msginit --locale={0} --input={1}.pot --output={2}/LC_MESSAGES/{3}.po".format( # NOQA: E501
cmd = "msginit --locale={} --input={}.pot --output={}/LC_MESSAGES/{}.po".format( # NOQA: E501
lang,
domain,
lang,
Expand Down Expand Up @@ -55,7 +53,7 @@ def _rebuild():


def _sync():
cmd = "{0} sync --pot {1}/{2}.pot {3}*/LC_MESSAGES/{4}.po".format(
cmd = "{} sync --pot {}/{}.pot {}*/LC_MESSAGES/{}.po".format(
i18ndude,
locale_path,
domain,
Expand Down
9 changes: 5 additions & 4 deletions src/collective/formsupport/counter/permissions.zcml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone">
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone"
>

<configure zcml:condition="installed AccessControl.security">
<!-- -*- extra stuff goes here -*- -->
<!-- -*- extra stuff goes here -*- -->


</configure>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layers>
<layer
name="collective.formsupport.counter"
interface="collective.formsupport.counter.interfaces.ICollectiveFormsupportCounterLayer"
/>
<layer interface="collective.formsupport.counter.interfaces.ICollectiveFormsupportCounterLayer"
name="collective.formsupport.counter"
/>
</layers>
Loading

0 comments on commit acc5591

Please sign in to comment.