Opened 16 years ago

Closed 14 years ago

#1852 defect closed fixed (fixed)

Replace uses of @ivar in interfaces with z.i.Attribute

Reported by: jknight Owned by:
Priority: lowest Milestone:
Component: core Keywords: documentation
Cc: Thijs Triemstra Branch: branches/ivar-interfaces-1852-2
branch-diff, diff-cov, branch-cov, buildbot
Author: thijs

Description

yep, that.

Attachments (1)

1852.diff (551 bytes) - added by therve 14 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 16 years ago by Glyph

Priority: normallowest

This should probably be done eventually, but I can't imagine that it's on my list of top 1000 things to do for Twisted :).

Anyone else should feel free to steal.

comment:2 Changed 14 years ago by Thijs Triemstra

Cc: Thijs Triemstra added
Keywords: documentation added
Owner: changed from Glyph to Thijs Triemstra
Status: newassigned

Can someone give me an example of when and where to replace what so I can work on this?

Changed 14 years ago by therve

Attachment: 1852.diff added

comment:3 Changed 14 years ago by therve

The attached patch should give you an example of what to do. Feel free to get back to me if it's not clear.

comment:4 in reply to:  3 Changed 14 years ago by Thijs Triemstra

Replying to therve:

The attached patch should give you an example of what to do. Feel free to get back to me if it's not clear.

Thanks therve, that's clear now.

comment:5 Changed 14 years ago by Thijs Triemstra

author: thijs
Branch: branches/ivar-interfaces-1852

(In [24700]) Branching to 'ivar-interfaces-1852'

comment:6 Changed 14 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted
Status: assignednew

comment:7 Changed 14 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Thijs Triemstra

Convention thus far has been to include the @type information in the Attribute docstring. It seems pydoctor ignores the type information for an Attribute, anyway.

twisted.web2.iweb.IChanRequest.getHostInfo isn't valid for pydoctor. epytext should allow C{} to span multiple lines, but for some reason this generates an error from pydoctor.

IGroup.join doesn't need pass anymore. Some methods in twisted/web2/iweb.py also have redundant pass statements.

Whitespace change before the id method in twisted/trial/itrial.py should be reverted

comment:8 Changed 14 years ago by Thijs Triemstra

Status: newassigned

comment:9 in reply to:  7 ; Changed 14 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted
Status: assignednew

Replying to exarkun:

Convention thus far has been to include the @type information in the Attribute docstring. It seems pydoctor ignores the type information for an Attribute, anyway.

Not sure what this means, left it as it is, let me know if you want it included or..

twisted.web2.iweb.IChanRequest.getHostInfo isn't valid for pydoctor. epytext should allow C{} to span multiple lines, but for some reason this generates an error from pydoctor.

Removed the C{} markup again.

IGroup.join doesn't need pass anymore.

removed that pass in twisted/words/im/interfaces.py

Some methods in twisted/web2/iweb.py also have redundant pass statements.

Removed the redundant statements, except for the ones in IOldRequest since they don't have any docstrings.

Whitespace change before the id method in twisted/trial/itrial.py should be reverted

Fixed, see r24836

comment:10 in reply to:  9 Changed 14 years ago by Thijs Triemstra

Replying to thijs:

Removed the redundant statements, except for the ones in IOldRequest since they don't have any docstrings.

See #3416, where exarkun will probably add those missing docstrings.

comment:11 in reply to:  9 ; Changed 14 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Thijs Triemstra

Replying to thijs:

Replying to exarkun:

Convention thus far has been to include the @type information in the Attribute docstring. It seems pydoctor ignores the type information for an Attribute, anyway.

Not sure what this means, left it as it is, let me know if you want it included or..

It means don't do this:

class IFoo(Interface):
    """
    blah blah 

    @type bar: C{int}
    """
    bar = Attribute("number of bars")

Instead, do this:

class IFoo(Interface):
    """
    blah blah
    """
    bar = Attribute("An C{int} giving the number of bars")

comment:12 Changed 14 years ago by Jean-Paul Calderone

Also, there's a conflict with trunk now, please merge forward.

comment:13 Changed 14 years ago by Thijs Triemstra

Branch: branches/ivar-interfaces-1852branches/ivar-interfaces-1852-2

(In [24867]) Branching to 'ivar-interfaces-1852-2'

comment:14 in reply to:  11 Changed 14 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted

Included the type information in the Attributes for [source:trunk/twisted/words/im/interfaces.py], see r24869

comment:15 Changed 14 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Thijs Triemstra
  • twisted/words/im/interfaces.py
    • The I{} which was in the IGroup docstring and is now the docstring for that interface's account attribute doesn't really make sense. It should be I{account} or L{account<IAccount>}. This is repeated in the docstring for IGroup.__init__.
    • The docstring for IGroup.sendGroupMessage used to have two levels of indentation for style and emote (emote is hierarchically inferior to style); now it has one, this should go back to how it was.
  • twisted/internet/interfaces.py
    • IReactorCore has L{Reactor} in its docstring now, but there is nothing named Reactor that can be linked to.
  • twisted/spread/interfaces.py - changes here don't seem significant

comment:16 Changed 14 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted

Made the changes in r24881

comment:17 Changed 14 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Thijs Triemstra

Looks fine, please merge.

comment:18 Changed 14 years ago by Thijs Triemstra

Resolution: fixed
Status: newclosed

(In [24916]) Merge ivar-interfaces-1852-2: Replace uses of @ivar in interfaces with z.i.Attribute

Author: thijs Reviewer: therve, exarkun Fixes: #1852

comment:19 Changed 11 years ago by <automation>

Owner: Thijs Triemstra deleted
Note: See TracTickets for help on using tickets.