From f45035cabb41f8cfee0b7a5475a768de0f2a8875 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Thu, 5 Dec 2024 08:40:27 +0100 Subject: [PATCH] Make linter happy. --- docs/conf.py | 99 +++++++++++++++++++++++++++++++--------------------- setup.py | 5 +-- 2 files changed, 63 insertions(+), 41 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3fe88b2..17555fd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # zope.app.apidoc documentation build configuration file, created by # sphinx-quickstart on Tue Sep 13 15:00:43 2016. @@ -21,7 +20,10 @@ # sys.path.insert(0, os.path.abspath('.')) import os import sys + import pkg_resources + + sys.path.append(os.path.abspath('../src')) rqmt = pkg_resources.require('zope.principalannotation')[0] @@ -46,10 +48,7 @@ templates_path = ['_templates'] # The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +source_suffix = {'.rst': 'restructuredtext'} # The encoding of source files. # @@ -59,9 +58,9 @@ master_doc = 'index' # General information about the project. -project = u'zope.principalannotation' -copyright = u'2017, Zope Community' -author = u'Zope Community' +project = 'zope.principalannotation' +copyright = '2017-2024, Zope Community' +author = 'Zope Community' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -77,7 +76,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -156,8 +155,8 @@ # html_logo = None # The name of an image file (relative to this directory) to use as a favicon of -# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. +# the docs. This file should be a Windows icon file (.ico) being 16x16 or +# 32x32 pixels large. # # html_favicon = None @@ -249,29 +248,32 @@ # -- Options for LaTeX output --------------------------------------------- latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'zopeprincipalannotation.tex', u'zope.principalannotation Documentation', - u'Zope Community', 'manual'), + (master_doc, + 'zopeprincipalannotation.tex', + 'zope.principalannotation Documentation', + 'Zope Community', + 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -312,9 +314,11 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'zopeprincipalannotation', u'zope.principalannotation Documentation', - [author], 1) -] + (master_doc, + 'zopeprincipalannotation', + 'zope.principalannotation Documentation', + [author], + 1)] # If true, show URL addresses after external links. # @@ -327,8 +331,12 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'zopeprincipalannotation', u'zope.principalannotation Documentation', - author, 'zopeprincipalannotation', 'One line description of project.', + (master_doc, + 'zopeprincipalannotation', + 'zope.principalannotation Documentation', + author, + 'zopeprincipalannotation', + 'One line description of project.', 'Miscellaneous'), ] @@ -351,17 +359,30 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - 'https://docs.python.org/': None, - 'https://zopeannotation.readthedocs.io/en/latest/': None, - 'https://zopesecurity.readthedocs.io/en/latest/': None, - 'https://zopelocation.readthedocs.io/en/latest/': None, - 'https://persistent.readthedocs.io/en/latest/': None, + 'python': ( + 'https://docs.python.org/', + None), + 'zopeannotation': ( + 'https://zopeannotation.readthedocs.io/en/latest/', + None), + 'zopesecurity': ( + 'https://zopesecurity.readthedocs.io/en/latest/', + None), + 'zopelocation': ( + 'https://zopelocation.readthedocs.io/en/latest/', + None), + 'persistent': ( + 'https://persistent.readthedocs.io/en/latest/', + None), } -extlinks = {'issue': ('https://github.com/zopefoundation/zope.principalannotation/issues/%s', - 'issue #'), - 'pr': ('https://github.com/zopefoundation/zope.principalannotation/pull/%s', - 'pull request #')} +extlinks = { + 'issue': ( + 'https://github.com/zopefoundation/zope.principalannotation/issues/%s', + 'issue #'), + 'pr': ( + 'https://github.com/zopefoundation/zope.principalannotation/pull/%s', + 'pull request #')} autodoc_default_flags = [ 'members', diff --git a/setup.py b/setup.py index 35bfefa..d957630 100644 --- a/setup.py +++ b/setup.py @@ -50,11 +50,12 @@ def read(*rnames): 'License :: OSI Approved :: Zope Public License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', @@ -67,7 +68,7 @@ def read(*rnames): packages=find_packages('src'), package_dir={'': 'src'}, namespace_packages=['zope'], - python_requires='>=3.7', + python_requires='>=3.8', extras_require={ 'test': TESTS_REQUIRE, 'docs': [