<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pyflakes.git, branch myint-simplify-else</title>
<subtitle>github.com: pyflakes/pyflakes.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/'/>
<entry>
<title>Remove unnecessary `else`</title>
<updated>2019-03-02T16:58:08+00:00</updated>
<author>
<name>Steven Myint</name>
<email>git@stevenmyint.com</email>
</author>
<published>2019-03-02T16:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=bf03fd594452414b0bffe93f3fb8fd8f51cf761e'/>
<id>bf03fd594452414b0bffe93f3fb8fd8f51cf761e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve @overload detection (#435)</title>
<updated>2019-03-01T12:37:20+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-03-01T12:37:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=232cb1d27ee134bf96adc8f37e53589dc259b159'/>
<id>232cb1d27ee134bf96adc8f37e53589dc259b159</id>
<content type='text'>
* Support @overload mixed with other decorators

* Detect @overload not just at module scope
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Support @overload mixed with other decorators

* Detect @overload not just at module scope
</pre>
</div>
</content>
</entry>
<entry>
<title>Include column numbers with all error messages (#426)</title>
<updated>2019-02-09T13:48:50+00:00</updated>
<author>
<name>Aaron Meurer</name>
<email>asmeurer@gmail.com</email>
</author>
<published>2019-02-09T13:48:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=6ba3f8e0b59b8fe880345be7ae594ccd76661f6d'/>
<id>6ba3f8e0b59b8fe880345be7ae594ccd76661f6d</id>
<content type='text'>
* Include column numbers with all error messages

As long as the node passed to the message has a col_offset, it is included in
the message. There is already a precedent of printing the column number for
syntax errors.

This changes the API slightly, in that if col_offset is not present on the
node, the message.col is now -1 instead of 0. Otherwise, there would be no way
to distinguish between errors that have no column number and errors with a
column number 0. If this doesn't seem like an acceptable change, I can revert
it, and either always use 0 as the default, or use a separate attribute to
indicate if the message.col is the "real" column number.

I haven't yet tested everything, but I'm not even sure if there are any nodes
that don't have a col_offset. There don't appear to be any represented in the
test suite.

* Simplify some code

* Make column numbers start at 1

This also reverts an API break. message.col now defaults to 0 again, instead
of -1 (0 means there is no column number and so it isn't included in the
printed error message).

* Revert column number API change

It broke a lot of tests.

Now, to minimize API changes as much as possible:

- The message.col attribute starts at 0, same as the AST col_offset
- message.col is also 0 even if col_offset doesn't exist. Note that currently
  there aren't any nodes represented in the pyflakes test suite that don't
  have col_offset. Such nodes do exist in the ast module, but it seems
  unlikely that they would ever result in a message (only expr and stmt nodes
  have it, so for instance a Module node would not).
- The str version of the message starts columns at 1, which is consistent with
  the existing messages for syntax errors, as well as other tools such as
  flake8.

* Fix flake8 issue

Fixes #158 
Fixes #425</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Include column numbers with all error messages

As long as the node passed to the message has a col_offset, it is included in
the message. There is already a precedent of printing the column number for
syntax errors.

This changes the API slightly, in that if col_offset is not present on the
node, the message.col is now -1 instead of 0. Otherwise, there would be no way
to distinguish between errors that have no column number and errors with a
column number 0. If this doesn't seem like an acceptable change, I can revert
it, and either always use 0 as the default, or use a separate attribute to
indicate if the message.col is the "real" column number.

I haven't yet tested everything, but I'm not even sure if there are any nodes
that don't have a col_offset. There don't appear to be any represented in the
test suite.

* Simplify some code

* Make column numbers start at 1

This also reverts an API break. message.col now defaults to 0 again, instead
of -1 (0 means there is no column number and so it isn't included in the
printed error message).

* Revert column number API change

It broke a lot of tests.

Now, to minimize API changes as much as possible:

- The message.col attribute starts at 0, same as the AST col_offset
- message.col is also 0 even if col_offset doesn't exist. Note that currently
  there aren't any nodes represented in the pyflakes test suite that don't
  have col_offset. Such nodes do exist in the ast module, but it seems
  unlikely that they would ever result in a message (only expr and stmt nodes
  have it, so for instance a Module node would not).
- The str version of the message starts columns at 1, which is consistent with
  the existing messages for syntax errors, as well as other tools such as
  flake8.

* Fix flake8 issue

Fixes #158 
Fixes #425</pre>
</div>
</content>
</entry>
<entry>
<title>Fix line number of comment syntax error message (#420)</title>
<updated>2019-02-01T16:41:28+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-02-01T16:41:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=ba64624f38a55f162b90120b4c0ba62018c6fd08'/>
<id>ba64624f38a55f162b90120b4c0ba62018c6fd08</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typing.overload check to only check imported names (#423)</title>
<updated>2019-01-31T14:09:19+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-01-31T14:09:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=2c29431eaeb9c5b681f1615bf568fc68c6469486'/>
<id>2c29431eaeb9c5b681f1615bf568fc68c6469486</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix appveyor build</title>
<updated>2019-01-31T14:08:52+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-01-31T14:08:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=72bf8cc9998c2e6af838b3bbae61a2d2a79fb809'/>
<id>72bf8cc9998c2e6af838b3bbae61a2d2a79fb809</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write changelog and bump version for 2.1.0</title>
<updated>2019-01-24T03:09:16+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-01-17T22:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=4bc1f21df9d96b5dd1f5f3e213255b27f7104919'/>
<id>4bc1f21df9d96b5dd1f5f3e213255b27f7104919</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix regression with `__all__ = [not, strings]`</title>
<updated>2019-01-23T00:56:20+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-01-21T00:20:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=65fdfad26e5213a8245797da3e1368daa63e2067'/>
<id>65fdfad26e5213a8245797da3e1368daa63e2067</id>
<content type='text'>
Regression introduced in 47a164136982ea6ef80f302200b2a29d3a4b1c3c

Example trace before fix:

```
...

  File "/home/asottile/workspace/pyflakes/pyflakes/checker.py", line 998, in handleNodeStore
    binding = ExportBinding(name, node.parent, self.scope)
  File "/home/asottile/workspace/pyflakes/pyflakes/checker.py", line 426, in __init__
    self.names += ast.literal_eval(source.value)
  File "/usr/lib/python3.6/ast.py", line 85, in literal_eval
    return _convert(node_or_string)
  File "/usr/lib/python3.6/ast.py", line 61, in _convert
    return list(map(_convert, node.elts))
  File "/usr/lib/python3.6/ast.py", line 84, in _convert
    raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: &lt;_ast.Attribute object at 0x7f6d2bf37b70&gt;
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Regression introduced in 47a164136982ea6ef80f302200b2a29d3a4b1c3c

Example trace before fix:

```
...

  File "/home/asottile/workspace/pyflakes/pyflakes/checker.py", line 998, in handleNodeStore
    binding = ExportBinding(name, node.parent, self.scope)
  File "/home/asottile/workspace/pyflakes/pyflakes/checker.py", line 426, in __init__
    self.names += ast.literal_eval(source.value)
  File "/usr/lib/python3.6/ast.py", line 85, in literal_eval
    return _convert(node_or_string)
  File "/usr/lib/python3.6/ast.py", line 61, in _convert
    return list(map(_convert, node.elts))
  File "/usr/lib/python3.6/ast.py", line 84, in _convert
    raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: &lt;_ast.Attribute object at 0x7f6d2bf37b70&gt;
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Use file_tokens to better match flake8 api</title>
<updated>2019-01-21T14:05:42+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-01-19T19:52:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=14f28ba0279e3547c09b06870f90f01167da08ec'/>
<id>14f28ba0279e3547c09b06870f90f01167da08ec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow star args in type comments</title>
<updated>2019-01-21T14:02:47+00:00</updated>
<author>
<name>Anthony Sottile</name>
<email>asottile@umich.edu</email>
</author>
<published>2019-01-21T01:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pyflakes.git/commit/?id=357a2e3cf3461b414ba5a70485a62c411d557c3f'/>
<id>357a2e3cf3461b414ba5a70485a62c411d557c3f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
