Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Trust me. I know what I'm doing." -- Sledge Hammer


devel / comp.lang.python / Re: PyCharm's strict PEP and not so strict?

SubjectAuthor
o Re: PyCharm's strict PEP and not so strict?dn

1
Re: PyCharm's strict PEP and not so strict?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: PythonList@DancesWithMice.info (dn)
Newsgroups: comp.lang.python
Subject: Re: PyCharm's strict PEP and not so strict?
Date: Thu, 20 Apr 2023 05:37:33 +1200
Organization: DWM
Lines: 59
Message-ID: <mailman.128.1681925871.20750.python-list@python.org>
References: <2110321349.5908606.1681897884162.ref@mail.yahoo.com>
<2110321349.5908606.1681897884162@mail.yahoo.com>
<b36efc8f-7fcf-e646-57e1-1f008d8f719a@yahoo.co.uk>
<06af8d39-a128-27e6-eeb8-f9e3f8fde7b6@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Unro19L0uylKiB9cZk1/zgydNzTkzGaEUPL5lAahk+uQ==
Return-Path: <PythonList@DancesWithMice.info>
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=danceswithmice.info header.i=@danceswithmice.info
header.b=BncTGNvj; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pycharm': 0.04;
'suggestion': 0.07; '=dn': 0.09; 'expression': 0.09; 'eyes': 0.09;
'from:addr:danceswithmice.info': 0.09; 'from:addr:pythonlist':
0.09; 'ok,': 0.09; 'subject:not': 0.09; 'those.': 0.09;
'url:pycharm': 0.09; 'problem.': 0.15; 'syntax': 0.15; 'applies':
0.16; 'flag': 0.16; 'gauld': 0.16; 'interpreter': 0.16; 'message-
id:@DancesWithMice.info': 0.16; 'quotes.': 0.16;
'received:51.254': 0.16; 'received:51.254.211': 0.16;
'received:51.254.211.219': 0.16; 'received:cloud': 0.16;
'received:rangi.cloud': 0.16; 'restriction': 0.16;
'subject:PyCharm': 0.16; 'subject:strict': 0.16; 'typing': 0.16;
'url:jetbrains': 0.16; 'whilst': 0.16; 'wrote:': 0.16; 'probably':
0.17; "can't": 0.17; 'to:addr:python-list': 0.20; "i've": 0.22;
'install': 0.23; '(and': 0.25; 'anything': 0.25; 'examples': 0.25;
'configure': 0.26; 'bit': 0.27; 'old': 0.27; 'error': 0.29;
'header:User-Agent:1': 0.30; 'convention': 0.31;
'header:Organization:1': 0.31; 'guess': 0.32; 'personally': 0.32;
'python-list': 0.32; 'received:192.168.1': 0.32; 'but': 0.32;
"i'm": 0.33; 'particular': 0.33; 'same': 0.34; 'header:In-Reply-
To:1': 0.34; 'felt': 0.35; 'close': 0.35; 'errors': 0.36;
'possibly': 0.36; 'received:192.168': 0.37; 'read': 0.38;
'single': 0.39; 'subject:PEP': 0.39; 'list': 0.39; 'use': 0.39;
'alan': 0.40; 'double': 0.40; 'whenever': 0.40; 'both': 0.40;
'want': 0.40; 'best': 0.61; 'skip:o 10': 0.61; 'once': 0.63;
'range': 0.64; 'personal': 0.64; 'received:51': 0.64; 'your':
0.64; 'tool': 0.65; 'types': 0.67; 'url-ip:18/8': 0.67; 'matter':
0.68; 'offer': 0.71; 'tools': 0.74; 'reasons': 0.84; 'bull,':
0.84; 'editing.': 0.84; 'enters': 0.84; 'quotes': 0.84; 'really.':
0.84; 'tune': 0.84
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud 1D79097E1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1681925869;
bh=jzIG98WNMB/q4RSFXjJ98460QpBF1Z3DW+fJlAx/8Lg=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=BncTGNvjAn7pHyepDvej1IdukILsS/W82T3kS00jWqJel0qDlQGiDWOK/aKJSlpb5
/0tnspNFRRULIgAmfSZiZmJZysZ4RhzE4P/Pr6AeZa3/BBrEQJMBe3nBmvxTUB44C2
kDybpOfFie/DSB7EHTGOWEXwtF1Q76eOSvpfWTcS2Dl77Q0Qg4xYOQfZkk9ZkiyfMb
i2uxLiwlfJhX0vTdZchbUkJkKDGkSwqc3PMoGSE5TPym1HwuBNFr1cmGYKL4F/29oO
BdympY4eNJJDulniU1vjMro+IU/DzBudkJRUhuhJLaNBfvtFNFHscUKLKFpPaUgBF4
TMmIhqNonfkuA==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.10.0
Content-Language: en-GB
In-Reply-To: <b36efc8f-7fcf-e646-57e1-1f008d8f719a@yahoo.co.uk>
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: <06af8d39-a128-27e6-eeb8-f9e3f8fde7b6@DancesWithMice.info>
X-Mailman-Original-References: <2110321349.5908606.1681897884162.ref@mail.yahoo.com>
<2110321349.5908606.1681897884162@mail.yahoo.com>
<b36efc8f-7fcf-e646-57e1-1f008d8f719a@yahoo.co.uk>
 by: dn - Wed, 19 Apr 2023 17:37 UTC

On 20/04/2023 04.25, Alan Gauld wrote:
> On 19/04/2023 10:51, Kevin M. Wilson via Python-list wrote:
>>  I'm in a bit of a quandary, I want some strict syntax errors to be flagged,
>
> OK, You might want to use a "linter" in that case because most
> tools use the interpreter itself to flag syntax errors.
>
>
>> but the use of single quotes vs double quotes!
>> NOT what I need from the 'checker', you dig?
>
> Not really. What is the problem. Use of single versus double quotes
> is straightforward - use one or the other and make sure they
> match(opening and closing) You can nest one type inside the
> other if you need literal quotes. And of course the same applies
> to triple quotes except you can include newlines inside those.
>
> What kind of problems are you experiencing with quotes?
> If we have some specific examples we can give specific answers.
>
>> "stones" for bull, how do I set up the kind of "checking" I want?
>
> That's not a phrase with which I'm familiar but my guess
> is you need to install a linter tool and then, possibly
> configure it to flag or hide particular error/warning types
> to your personal taste. Each tool is different so you
> will need to read the docs on how to configure it
> (and how to plumb it into your IDE).
>
> Personally I've never felt the need for any stricter error
> checking than the interpreter provides so I can't offer
> anything beyond the generic suggestion to use a linter.

+1

PyCharm enables a range of Python-linters. Some by add-in. Some by
"External tools"
(https://www.jetbrains.com/help/pycharm/configuring-third-party-tools.html).

Once a linter is made-available, some allow one to tune the application
or relaxation of certain 'rules', eg whether commas in a comma-separated
list are to be followed by a space.

Whether any enable the restriction of quotes use is another matter -
probably for the reasons @Alan has already covered.

PyCharm auto-magically enters both an opening-quote and a closing-quote
whenever start typing a string. The 'trick' is not to delete the close
whilst editing.

After gaining experience, I have a convention of when to use apostrophes
and when double-quotes. These old eyes dislike mixing both in a single
expression - but sometimes it is the best course to follow.

YMMV!

--
Regards,
=dn


devel / comp.lang.python / Re: PyCharm's strict PEP and not so strict?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor