Everything is unicode in Python 3. No need for these anymore.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I722095c41c8e014b38bfbb16aaecae0023fcf3a8
The documentation is writting the date in its copyright. This is
considered bad practice, because this kills reproducibility. If
you don't know about reproducible build, please read on:
https: //reproducible-builds.org/
Change-Id: I6427c83af06ac58da32898f00d3f99dc6ba1ae93
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: I382aa79f7357a86af11783f59e0f1680d5bed8d0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I6974f7131d7ac43b427f8ac6381aff80b9dcb884
To augment the problems with @remove on classes, see
bug #1520397 and bug #1500851 introduce a class decorator
that is specifically made for removing existing
classes (and it appears to work correctly even
under inheritance).
Related-Bug: #1520397
Related-Bug: #1500851
Change-Id: I91adbdacc9fc77511d3f0bfb66d558269c49f885
Provide a helpful fixture that can be used
to disable warnings being output, for testing, or other
purporses.
Closes-Bug: #1503918
Change-Id: I2e1fd6f427ff6ee6d0b11b86ac2ff1b75dc0548c
Also moves doc8 to test-requirements.txt which should
be its more official home instead of being in tox.ini
Change-Id: If3836b211dbb47fa6bec36ac43367139bb939243
This is useful for moving functions to newer names
or newer modules/locations and retaining the old function
so that the old function proxies to the new function and
emits a deprecation warning when it is called.
Also fixes how the 'get_callable_name' needs to filter
for none, as it appears that when ran under sphinx the
'__module__' attribute is set to none and this causes
issues when joining into a string.
Change-Id: I290f1b71c141c6647da1750aec348ea590a8d9bd
To make it possible for easy usage of the message generating
formats that debtcollector uses, allow users to call into a
helper function that can be used to deprecate arbitrary things.
Closes-Bug: 1478676
Change-Id: I4d5b8fe44150ce2d6d5418a9f4e13812e6b558ce
This ensures that sphinx doc tests are ran and validated
and also runs doc8 to ensure style checks are done and adjusts
some of the current examples and code to fix found issues.
Change-Id: I618d44df1e153dd0156110a2657e2540908e9225
This commit adds a new decorator to mark a function/class as
deprecated in preparation for it's removal.
Change-Id: I4c3cf3ff9abdd7faefeae907a8b73608123fb09d
To make it more easy for those to see how to use
this library, start adding some basic examples that
show the common usage patterns.
Change-Id: Ieda04d0c3402cb3d9d7e55ecfd737571520ffbcb
Make the docs include the exposed API's and be formatted
better so that they are useful to users of debtcollector instead
of not being useful.
Change-Id: I6b1bdda206927d1475cabb1872a3fe21a178b125