Coder Social home page Coder Social logo

Comments (5)

mhils avatar mhils commented on June 1, 2024 1
  • Is my code written "incorrectly" with relation to how pdoc works that isn't obvious to me?
  • Is there a flag that I can add to pdoc to write a static reference to the in-memory object? (I don't believe so)

Not really, that all looks reasonable. We normally try to detect memory addresses and remove them from output, not sure why this is not happening here:

pdoc/pdoc/doc.py

Line 1183 in 3e93213

formatted = re.sub(r" at 0x[0-9a-fA-F]+(?=>$)", "", str(param))

Could you please try to remove the dollar sign from the regex and see if that fixes things?

  • Is there a way to tell pdoc to ignore / exclude an entire directory tree from documentation? So I don't have to add @private to all of the docstrings individually.

Yes, see https://pdoc.dev/docs/pdoc.html#exclude-submodules-from-being-documented

from pdoc.

mhils avatar mhils commented on June 1, 2024 1

Happening now! :)

from pdoc.

lhriley avatar lhriley commented on June 1, 2024

Okay, so removing the $ as suggested seems to have resolved the id being included. In fact removing the entire (?=>$) lookahead seems to have no obvious negative effect. I wrote a bit of perl (sed should also work) to workaround this in the meantime:

#!/usr/bin/env perl

use strict;
use warnings;
use Tie::File;

@ARGV == 1
    or usage("Incorrect number of arguments\n");

tie my @file, "Tie::File", $ARGV[0] or die $!;

for (@file) {
    $_ =~ s/(<span[^<]+object<\/span>)\s*<span[^<]+at<\/span>\s*<span[^<]+0x[a-f0-9]+<\/span>/$1/gx;
}

Which runs like this:

find docs/ -type f -exec "${SCRIPT_DIR}/documentation-cleanup.pl" {} \;

from pdoc.

lhriley avatar lhriley commented on June 1, 2024

Thanks for the quick turnaround on the fix @mhils . Any idea on when you plan to make the next release?

from pdoc.

lhriley avatar lhriley commented on June 1, 2024

Thanks @mhils ! 🏅

from pdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.