[Python-ideas] PEP 8 update on line length
Rhodri James
rhodri at kynesim.co.uk
Tue Feb 19 11:36:19 EST 2019
On 19/02/2019 16:26, Anders Hovmöller wrote:
>
>> If it were me, I'd probably write (or would have re-written when I added
>> the type hints) that as follows:
>>
>> def resolve_annotations(
>> *,
>> raw_annotations: Dict[str, Type[Any]],
>> module_name: Optional[str]
>> ) -> Dict[str, Type[Any]]:
>
> I would like to point out here that breaking up a line breaks grepping quite badly. I've had to write AST-based searches to find simple usages of arguments in the code base at work precisely because of code that is split on likes like this. (This tool is available here: https://github.com/boxed/parso_utils)
How odd. I always break up long lines like this, and I've never once
had an issue grepping.
--
Rhodri James *-* Kynesim Ltd
More information about the Python-ideas
mailing list