Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"We don't have to protect the environment -- the Second Coming is at hand." -- James Watt


devel / comp.lang.python / Re: Detect naming typos (AttributeError) in function names

SubjectAuthor
o Re: Detect naming typos (AttributeError) in function namesThomas Passin

1
Re: Detect naming typos (AttributeError) in function names

<mailman.186.1699360530.3828.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24393&group=comp.lang.python#24393

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: lis...@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: Detect naming typos (AttributeError) in function names
Date: Tue, 7 Nov 2023 07:35:18 -0500
Lines: 23
Message-ID: <mailman.186.1699360530.3828.python-list@python.org>
References: <5e41dd577da656946398652a83acb0be@posteo.de>
<25929.11357.456601.869600@ixdm.fritz.box>
<5b5669bb5d87a7f2c15ecbf5b400d1c8@posteo.de>
<2391be9a-2917-4616-ab5b-23b30f26e286@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de uGz19ZFLKKatcNa+QdrfKQ1qLfnUv0AL3j/xWXH036Nw==
Cancel-Lock: sha1:6AgJludzZZtZdFHy+GSfM3I6cZg= sha256:xPd2s1DWOl4o1wYLsmEyk8+dOeOSEIUM8gQ/KNSQpYA=
Return-Path: <list1@tompassin.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=tompassin.net header.i=@tompassin.net header.b=tqZqH7Zc;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.050
X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; "python's": 0.05;
'schrieb': 0.09; '(near': 0.16; 'dieter': 0.16; 'goal.': 0.16;
'hint': 0.16; 'received:10.0.0': 0.16; 'received:64.90': 0.16;
'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
'received:dreamhost.com': 0.16; 'undesired': 0.16; 'wrote:': 0.16;
'code.': 0.17; 'to:addr:python-list': 0.20; 'option': 0.20; 'run':
0.23; 'project.': 0.27; 'example,': 0.28; 'error': 0.29; 'header
:User-Agent:1': 0.30; 'am,': 0.31; 'christian': 0.32; 'python-
list': 0.32; 'received:10.0': 0.32; 'received:mailchannels.net':
0.32; 'received:relay.mailchannels.net': 0.32; 'but': 0.32; '100':
0.33; 'able': 0.34; 'header:In-Reply-To:1': 0.34; 'yes,': 0.35;
"it's": 0.37; 'class': 0.37; 'this.': 0.37; 'could': 0.38;
'thanks': 0.38; 'try': 0.40; 'tell': 0.60; 'method': 0.61;
'simply': 0.63; 'your': 0.64; 'primary': 0.67;
'header:Received:6': 0.67; 'away': 0.67; 'received:64': 0.67;
'right': 0.68; 'depending': 0.70; 'suite': 0.71; 'sufficiently':
0.84; 'subject:skip:A 10': 0.91
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1699360519; a=rsa-sha256;
cv=none;
b=FBbxiX8UWONVle4nAHD8VxaCIL4lEc/ZvsELfQD26PznjZwhcNJpCkBvzoPKwUXaqEguLK
1lWy9vdqOkCfhYVi/NubogH4SMBChSRi+QhweVCC7TAKsKPL6DcEsAyEPMbpasic9OweqT
3XMVnLTHL4QODYD1A5Clm9nvQ/S7dakzaPdfDd8UVRmbUhRp3imboWSq7Gyg6M1qS4LYpM
IdLhDee5Gw/IUBiFQj+/VdXuvfXkGKnozJpynb5OXUN6GsvuinPUTr7QyhWlcB+eg69Ap2
3DVqwhLd/m163Nte6pFkebE72Fm29S/1axKMpS0blk6Z9Kmd4vreapJWWaPnmw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1699360519;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=G0voV3ugsGK+0V2I7JiJxRYQSrSUCHcFJ5lEoIvPJlA=;
b=unmG6Nqa04STvx4C8hNQRwFF+nuiAsdWhHhnxHeyymrmjMM60psi3JJz0w/3Pdu/Lnc/HF
xc1k8dMBauNczw/4wURuWZ9YnXyTikc1TllT/5P1U2ouKxwo2pctUHoAIM0EAuOdyLAAXH
bDAzmeRqWcwBVR5QgNN2p8mHGMrCC+iJicsQhHqS543ve4Q7fcb1Q5RbPUao6EpGQA5Shi
FnntBT6JpYk+VijTXM608OT7ne+ahqu5a1wl6gUwvAPHQl42k7ekAD3JYnwfgdK/WWH7SI
bbK9H/iTawqHnvuZ45G73725r7wXkjkpO8SK2LUbQ5bZZC44pWA3rOoi90/cvw==
ARC-Authentication-Results: i=1; rspamd-7b5f9b5465-4vk2w;
auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Inform-Keen: 79a7fee52aba73de_1699360519367_1317668666
X-MC-Loop-Signature: 1699360519367:123851920
X-MC-Ingress-Time: 1699360519367
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1699360519;
bh=G0voV3ugsGK+0V2I7JiJxRYQSrSUCHcFJ5lEoIvPJlA=;
h=Date:From:Subject:To:Content-Type:Content-Transfer-Encoding;
b=tqZqH7Zc3Yo8LhZ80/l83IGFZJwv/Ap5b2Z21ehqKcWHlCitwzEQ66Tm+74cBmkjF
WSquKuqJtM5THNnKVzd33WAi5LQMi5OK3QdxIrO/0UecsOU5FF2+FGtYn+lh5lZ4px
Bl3DYbaCfd9vjQwIiYd27RruZNmG1kZVcET2KQHyubx1cEjfCC1xwf8XE1ZP5Ys6uq
CrovY9CcFmAB6CqEudXebAUCU9LWvNyk1YUxWpK7G6ndQkioSZLKpvFVCnY61qX60K
VBeJPeE51opkVBEgtbvRcyIBgKgnhdhhJpIxpjVeD+uDGhMoi0X+gSHqHxbgJJq24K
bgIwtNKFekCPQ==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <5b5669bb5d87a7f2c15ecbf5b400d1c8@posteo.de>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <2391be9a-2917-4616-ab5b-23b30f26e286@tompassin.net>
X-Mailman-Original-References: <5e41dd577da656946398652a83acb0be@posteo.de>
<25929.11357.456601.869600@ixdm.fritz.box>
<5b5669bb5d87a7f2c15ecbf5b400d1c8@posteo.de>
 by: Thomas Passin - Tue, 7 Nov 2023 12:35 UTC

On 11/7/2023 2:48 AM, Christian Buhtz via Python-list wrote:
> Hello Dieter,
>
> thanks for your reply.
>
> Am 06.11.2023 19:11 schrieb Dieter Maurer:
>> One option is a test suite (--> Python's "unittest" package)
>> with a sufficiently high coverage (near 100 %).
>
> Yes, that is the primary goal. But it is far away in the related project.
>
> I got a hint that "pylint" is able to detect problems like this.

mypy can detect typos in names by noticing that they haven't been
declared. For example, if you have a class NewClass(BaseClass), and
BaseClass has a method findme(), but you call it as findMe(), mypy will
tell you findMe does not exist in BaseClass. It can be annoying to get
the options set right so you don't get too many undesired hits, but it's
certainly doable. mypy can be slow, depending on your code.

You could also simply run py_compile, which will try to compile the
code. It will stop at the first error it finds.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor