diff --git a/core/src/zeit/cms/browser/resources.py b/core/src/zeit/cms/browser/resources.py index 699b527e12..fee480d953 100644 --- a/core/src/zeit/cms/browser/resources.py +++ b/core/src/zeit/cms/browser/resources.py @@ -1,3 +1,4 @@ +# ruff: noqa: F821 import importlib.resources import os.path import sys @@ -93,7 +94,7 @@ def __init__(self, filename, *args, **kw): SplitDirResource('namespace.js') -SplitDirResource('logging.js', depends=[namespace_js, mochikit, jquery]) # noqa +SplitDirResource('logging.js', depends=[namespace_js, mochikit, jquery]) SplitDirResource('draganddrop.js', depends=[mochikit]) SplitDirResource( 'base.js', @@ -102,7 +103,7 @@ def __init__(self, filename, *args, **kw): draganddrop_js, mochikit, jquery, - jqueryui, # noqa + jqueryui, underscore, select2_de, ], @@ -112,25 +113,25 @@ def __init__(self, filename, *args, **kw): [ namespace_js, logging_js, - base_js, # noqa + base_js, cms_css, forms_css, tables_css, - lightbox_css, # noqa + lightbox_css, cms_widgets_css, - object_details_css, # noqa + object_details_css, ] ) SplitDirResource('objectbrowser.js', depends=[base]) SplitDirResource('tooltip.js', depends=[base]) SplitDirResource('view.js', depends=[base]) -SplitDirResource('form.js', depends=[view_js, base]) # noqa -SplitDirResource('lightbox.js', depends=[form_js, base]) # noqa +SplitDirResource('form.js', depends=[view_js, base]) +SplitDirResource('lightbox.js', depends=[form_js, base]) SplitDirResource('counter.js', depends=[base]) SplitDirResource('details.js', depends=[base]) SplitDirResource('dnd.js', depends=[base]) -SplitDirResource('object_reference.js', depends=[lightbox_js, base]) # noqa +SplitDirResource('object_reference.js', depends=[lightbox_js, base]) SplitDirResource('object_sequence.js', depends=[base]) SplitDirResource('restructuredtext.js', depends=[base]) SplitDirResource('autocomplete.js', depends=[base]) @@ -139,8 +140,8 @@ def __init__(self, filename, *args, **kw): SplitDirResource('xeyes.js', depends=[base]) SplitDirResource('menu.js', depends=[base]) SplitDirResource('json-template.js', depends=[base]) -SplitDirResource('messages.js', depends=[base, view_js]) # noqa -SplitDirResource('tab.js', depends=[base, view_js]) # noqa +SplitDirResource('messages.js', depends=[base, view_js]) +SplitDirResource('tab.js', depends=[base, view_js]) SplitDirResource('tree.js', depends=[base]) SplitDirResource('filteringtable.js', depends=[base]) SplitDirResource('panelHandlers.js', depends=[base]) diff --git a/core/src/zeit/content/gallery/browser/resources.py b/core/src/zeit/content/gallery/browser/resources.py index 8539b1f19c..bffe0e3b7a 100644 --- a/core/src/zeit/content/gallery/browser/resources.py +++ b/core/src/zeit/content/gallery/browser/resources.py @@ -1,3 +1,4 @@ +# ruff: noqa: F821 import fanstatic from zeit.cms.browser.resources import Library, Resource @@ -7,7 +8,7 @@ lib = Library('zeit.content.gallery', 'resources') Resource('gallery.css') -Resource('details.js', depends=[zeit.cms.browser.resources.base, gallery_css]) # noqa +Resource('details.js', depends=[zeit.cms.browser.resources.base, gallery_css]) swfupload = fanstatic.Resource(lib, 'SWFUpload/swfupload.js') Resource( @@ -18,4 +19,4 @@ swfupload, gallery_css, ], -) # noqa +) diff --git a/core/src/zeit/content/image/browser/resources.py b/core/src/zeit/content/image/browser/resources.py index a9d72bde2f..7453012e36 100644 --- a/core/src/zeit/content/image/browser/resources.py +++ b/core/src/zeit/content/image/browser/resources.py @@ -1,3 +1,4 @@ +# ruff: noqa: F821 from js.backbone import backbone from js.cropper import cropper from js.handlebars import handlebars @@ -14,7 +15,7 @@ 'variant.js', depends=[ variant_css, - zeit.cms.browser.resources.base, # noqa + zeit.cms.browser.resources.base, backbone, cropper, handlebars, diff --git a/core/src/zeit/edit/browser/resources.py b/core/src/zeit/edit/browser/resources.py index ab969c24ae..2de5eae175 100644 --- a/core/src/zeit/edit/browser/resources.py +++ b/core/src/zeit/edit/browser/resources.py @@ -1,3 +1,4 @@ +# ruff: noqa: F821 from zeit.cms.browser.resources import Library, SplitDirResource import zeit.cms.browser.resources import zeit.find.browser.resources @@ -17,25 +18,25 @@ zeit.cms.browser.resources.base, zeit.cms.browser.resources.tab_js, zeit.find.browser.resources.find_js, - json_js, # noqa - editor_css, # noqa + json_js, + editor_css, ], ) -SplitDirResource('context.js', depends=[zeit.cms.browser.resources.base, edit_js]) # noqa +SplitDirResource('context.js', depends=[zeit.cms.browser.resources.base, edit_js]) SplitDirResource( 'drop.js', depends=[zeit.cms.browser.resources.base, zeit.cms.browser.resources.dnd_js, context_js], -) # noqa +) SplitDirResource( 'sortable.js', depends=[ zeit.cms.browser.resources.base, - context_js, # noqa + context_js, drop_js, ], -) # noqa +) SplitDirResource( 'inlineform.js', @@ -43,8 +44,8 @@ zeit.cms.browser.resources.base, zeit.cms.browser.resources.view_js, zeit.cms.browser.resources.form_js, - edit_js, # noqa - editor_css, # noqa + edit_js, + editor_css, ], ) @@ -54,9 +55,9 @@ zeit.cms.browser.resources.base, zeit.cms.browser.resources.lightbox_js, zeit.cms.browser.resources.tab_js, - context_js, # noqa - edit_js, # noqa - editor_css, # noqa + context_js, + edit_js, + editor_css, ], ) @@ -66,7 +67,7 @@ zeit.cms.browser.resources.base, zeit.cms.browser.resources.view_js, zeit.cms.browser.resources.tab_js, - drop_js, # noqa - editor_css, # noqa + drop_js, + editor_css, ], ) diff --git a/pyproject.toml b/pyproject.toml index cc67e4b0b3..a296e1cf79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,46 +9,26 @@ exclude = [ [tool.ruff.lint] select = [ - # pycodestyle - "E", - # Pyflakes - "F", - # # pyupgrade - # "UP", - # # flake8-bugbear - # "B", - # # flake8-simplify - # "SIM", - # isort - "I", + "E", # pycodestyle + "F", # Pyflakes + # "UP", # pyupgrade + # "B", # flake8-bugbear + # "SIM", # flake8-simplify + "I", # isort ] ignore = [ - # builtin-variable-shadowing - "A001", - # builtin-argument-shadowing - "A002", - # builtin-attribute-shadowing - "A003", - # one-blank-line-after-class - "D204", - # triple-single-quotes - "D300", - # indentation-with-invalid-multiple - "E111", - # indentation-with-invalid-multiple-comment - "E114", - # over-indented - "E117", - # lambda-assignment - "E731", - # undefined-name - "F821", - # flake8-logging-format - "G", - # bad-quotes-inline-string - "Q000", - # bad-quotes-multiline-string - "Q001", + "A001", # builtin-variable-shadowing + "A002", # builtin-argument-shadowing + "A003", # builtin-attribute-shadowing + "D204", # one-blank-line-after-class + "D300", # triple-single-quotes + "E111", # indentation-with-invalid-multiple + "E114", # indentation-with-invalid-multiple-comment + "E117", # over-indented + "E731", # lambda-assignment + "G", # flake8-logging-format + "Q000", # bad-quotes-inline-string + "Q001", # bad-quotes-multiline-string ] # Allow fix for all enabled rules (when `--fix`) is provided.