fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.8K
active users

#pyflakes

0 posts0 participants0 posts today
Michael Aye<p>Why does <a href="https://mastodon.online/tags/pyflakes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyflakes</span></a> not flag this problem with an unreferenced object (`ext` instead of `self`)? </p><p>```python<br> @property<br> def has_german(self):<br> word = ext.title_de.split()[1]<br> if word.strip().lower() == 'press':<br> return False<br> else:<br> return True<br>```<br><a href="https://mastodon.online/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
César Román :python:<p>While the world seems to have moved away from <a href="https://fosstodon.org/tags/Python2" class="mention hashtag" rel="tag">#<span>Python2</span></a>, I am still actively developing packages published on <a href="https://fosstodon.org/tags/PyPI" class="mention hashtag" rel="tag">#<span>PyPI</span></a>, including some <a href="https://fosstodon.org/tags/Python3" class="mention hashtag" rel="tag">#<span>Python3</span></a> <a href="https://fosstodon.org/tags/stubs" class="mention hashtag" rel="tag">#<span>stubs</span></a> packages.</p><p>The main challenges I&#39;ve faced have been some of my &quot;build&quot; dependencies like <a href="https://fosstodon.org/tags/black" class="mention hashtag" rel="tag">#<span>black</span></a>, <a href="https://fosstodon.org/tags/pyflakes" class="mention hashtag" rel="tag">#<span>pyflakes</span></a> and <a href="https://fosstodon.org/tags/mypy" class="mention hashtag" rel="tag">#<span>mypy</span></a> dropping support for Python 2.</p><p>Always worrying about the future the next challenge we will face will be <a href="https://fosstodon.org/tags/github" class="mention hashtag" rel="tag">#<span>github</span></a> deprecating <a href="https://fosstodon.org/tags/ubuntu" class="mention hashtag" rel="tag">#<span>ubuntu</span></a> 20.04; as of now only 18.04 and 20.04 are the ones including Python 2.7, with 18.04 already deprecated.</p>
clacke: exhausted pixie dream boy 🇸🇪🇭🇰💙💛Yes! Upgrading to latest flake8 (implying latest pyflakes) and removing a bunch of <code># noqa</code> from our codebase.<br><br><a href="https://github.com/PyCQA/pyflakes/pull/479" rel="nofollow noopener" target="_blank">github.com/PyCQA/pyflakes/pull…</a><br><em>Fix false positive with partially quoted annotations</em><br><br>What would happen was that we would have code like:<br><br><pre><code>if TYPE_CHECKING: from app.resources.blah import Blah @dataclass class Thing blah: Optional["Blah"]</code></pre><br><br>And flake8/pyflakes would complain F401 for unused import, as it didn't realize that Blah was used in the type declaration. With <code>"Blah"</code> it would work, in the cases where you don't use e.g. <code>List[]</code>, <code>Optional[]</code> or <code>Union[]</code>, it would work, and with <code>"Optional[Blah]"</code> it would work too, but I only knew the quote-all-the-things workaround today, on the same day I found the real fix.<br><br>Fewer noqa good.<br><br><a href="https://libranet.de/search?tag=python" rel="nofollow noopener" target="_blank">#python</a> <a href="https://libranet.de/search?tag=pyflakes" rel="nofollow noopener" target="_blank">#pyflakes</a> <a href="https://libranet.de/search?tag=flake8" rel="nofollow noopener" target="_blank">#flake8</a>