Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control sphinx width #33

Closed
risoms opened this issue Sep 9, 2020 · 1 comment · Fixed by Cqsi/lichs#37
Closed

Control sphinx width #33

risoms opened this issue Sep 9, 2020 · 1 comment · Fixed by Cqsi/lichs#37

Comments

@risoms
Copy link

risoms commented Sep 9, 2020

This issue tracker is a tool to address bugs in Deprecated itself.
Please use Stack Overflow for general questions about using Deprecated
or issues not related to Deprecated Library.

If you'd like to report a bug in Deprecated, fill out the template below. Provide
any extra information that may be useful/related to your problem.
Ideally, create an Minimal, Complete, and Verifiable example,
which helps us understand the problem and helps check that it is not caused by something in your code.


Expected Behavior

I'm hoping to use the decorator to create sphinx output.

print(a.__doc__)
.. deprecated:: 3.0.35
   This staticmethod has been deprecated. :func:`get_it_id()` is
   recommended instead. Example:

   .. code-block:: python
      from test_lib_dry_lab.lib.aplace.anotherlongerplace import Lookup
      rwo = Lookup('ID222').item[0]
      rwo.get_it_id()
      'AY20'

Actual Behavior

When using sphinx to deprecate a function, I'm noticing its continuing text on a new line. Is there a way to prevent this?

.. deprecated:: 3.0.35
   This staticmethod has been deprecated. :func:`get_it_id()` is
   recommended instead. Example:

   .. code-block:: python
      from test_lib_dry_lab.lib.aplace.anotherlongerplace import
   Lookup
      rwo = Lookup('ID222').item[0]
      rwo.get_it_id()
      'AY20'

Environment

  • Python version: 3.7
  • Deprecated version: 1.2.10
@tantale
Copy link
Collaborator

tantale commented Dec 10, 2020

Hello,

The formatter function uses textwrap.fill with a width of 70 characters. Currently, this value is hard coded. I need more focus on this issue to find a good way to parametrize this.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment