Modify

#14203 closed task (fixed)

Static analysis updates

Reported by: figaro Owned by: Ralph Ewig
Priority: low Component: TracChecklistMacro
Severity: normal Keywords: patch
Cc: Trac Release:

Description

A few static analysis updates using codespell and autopep is attached. Please also note that your files plugin.py and checklist.js are empty and should probably be deleted.

Attachments (1)

tracchecklistmacro.diff (15.9 KB) - added by figaro 21 months ago.
Diff -u of plugin updates

Download all attachments as: .zip

Change History (7)

Changed 21 months ago by figaro

Attachment: tracchecklistmacro.diff added

Diff -u of plugin updates

comment:1 Changed 21 months ago by Ralph Ewig

Status: newaccepted

Thanks for the feedback! I've been tied up with work but should have time to catch up on tickets in another 2 weeks.

comment:2 Changed 20 months ago by Ralph Ewig

I've got pylint working now and most issues in macros.py are fixed in v0.1.7. However, there is one I'm not sure about: In my implementation of IEnvironmentSetupParticipant I initialize DatabaseManager using:

dbm = DatabaseManager(self.env)

Based on the example in the doc page this does seem correct; however pylint picks this up as an error:

[{
    "resource": "/srv/trac/dev/TracChecklist/checklist/macros.py",
    "owner": "python",
    "code": "too-many-function-args",
    "severity": 8,
    "message": "Too many positional arguments for constructor call",
    "source": "pylint",
    "startLineNumber": 330,
    "startColumn": 15,
    "endLineNumber": 330,
    "endColumn": 15
}]

I also looked at the v1.4 API doc, but wasn't smart enough to understand whether just passing the implied "self" as the only argument is sufficient - is the example documentation wrong?

Last edited 20 months ago by Ralph Ewig (previous) (diff)

comment:3 Changed 20 months ago by Ryan J Ollos

Your use of DatabaseManager is correct. I think pylint is just confused by how Trac implements its classes.

Minor typo here: [18523#file0].

comment:4 Changed 20 months ago by Ralph Ewig

ok, just uploaded v0.1.8 which should have everything linted/formatted/spellchecked now.

comment:5 Changed 20 months ago by figaro

Ok, thank you. Can you also close this ticket (dont have permission myself)?

comment:6 Changed 20 months ago by Ralph Ewig

Resolution: fixed
Status: acceptedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ralph Ewig.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.