question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docstrings on ``Table.read`` and ``Table.write``

See original GitHub issue

Description

Screen Shot 2021-04-13 at 15 01 34

= 😢

Additional context

Haven’t tested this, but I think they just need a __doc__ attribute.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nstarmancommented, May 3, 2021

@pllim @taldcroft.

I’ve tried a number of things for fixes:

  • setting the __doc__ attribute in UnifiedReadWriteMethod.__init__
  • setting the __doc__ attribute on the owner class variable using UnifiedReadWriteMethod.__set_name__
    def __set_name__(self, owner, name):
        # transfer docstring from wrapped function to attribute
        setattr(getattr(owner, name), "__doc__", self.func.__doc__)
    
  • Directly setting read.__doc__ and write.__doc__ on the table class.

I wonder if this is actually an automodapi issue. Maybe transfer ?

1reaction
taldcroftcommented, Apr 13, 2021

Not clear what’s happening in the sphinx docs. Table.read? in IPython gives proper help, and the fix that @pllim may be thinking of is doing Table.read.help(..) for full help on parameters for any format.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Docstrings (With Examples) - Programiz
Python docstrings are the string literals that appear right after the definition of a function, method, class, or module. Let's take an example....
Read more >
Writing docstrings — Sphinx-RTD-Tutorial documentation
In this example we show the docstrings written for the SimpleBleDevice class, which is defined within our simpleble module:.
Read more >
How to add Cargo docstrings on table pages - River Writes
A post about how to create workarounds in MediaWiki in a reasonably well-controlled manner.
Read more >
Documenting Python Code: A Complete Guide
Documenting Your Python Code Base Using Docstrings: A deep dive into docstrings for classes, class methods, functions, modules, packages, and scripts, as well ......
Read more >
csv-table formatting in Python docstrings (Sphinx)
Is there any way to write two lines in one cell that will appear as the 2nd row, but without the indentation? The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found