| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
| |
Updated from:
https://raw.github.com/jcrocholl/pep8/1.4.6/pep8.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Version in our tree is a wee bit outdated. For example,
later work will introduce an utf8 encoded python source
file which our old pep8.py does not yet understand (yeah,
it really was *that* ancient)...
Updated from:
https://raw.github.com/jcrocholl/pep8/1.4.5/pep8.py
Takes 552c1f1525e37a30376790151c1ba437776682c5,
f941537d1c0a40f0906490ed160db6c79af572d3,
5a4afe2a77d0ff7d9fea13dd93c3304a6ca993de and
a17f157e19bd6792c00321c8020dca5e5a281f45 into account...
https://bugzilla.gnome.org/show_bug.cgi?id=699535
|
|
|
|
|
|
| |
They're useless if we can just access the dict directly.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
| |
because we'll add more related code to collections later on
https://bugzilla.gnome.org/show_bug.cgi?id=699536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g-ir-scanner can be a bit on the slow side. While true we
now do a bit more work parsing GTK-Doc comment blocks and
more is still to come, one of the biggest hotspots besides
what's going on in _giscanner.SourceScanner() comes from
the OrderedDict implementations we have been using.
For example, time needed to build Gtk-3.0.gir on a relatively
slow machine using "python2 -m cProfile -o $prefix/bin/g-ir-scanner ...":
1) Our original DictMixin sublass:
92,79867 seconds
2) Python's collections.OrderedDict class:
88,65786 seconds
3) Larosa/Foord implementation from http://www.voidspace.org.uk/python/odict.html :
71,64323 seconds
4) SqlAlchemy's implementation:
66,12449 seconds
Looks like we have a clear winner with the SqlAclchemy
implementation, which comes in at around 20 seconds
without profiling on the same machine. Not bad.
https://bugzilla.gnome.org/show_bug.cgi?id=697620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During review Colin Walters mentioned:
"""
One thing I should probably explain is my habit of *always* passing a
tuple for %. The reason is pretty simple...a long time ago I had an
error handler that did: print "unexpected data: %s" % foo. And I'd
changed the type of "foo" from a string to a tuple at some point.
But this obviously caused "print" to fail because it was expecting
multiple format strings.
Basically always using tuples is safer in case you change the type
of a variable to a tuple.
"""
This fixes violations of this rule introduced up until now.
https://bugzilla.gnome.org/show_bug.cgi?id=697614
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of going down with a for the user inexplicable backtrace,
emit a warning asking said user to file a bug including the
comment block in question.
Thanks to Alexandre Rostovtsev <tetromino@gentoo.org> for
proposing something similar in bug #690850
https://bugzilla.gnome.org/show_bug.cgi?id=690850
|
|
|
|
|
|
|
|
|
|
| |
A completely empty GTK-Doc comment block (/**\n*/) resulted
in an unfriendly backtrace, complaining about an
"AttributeError: 'NoneType' object has no attribute 'comment'"
This fixes the issue and adds a test case.
https://bugzilla.gnome.org/show_bug.cgi?id=690850
|
|
|
|
|
|
| |
We don't know how many apps do this, but at least ibus had one.
https://bugzilla.gnome.org/show_bug.cgi?id=689354
|
|
|
|
|
|
|
|
|
|
| |
This doesn't change anything, really, except that you don't have
to read a whole page of code just to realize that nothing else
happens with that line and we go on processing the next.
Putting the continue statements there makes it a bit more readable.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
If there is no comment block description, DocBlock().comment
should be None. This results in the removal of unneeded blank
lines in the output of DocBlock().to_gtk_doc and hence the .c
files generated by misc/update-glib-annotations.py
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
This patch adds a test for and implements a more generic solution to
GTK-Doc commit 47abcd53b8489ebceec9e394676512a181c1f1f6
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
These are remnants from the original prototype and are no
longer used.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
| |
and add paragraph break tests.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
| |
... instead of having a secondary hard-coded list. This results
in the removal of giscanner/annotationpatterns.py to prevent a
circular import.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From Python's documentation:
Python offers two different primitive operations based on
regular expressions: match checks for a match only at the
beginning of the string, while search checks for a match
anywhere in the string (this is what Perl does by default).
The different behavior between match() and search() doesn't
matter in our case and conceptually we are checking if a
piece of text matches a certain pattern, so match() is a
better fit.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
| |
DocOptions already has a position attribute, no need to overwrite it
when the position of DocBlock or DocTag is set, hence the
set_position methods are no longer needed.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
Lost a couple of hours hunting down a failed test case (from the
annotationparser work about to land) due to this not being clear...
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
The order of the "options" key/value pairs returned by
DocOption().all() should be identical to the order in
which they where stored. Hence replace the dict usage
with odict.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
| |
This makes it possible to run the upcoming annotationparser.py
tests with both Python 2 and Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
... in favor of "for key in dict: value=dict[key]"
and "dict.iteritems()". This makes it possible to
run the upcoming annotationparser.py tests with both
Python 2 and Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
| |
It simply looks better...
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=688897
|
|
|
|
|
|
|
|
|
| |
Including:
- handle things in the logical order encountered (first colon,
then annotations)
- correctly report column when missing a colon on the identifier part
- small type fixes
- remove no longer useful "parameter/tag expected" warnings
|
|
|
|
|
|
|
|
|
| |
This reverts commit f41525d54f53edd9b0d665397f7c6c755ee3616b and
adds a more complete solution as the original commit only handled
empty lines between the GTK-Doc comment block start token "/**" and
the identifier.
https://bugzilla.gnome.org/show_bug.cgi?id=673806
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current logic in _parse_comment_block of the annotationparser
check the identifier and use variables that only makes sense if a
result was returned (column_offset, original_line). This patch
indent the logic so it is only triggered if a result is found.
Otherwise it returns None as expected by call chain
"parse > parse_comment_block > _parse_comment_block":
ie in "parse":
comment_block = self.parse_comment_block(comment)
if comment_block is not None:
This still raises a lot of warnings but does not abort while generating
gir for libgnomekbd, mutter or telepathy-glib (those thus have to be
tweaked not to call g-ir-scanner with --warn-error at least until the
parser mask those false positives or the doc from those projects is
fixed to comply with the behaviour expected by giscanner).
https://bugzilla.gnome.org/show_bug.cgi?id=673806
|
|
|
|
|
|
|
|
| |
Most cases in validate() were already simply calls to _validate_option()
with particular arguments; this extracts the code from the remaining
options to their own methods, making the dispatch table more legible.
https://bugzilla.gnome.org/show_bug.cgi?id=670985
|
|
|
|
|
|
|
|
| |
"Maximium" is not an English word. Even if corrected to "maximum" (which
is), "at maximum" is not conventional usage: "at most" is more
idiomatic.
https://bugzilla.gnome.org/show_bug.cgi?id=670985
|
|
|
|
|
|
|
|
|
|
| |
Previously, the validation code compared each option name to a constant
(such as OPT_ALLOW_NONE) which expands to the string used in a source
file, and if they matched it would typically pass that same string to
_validate_option(). But the annotation name was written out longhand
each time, which seemed strange to me.
https://bugzilla.gnome.org/show_bug.cgi?id=670985
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids tags overwriting parameters if they happen to
share the same name. For example, this was triggered by
valid code in libgnome-keyring.
tests/scanner/regress.c and tests/scanner/regress.h test
written by Colin Walters <walters@verbum.org>.
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
|
| |
Only parse doc comments for the files we pass in
on the command line to g-ir-scanner, not the included dependencies.
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=672254
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=657202
|
|
|
|
|
| |
Add an annotation tag "Value:" which can be used on
constants to override the value.
|
|
|
|
|
|
|
|
|
| |
If we're done parsing parameters, previously we would simply eat lines that looked like
@foo: blah blah
Example is in gtkcssprovider.c.
https://bugzilla.gnome.org/show_bug.cgi?id=656504
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were eating any line form "* [A-Za-z]: " as a tag,
but this is a problem since e.g. gtk/gtk/gtkcssprovder.c had literal
CSS e.g. block: which erroneously matched.
Fix this by only accepting particular tags, similar to what gtk-doc
does (although we accept a superset, e.g. transfer too).
https://bugzilla.gnome.org/show_bug.cgi?id=656458
|
|
|
|
|
|
| |
For generating documentation, we actually want to preserve these.
https://bugzilla.gnome.org/show_bug.cgi?id=656389
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=655149
|
|
|
|
|
|
| |
So methods such as gtk_drag_dest_set() can be put inside Gtk.Widget
https://bugzilla.gnome.org/show_bug.cgi?id=639945
|
|
|
|
|
| |
Preserve the section names and write them out on the class/record/
interface.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=561264
|
|
|
|
|
|
| |
Might as well be liberal here, as long as we have a test case.
https://bugzilla.gnome.org/show_bug.cgi?id=631690
|
|
|
|
|
|
|
|
| |
The annotation parser changed to be stricter about annotation content,
but we introduced a regression where a : in the documentation would
wrongly cause the annotation to be skipped.
https://bugzilla.gnome.org/show_bug.cgi?id=630862
|
| |
|