././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.928191 pylint-4.0.9/0000755000175100017510000000000015254767632012532 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4688742 pylint-4.0.9/CONTRIBUTORS.txt0000644000175100017510000010170715254767617015241 0ustar00runnerrunner# This file is autocompleted by 'contributors-txt', # using the configuration in 'script/.contributors_aliases.json'. # Do not add new persons manually and only add information without # using '-' as the line first character. # Please verify that your change are stable if you modify manually. Ex-maintainers -------------- - Claudiu Popa - Sylvain Thénault : main author / maintainer - Torsten Marek Maintainers ----------- - Pierre Sassoulas - Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> - Jacob Walls - Marc Mueller <30130371+cdce8p@users.noreply.github.com> - Hippo91 - Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> - Andreas Finkler <3929834+DudeNr33@users.noreply.github.com> - Matus Valo - Dani Alcala <112832187+clavedeluna@users.noreply.github.com> - Å�ukasz Rogalski - Nick Drozd : performance improvements to astroid - Ashley Whetter - Bryce Guinta - Yu Shao, Pang <36848472+yushao2@users.noreply.github.com> - Dimitri Prybysh * multiple-imports, not-iterable, not-a-mapping, various patches. - Roy Williams (Lyft) * added check for implementing __eq__ without implementing __hash__, * Added Python 3 check for accessing Exception.message. * Added Python 3 check for calling encode/decode with invalid codecs. * Added Python 3 check for accessing sys.maxint. * Added Python 3 check for bad import statements. * Added Python 3 check for accessing deprecated methods on the 'string' module, various patches. - Florian Bruhin - Arianna Yang Contributors ------------ We would not be here without folks that contributed patches, pull requests, issues and their time to pylint. We're incredibly grateful to all of these contributors: - Emile Anclin (Logilab): python 3 support - Michal Nowikowski : * wrong-spelling-in-comment * wrong-spelling-in-docstring * parallel execution on multiple CPUs - Julthep Nandakwang - Bruno Daniel : check_docs extension. - Sushobhit <31987769+sushobhit27@users.noreply.github.com> (sushobhit27) * Added new check 'comparison-with-itself'. * Added new check 'useless-import-alias'. * Added support of annotations in missing-type-doc and missing-return-type-doc. * Added new check 'comparison-with-callable'. * Removed six package dependency. * Added new check 'chained-comparison'. * Added new check 'useless-object-inheritance'. - Brett Cannon : * Port source code to be Python 2/3 compatible * Python 3 checker - Laura Médioni (Logilab, on behalf of the CNES): * misplaced-comparison-constant * no-classmethod-decorator * no-staticmethod-decorator * too-many-nested-blocks, * too-many-boolean-expressions * unneeded-not * wrong-import-order * ungrouped-imports, * wrong-import-position * redefined-variable-type - Harutaka Kawamura - Alexandre Fayolle (Logilab): TkInter gui, documentation, debian support - Ville Skyttä - Zen Lee <53538590+zenlyj@users.noreply.github.com> - Julien Cristau (Logilab): python 3 support - Moisés López <6644187+moylop260@users.noreply.github.com>: * Support for deprecated-modules in modules not installed, * Refactor wrong-import-order to integrate it with `isort` library * Add check too-complex with mccabe for cyclomatic complexity * Refactor wrong-import-position to skip try-import and nested cases * Add consider-merging-isinstance, superfluous-else-return * Fix consider-using-ternary for 'True and True and True or True' case * Add bad-docstring-quotes and docstring-first-line-empty * Add missing-timeout * Fix false negative for `deprecated-module` when a `__import__` method is used instead of `import` sentence - Adrien Di Mascio - Frank Harrison (doublethefish) - Pierre-Yves David - David Shea : invalid sequence and slice index - Gunung P. Wibisono <55311527+gunungpw@users.noreply.github.com> - Derek Gustafson - Cezar Elnazli : deprecated-method - Joseph Young <80432516+jpy-git@users.noreply.github.com> (jpy-git) - Tim Martin - Ollie <46904826+ollie-iterators@users.noreply.github.com> - Julian Grimm <51880314+Julfried@users.noreply.github.com> - Tushar Sadhwani (tusharsadhwani) - Nicolas Chauvat - orSolocate <38433858+orSolocate@users.noreply.github.com> - Radu Ciorba : not-context-manager and confusing-with-statement warnings. - Holger Peters - Cosmin Poieană : unichr-builtin and improvements to bad-open-mode. - Yilei "Dolee" Yang - Steven Myint : duplicate-except. - Peter Kolbus (Garmin) - Luigi Bertaco Cristofolini (luigibertaco) - Glenn Matthews : * autogenerated documentation for optional extensions, * bug fixes and enhancements for docparams (née check_docs) extension - crazybolillo - correctmost <134317971+correctmost@users.noreply.github.com> - Vlad Temian : redundant-unittest-assert and the JSON reporter. - Julien Jehannet - Boris Feld - Anthony Sottile - Andrew Haigh (nelfin) - Robert Hofer - Pedro Algarvio (s0undt3ch) - Julien Palard - Hugo van Kemenade - David Liu (david-yz-liu) - Dan Goldsmith : support for msg-template in HTML reporter. - Buck Evan - Mariatta Wijaya * Added new check `logging-fstring-interpolation` * Documentation typo fixes - Jakub Wilk - Eli Fine (eli88fine): Fixed false positive duplicate code warning for lines with symbols only - Émile Crater - Pavel Roskin - David Gilman - ã�¸ãƒ¼ã�•ã‚“ - Thomas Hisch - Marianna Polatoglou : minor contribution for wildcard import check - Manuel Vázquez Acosta - Luis Escobar (Vauxoo): Add bad-docstring-quotes and docstring-first-line-empty - Lucas Cimon - Konstantina Saketou <56515303+ksaketou@users.noreply.github.com> - Konstantin - Jim Robertson - Ethan Leba - Enji Cooper - Drum Ogilvie - David Lindquist : logging-format-interpolation warning. - Daniel Harding - Anthony Truchet - Alexander Todorov : * added new error conditions to 'bad-super-call', * Added new check for incorrect len(SEQUENCE) usage, * Added new extension for comparison against empty string constants, * Added new extension which detects comparing integers to zero, * Added new useless-return checker, * Added new try-except-raise checker - theirix - Téo Bouvard - Sviatoslav Sydorenko - Stavros Ntentos <133706+stdedos@users.noreply.github.com> - Nicolas Boulenguez - Mihai Balint - Mark Bell - Levi Gruspe - Jakub Kuczys - Hornwitser : fix import graph - Fureigh - David Douard - Daniel Balparda (Google): GPyLint maintainer (Google's pylint variant) - Christian Clauss - Bastien Vallet (Djailla) - Aru Sahni : Git ignoring, regex-based ignores - Andreas Freimuth : fix indentation checking with tabs - Alexandru Coman - jpkotta - Thomas Grainger - Takahide Nojima - Taewon D. Kim - Sneaky Pete - Sergey B Kirpichev - Sandro Tosi : Debian packaging - Rogdham - Rene Zhang - Paul Lichtenberger - Or Bahari - Mr. Senko - Mike Frysinger - Martin von Gagern (Google): Added 'raising-format-tuple' warning. - Martin Vielsmaier - Martin Pool (Google): * warnings for anomalous backslashes * symbolic names for messages (like 'unused') * etc. - Martin BaÅ¡ti * Added new check for shallow copy of os.environ * Added new check for useless `with threading.Lock():` statement - Marcus Näslund (naslundx) - Marco Pernigotti <7657251+mpernigo@users.noreply.github.com> - Marco Forte - James Addison <55152140+jayaddison@users.noreply.github.com> - Ionel Maries Cristian - Gergely Kalmár - Damien Baty - Benjamin Drung : contributing Debian Developer - Anubhav <35621759+anubh-v@users.noreply.github.com> - Antonio Quarta - Andrew J. Simmons - Alvaro Frias - Alexey Pelykh - Alex Prabhat Bara - wtracy - jessebrennan - chohner - aatle <168398276+aatle@users.noreply.github.com> - Tiago Honorato <61059243+tiagohonorato@users.noreply.github.com> - Steven M. Vascellaro - Robin Tweedie <70587124+robin-wayve@users.noreply.github.com> - Roberto Leinardi : PyCharm plugin maintainer - Ricardo Gemignani - Piotr Idzik <65706193+vil02@users.noreply.github.com> - Pieter Engelbrecht - Philipp Albrecht (pylbrecht) - Nicolas Dickreuter - Nick Bastin - Nathaniel Manista : suspicious lambda checking - Maksym Humetskyi (mhumetskyi) * Fixed ignored empty functions by similarities checker with "ignore-signatures" option enabled * Ignore function decorators signatures as well by similarities checker with "ignore-signatures" option enabled * Ignore class methods and nested functions signatures as well by similarities checker with "ignore-signatures" option enabled - Kylian - Konstantin Manna - Kai Mueller <15907922+kasium@users.noreply.github.com> - Joshua Cannon - John Leach - James Morgensen : ignored-modules option applies to import errors. - Jaehoon Hwang (jaehoonhwang) - Huw Jones - Gideon <87426140+GideonBear@users.noreply.github.com> - Ganden Schaffner - Frost Ming - Federico Bond - Erik Wright - Erik Eriksson : Added overlapping-except error check. - Emmanuel Ferdman - Dave Bunten - Daniel Wang - Daniel Mouritzen - Dan Hemberger <846186+hemberger@users.noreply.github.com> - Chris Rebert : unidiomatic-typecheck. - Aurelien Campeas - Alexander Pervakov - Alain Leufroy - Akshay Choudhary <153769403+Akshay9715@users.noreply.github.com> - Akhil Kamat - Adam Williamson - Aaron Liu - xmo-odoo - tbennett0 - purajit <7026198+purajit@users.noreply.github.com> - omarandlorraine <64254276+omarandlorraine@users.noreply.github.com> - craig-sh - bernie gray - azinneck0485 <123660683+azinneck0485@users.noreply.github.com> - Wing Lian - Wes Turner (Google): added new check 'inconsistent-quotes' - Tyler Thieding - Tobias Hernstig <30827238+thernstig@users.noreply.github.com> - Smixi - Simu Toni - Sergei Lebedev <185856+superbobry@users.noreply.github.com> - Scott Worley - Saugat Pachhai - Samuel FORESTIER - Rémi Cardona - Ryan Ozawa - Roger Sheu <78449574+rogersheu@users.noreply.github.com> - Raphael Gaschignard - Ram Rachum (cool-RR) - Radostin Stoyanov - Peter Bittner - Paul Renvoisé - PHeanEX - Omega Weapon - Nikolai Kristiansen - Nick Pesce - Nedelcu Ioan-Andrei <138256980+nedelcu-ioan@users.noreply.github.com> - Nathan Marrow - Mikhail Fesenko - Matthew Suozzo - Matthew Beckers <17108752+mattlbeck@users.noreply.github.com> (mattlbeck) - Mark Roman Miller : fix inline defs in too-many-statements - MalanB - Mads Kiilerich - Maarten ter Huurne - Lefteris Karapetsas - LCD 47 - Jérome Perrin - Justin Li - John Kirkham - Jens H. Nielsen - Jake Lishman - Ioana Tagirta : fix bad thread instantiation check - Ikraduya Edian : Added new checks 'consider-using-generator' and 'use-a-generator'. - Hugues Bruant - Hashem Nasarat - Harut - Grygorii Iermolenko - Grizzly Nyo - Gabriel R. Sezefredo : Fixed "exception-escape" false positive with generators - Filipe Brandenburger - Felix Preuschoff <37065638+felixp98@users.noreply.github.com> - Fantix King (UChicago) - Eric McDonald <221418+emcd@users.noreply.github.com> - Elias Dorneles : minor adjust to config defaults and docs - Elazrod56 - Edward K. Ream - Derek Harland - David Pursehouse - Daniel Miller - Christoph Blessing <33834216+cblessing24@users.noreply.github.com> - Chris Murray - Chris Lamb - Charles Hebert - Carli Freudenberg (CarliJoy) * Fixed issue 5281, added Unicode checker * Improve non-ascii-name checker - Bruce Dawson - Brian Shaginaw : prevent error on exception check for functions - Benny Mueller - Ben James - Ben Green - Batuhan Taskaya - Artem Yurchenko - Alexander Kapshuna - Adam Parkin - Anshul Singh <72524975+ekanshul@users.noreply.github.com> - è°­ä¹�鼎 <109224573@qq.com> - Å�ukasz Sznuk - zasca - y2kbugger - vinnyrose - ttenhoeve-aa - thinwybk - temyurchenko <44875844+temyurchenko@users.noreply.github.com> - syutbai - sur.la.route <17788706+christopherpickering@users.noreply.github.com> - sdet_liang - pavan-msys <149513767+pavan-msys@users.noreply.github.com> - paschich - oittaa <8972248+oittaa@users.noreply.github.com> - nyabkun <75878387+nyabkun@users.noreply.github.com> - nhdsd - moxian - mar-chi-pan - lrjball <50599110+lrjball@users.noreply.github.com> - levon-d - laike9m - kyoto7250 <50972773+kyoto7250@users.noreply.github.com> - kriek - kdestin <101366538+kdestin@users.noreply.github.com> - kdelay - jaydesl <35102795+jaydesl@users.noreply.github.com> - jab - h1whelan - gracejiang16 <70730457+gracejiang16@users.noreply.github.com> - glmdgrielson <32415403+glmdgrielson@users.noreply.github.com> - glegoux - gaurikholkar - flyingbot91 - fly - fahhem - fadedDexofan - epenet <6771947+epenet@users.noreply.github.com> - danields - cosven - cordis-dev - cherryblossom <31467609+cherryblossom000@users.noreply.github.com> - bluesheeptoken - anatoly techtonik - amelenty - akirchhoff-modular - agutole - Zeckie <49095968+Zeckie@users.noreply.github.com> - Zeb Nicholls * Made W9011 compatible with 'of' syntax in return types - Yuval Langer - Yury Gribov - Yuri Bochkarev : Added epytext support to docparams extension. - Youngsoo Sung - Yory <39745367+yory8@users.noreply.github.com> - Yoichi Nakayama - Yeting Li (yetingli) - Yannack - Yann Dirson - Yang Yang - Xi Shen - Winston H <56998716+winstxnhdw@users.noreply.github.com> - Will Shanks - Viorel Știrbu : intern-builtin warning. - VictorT - Victor Jiajunsu <16359131+jiajunsu@users.noreply.github.com> - ViRuSTriNiTy - Val Lorentz - Ulrich Eckhardt - Udi Fuchs - Trevor Bekolay * Added --list-msgs-enabled command - Tomer Chachamu : simplifiable-if-expression - Tomasz Michalski - Tomasz Magulski - Tom - Tim Hatch - Tim Gates - Tianyu Chen <124018391+UTsweetyfish@users.noreply.github.com> - Théo Battrel - Thomas Benhamou - Theodore Ni <3806110+tjni@users.noreply.github.com> - Tanvi Moharir <74228962+tanvimoharir@users.noreply.github.com>: Fix for invalid toml config - T.Rzepka - Svetoslav Neykov - SubaruArai <78188579+SubaruArai@users.noreply.github.com> - Stéphane Wirtel : nonlocal-without-binding - Stephen Longofono <8992396+SLongofono@users.noreply.github.com> - Stephane Odul <1504511+sodul@users.noreply.github.com> - Stanislav Levin - Sparsh :) <76697238+SparshGarg999@users.noreply.github.com> - Sorin Sbarnea - Slavfox - Skip Montanaro - Sigurd Spieckermann <2206639+sisp@users.noreply.github.com> - Shiv Venkatasubrahmanyam - Semih702 - Sebastian Müller - Sayyed Faisal Ali <80758388+C0DE-SLAYER@users.noreply.github.com> - Sasha Bagan - Sardorbek Imomaliev - Santiago Castro - Samuel Freilich (sfreilich) - Sam Vermeiren <88253337+PaaEl@users.noreply.github.com> - Ryan McGuire - Ry4an Brase - Ruro - Roshan Shetty - Roman Ivanov - Robert Schweizer - Reverb Chu - Renat Galimov - Rebecca Turner (9999years) - Randall Leeds - Ranadheer Gorrepati <35244169+ranadheerg@users.noreply.github.com> - Ramon Saraiva - Ramiro Leal-Cavazos (ramiro050): Fixed bug preventing pylint from working with Emacs tramp - RSTdefg <34202999+RSTdefg@users.noreply.github.com> - R. N. West <98110034+rnwst@users.noreply.github.com> - Qwiddle13 <32040075+Qwiddle13@users.noreply.github.com> - Quentin Young - Puneet Dixit - Prajwal Borkar - Petr Pulc : require whitespace around annotations - Peter Dawyndt - Peter Dave Hello - Peter Aronoff - Paul Cochrane - Patrik - Pascal Corpet - Pablo Galindo Salgado * Fix false positive 'Non-iterable value' with async comprehensions. - Osher De Paz - Oisín Moran - Obscuron - Noam Yorav-Raphael - Noah-Agnel <138210920+Noah-Agnel@users.noreply.github.com> - Nir Soffer - Niko Wenselowski - Nikita Sobolev - Nick Smith - Neowizard - Ned Batchelder - Natalie Serebryakova - Naglis Jonaitis <827324+naglis@users.noreply.github.com> - Moody - Mitchell Young : minor adjustment to docparams - Mitar - Ming Lyu - Mikhail f. Shiryaev - Mike Fiedler (miketheman) - Mike Bryant - Mike Bernard - Michka Popoff - Michal Vasilek - Michael Scott Cuthbert - Michael Kefeder - Michael K - Michael Hudson-Doyle - Michael Giuffrida - Melvin Hazeleger <31448155+melvio@users.noreply.github.com> - Meltem Kenis - Mehraz Hossain Rumman <59512321+MehrazRumman@users.noreply.github.com> - Mehdi Drissi - MatÄ›j Grabovský - Matthijs Blom <19817960+MatthijsBlom@users.noreply.github.com> - Matt Van Horn <455140+mvanhorn@users.noreply.github.com> - Matej Spiller Muys - Matej Marušák - Marzuk Rashid - Markus Siebenhaar <41283549+siehar@users.noreply.github.com> - Marco Edward Gorelli : Documented Jupyter integration - Marcin Kurczewski (rr-) - Maik Röder - Lumír 'Frenzy' Balhar - Ludovic Aubry - Louis Sautier - Lorena Buciu <46202743+lorena-b@users.noreply.github.com> - Logan Miller <14319179+komodo472@users.noreply.github.com> - Kári Tristan Helgason - Kurian Benoy <70306694+kurianbenoy-aot@users.noreply.github.com> - Krzysztof Czapla - Kraig Brockschmidt - Kound - KotlinIsland <65446343+KotlinIsland@users.noreply.github.com> - Kosarchuk Sergey - Konrad Weihmann <46938494+priv-kweihmann@users.noreply.github.com> - Kian Meng, Ang - Kevin Phillips - Kevin Jing Qiu - Kenneth Schackart - Kayran Schmidt <59456929+yumasheta@users.noreply.github.com> - Karthik Nadig - Jürgen Hermann - Julfried - Josselin Feist - Jonathan Kotta - John Paraskevopoulos : add 'differing-param-doc' and 'differing-type-doc' - John McGehee - John Gabriele - John Belmonte - Johannes Maron - Joffrey Mander - Jochen Preusche - Jeroen Seegers : * Fixed `toml` dependency issue - Jeremy Fleischman - Jason Owen - Jason Lau - Jared Garst - Jared Deckard - Janne Rönkkö - Jamie Scott - James Sinclair - James M. Allen - James Lingard - James Broadhead - Jakub Kulík - Jakob Normark - Jacques Kvam - Jace Browning : updated default report format with clickable paths - JZ - JT Olds - Iggy Eom - Ige-kun <178478713+Ige-kun@users.noreply.github.com> - Hayden Richards <62866982+SupImDos@users.noreply.github.com> * Fixed "no-self-use" for async methods * Fixed "docparams" extension for async functions and methods - Harshil <37377066+harshil21@users.noreply.github.com> - Harry - Gwanbin Park - Grégoire <96051754+gregoire-mullvad@users.noreply.github.com> - Grant Welch - Giuseppe Valente - Gary Tyler McLeod - Fridayai700 - Felix von Drigalski - Fabrice Douchant - Fabio Natali - Fabian Damken - Eric Froemling - Emmanuel Chaudron - Elizabeth Bott <52465744+elizabethbott@users.noreply.github.com> - Ekin Dursun - Eisuke Kawashima - Edgemaster - Eddie Darling - Drew Risinger - Dr. Nick - Don Kirkby - Don Jayamanne - Dominic Lavery - Dmytro Kyrychuk - Dionisio E Alonso - DetachHead <57028336+DetachHead@users.noreply.github.com> - Dennis Keck <26092524+fellhorn@users.noreply.github.com> - Denis Laxalde - David Lawson - David Cain - Danny Hermes - Daniele Procida - Daniela Plascencia - Daniel Werner - Daniel R. Neal (danrneal) - Daniel Draper - Daniel Dorani (doranid) - Daniel Brookman <53625739+dbrookman@users.noreply.github.com> - Dan Garrette - Damien Nozay - Cubicpath - Craig Citro - Cosmo - Clément Schreiner - Clément Pit-Claudel - Christopher Zurcher - ChandanChainani - Carl Crowder : don't evaluate the value of arguments for 'dangerous-default-value' - Carey Metcalfe : demoted `try-except-raise` from error to warning - Cameron Olechowski - Calin Don - Caio Carrara - C.A.M. Gerlach - Bruno P. Kinoshita - Brice Chardin - Brian C. Lane - Brandon W Maister - BioGeek - Berker ÅžAL - Benjamin Partzsch <32679788+bnjmnp@users.noreply.github.com> - Benjamin Graham - Benedikt Morbach - Ben Greiner - Barak Shoshany - Banjamin Freeman - Ayushi Kotiyal <70513726+Ayushikotiyal@users.noreply.github.com> - Avram Lubkin - Athos Ribeiro : Fixed dict-keys-not-iterating false positive for inverse containment checks - Arun Persaud - Arthur Lutz - Antonio Ossa - Antonio Gámiz Delgado <73933988+antoniogamizbadger@users.noreply.github.com> - Anthony VEREZ - Anthony Tan - Anthony Foglia (Google): Added simple string slots check. - Anentropic - Andy Young - Andy Palmer <25123779+ninezerozeronine@users.noreply.github.com> - Andrzej Klajnert - Andrew Howe - Andres Perez Hortal - Andre Hora - Aman Salwan <121633121+AmanSal1@users.noreply.github.com> - Alok Singh <8325708+alok@users.noreply.github.com> - Allan Chandler <95424144+allanc65@users.noreply.github.com> (allanc65) * Fixed issue 5452, false positive missing-param-doc for multi-line Google-style params - Alex Waygood - Alex Mor <5476113+nashcontrol@users.noreply.github.com> - Alex Jurkiewicz - Alex Hearn - Alex Fortin - Aleksander Mamla - Alan Evangelista - Alan Chan - Aivar Annamaa - Aidan Haase <44787650+haasea@users.noreply.github.com> - Ahirnish Pareek : 'keyword-arg-before-var-arg' check - Agustin Marquez - Adrian Chirieac - Aditya Gupta (adityagupta1089) * Added ignore_signatures to duplicate checker - Adetunji Oludele Adebayo - Adam Tuft <73994535+adamtuft@users.noreply.github.com> - Adam Dangoor - 243f6a88 85a308d3 <33170174+243f6a8885a308d313198a2e037@users.noreply.github.com> Co-Author --------- The following persons were credited manually but did not commit themselves under this name, or we did not manage to find their commits in the history. - Agustin Toledo - Amaury Forgeot d'Arc: check names imported from a module exists in the module - Anthony Tan - Axel Muller - Benjamin Niemann: allow block level enabling/disabling of messages - Bernard Nauwelaerts - Bill Wendling - Brian van den Broek: windows installation documentation - Craig Henriques - D. Alphus (Alphadelta14) - Daniil Kharkov - Eero Vuojolahti - Fabio Zadrozny - Gauthier Sebaux - James DesLauriers - manderj - Mirko Friedenhagen - Nicholas Smith - Nuzula H. Yudaka (Nuzhuka) - Pek Chhan - Peter Hammond - Pierre Rouleau - Richard Goodman: simplifiable-if-expression (with Tomer Chachamu) - Sebastian Ulrich - Takashi Hirashima - Thomas Snowden: fix missing-docstring for inner functions - Wolfgang Grafen - Yannick Brehon ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4688742 pylint-4.0.9/LICENSE0000644000175100017510000004310015254767617013540 0ustar00runnerrunner GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4688742 pylint-4.0.9/MANIFEST.in0000644000175100017510000000047315254767617014277 0ustar00runnerrunnerinclude README.rst include requirements_test_min.txt include requirements_test_pre_commit.txt include requirements_test.txt include tox.ini graft doc graft examples graft script graft tests prune doc/_build prune tests/.benchmarks prune tests/.pylint_primer_tests global-exclude __pycache__ global-exclude *.py[co] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.9276183 pylint-4.0.9/PKG-INFO0000644000175100017510000002757015254767632013642 0ustar00runnerrunnerMetadata-Version: 2.4 Name: pylint Version: 4.0.9 Summary: python code static checker Author-email: Python Code Quality Authority License-Expression: GPL-2.0-or-later Project-URL: Bug Tracker, https://github.com/pylint-dev/pylint/issues Project-URL: Discord Server, https://discord.com/invite/Egy6P8AMB5 Project-URL: Docs: Contributor Guide, https://pylint.readthedocs.io/en/latest/development_guide/contributor_guide/index.html Project-URL: Docs: User Guide, https://pylint.readthedocs.io/en/latest/ Project-URL: homepage, https://github.com/pylint-dev/pylint Project-URL: Source Code, https://github.com/pylint-dev/pylint Project-URL: What's New, https://pylint.readthedocs.io/en/latest/whatsnew/4/ Keywords: lint,linter,python,static code analysis Classifier: Development Status :: 6 - Mature Classifier: Environment :: Console Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: 3.14 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Debuggers Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Software Development :: Testing Classifier: Typing :: Typed Requires-Python: >=3.10.0 Description-Content-Type: text/x-rst License-File: LICENSE License-File: CONTRIBUTORS.txt Requires-Dist: astroid<=4.1.dev0,>=4.0.2 Requires-Dist: colorama>=0.4.5; sys_platform == "win32" Requires-Dist: dill>=0.2; python_version < "3.11" Requires-Dist: dill>=0.3.6; python_version >= "3.11" Requires-Dist: dill>=0.3.7; python_version >= "3.12" Requires-Dist: isort!=5.13,<10,>=5 Requires-Dist: mccabe<0.8,>=0.6 Requires-Dist: platformdirs>=2.2 Requires-Dist: tomli>=1.1; python_version < "3.11" Requires-Dist: tomlkit>=0.10.1 Requires-Dist: typing-extensions>=3.10; python_version < "3.10" Provides-Extra: spelling Requires-Dist: pyenchant~=3.2; extra == "spelling" Provides-Extra: testutils Requires-Dist: gitpython>3; extra == "testutils" Dynamic: license-file `Pylint`_ ========= .. _`Pylint`: https://pylint.readthedocs.io/ .. This is used inside the doc to recover the start of the introduction .. image:: https://github.com/pylint-dev/pylint/actions/workflows/tests.yaml/badge.svg?branch=main :target: https://github.com/pylint-dev/pylint/actions .. image:: https://codecov.io/gh/pylint-dev/pylint/branch/main/graph/badge.svg?token=ZETEzayrfk :target: https://codecov.io/gh/pylint-dev/pylint .. image:: https://img.shields.io/pypi/v/pylint.svg :alt: PyPI Package version :target: https://pypi.python.org/pypi/pylint .. image:: https://readthedocs.org/projects/pylint/badge/?version=latest :target: https://pylint.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black .. image:: https://img.shields.io/badge/linting-pylint-yellowgreen :target: https://github.com/pylint-dev/pylint .. image:: https://results.pre-commit.ci/badge/github/pylint-dev/pylint/main.svg :target: https://results.pre-commit.ci/latest/github/pylint-dev/pylint/main :alt: pre-commit.ci status .. image:: https://bestpractices.coreinfrastructure.org/projects/6328/badge :target: https://bestpractices.coreinfrastructure.org/projects/6328 :alt: CII Best Practices .. image:: https://img.shields.io/ossf-scorecard/github.com/PyCQA/pylint?label=openssf%20scorecard&style=flat :target: https://api.securityscorecards.dev/projects/github.com/PyCQA/pylint :alt: OpenSSF Scorecard .. image:: https://img.shields.io/discord/825463413634891776.svg :target: https://discord.gg/qYxpadCgkx :alt: Discord What is Pylint? --------------- Pylint is a `static code analyser`_ for Python 2 or 3. The latest version supports Python 3.10.0 and above. .. _`static code analyser`: https://en.wikipedia.org/wiki/Static_code_analysis Pylint analyses your code without actually running it. It checks for errors, enforces a coding standard, looks for `code smells`_, and can make suggestions about how the code could be refactored. .. _`code smells`: https://martinfowler.com/bliki/CodeSmell.html Install ------- .. This is used inside the doc to recover the start of the short text for installation For command line use, pylint is installed with:: pip install pylint Or if you want to also check spelling with ``enchant`` (you might need to `install the enchant C library `_): .. code-block:: sh pip install pylint[spelling] It can also be integrated in most editors or IDEs. More information can be found `in the documentation`_. .. _in the documentation: https://pylint.readthedocs.io/en/latest/user_guide/installation/index.html .. This is used inside the doc to recover the end of the short text for installation What differentiates Pylint? --------------------------- Pylint is not trusting your typing and is inferring the actual values of nodes (for a start because there was no typing when pylint started off) using its internal code representation (astroid). If your code is ``import logging as argparse``, Pylint can check and know that ``argparse.error(...)`` is in fact a logging call and not an argparse call. This makes pylint slower, but it also lets pylint find more issues if your code is not fully typed. [inference] is the killer feature that keeps us using [pylint] in our project despite how painfully slow it is. - `Realist pylint user`_, 2022 .. _`Realist pylint user`: https://github.com/charliermarsh/ruff/issues/970#issuecomment-1381067064 pylint, not afraid of being a little slower than it already is, is also a lot more thorough than other linters. There are more checks, including some opinionated ones that are deactivated by default but can be enabled using configuration. How to use pylint ----------------- Pylint isn't smarter than you: it may warn you about things that you have conscientiously done or check for some things that you don't care about. During adoption, especially in a legacy project where pylint was never enforced, it's best to start with the ``--errors-only`` flag, then disable convention and refactor messages with ``--disable=C,R`` and progressively re-evaluate and re-enable messages as your priorities evolve. Pylint is highly configurable and permits to write plugins in order to add your own checks (for example, for internal libraries or an internal rule). Pylint also has an ecosystem of existing plugins for popular frameworks and third-party libraries. .. note:: Pylint supports the Python standard library out of the box. Third-party libraries are not always supported, so a plugin might be needed. A good place to start is ``PyPI`` which often returns a plugin by searching for ``pylint ``. `pylint-pydantic`_, `pylint-django`_ and `pylint-sonarjson`_ are examples of such plugins. More information about plugins and how to load them can be found at `plugins`_. .. _`plugins`: https://pylint.readthedocs.io/en/latest/development_guide/how_tos/plugins.html#plugins .. _`pylint-pydantic`: https://pypi.org/project/pylint-pydantic .. _`pylint-django`: https://github.com/pylint-dev/pylint-django .. _`pylint-sonarjson`: https://github.com/cnescatlab/pylint-sonarjson-catlab Advised linters alongside pylint -------------------------------- Projects that you might want to use alongside pylint include ruff_ (**really** fast, with builtin auto-fix and a large number of checks taken from popular linters, but implemented in ``rust``) or flake8_ (a framework to implement your own checks in python using ``ast`` directly), mypy_, pyright_ / pylance or pyre_ (typing checks), bandit_ (security oriented checks), black_ and isort_ (auto-formatting), autoflake_ (automated removal of unused imports or variables), pyupgrade_ (automated upgrade to newer python syntax) and pydocstringformatter_ (automated pep257). .. _ruff: https://github.com/astral-sh/ruff .. _flake8: https://github.com/PyCQA/flake8 .. _bandit: https://github.com/PyCQA/bandit .. _mypy: https://github.com/python/mypy .. _pyright: https://github.com/microsoft/pyright .. _pyre: https://github.com/facebook/pyre-check .. _black: https://github.com/psf/black .. _autoflake: https://github.com/myint/autoflake .. _pyupgrade: https://github.com/asottile/pyupgrade .. _pydocstringformatter: https://github.com/DanielNoord/pydocstringformatter .. _isort: https://pycqa.github.io/isort/ Additional tools included in pylint ----------------------------------- Pylint ships with two additional tools: - pyreverse_ (standalone tool that generates package and class diagrams.) - symilar_ (duplicate code finder that is also integrated in pylint) .. _pyreverse: https://pylint.readthedocs.io/en/latest/additional_tools/pyreverse/index.html .. _symilar: https://pylint.readthedocs.io/en/latest/additional_tools/symilar/index.html .. This is used inside the doc to recover the end of the introduction Contributing ------------ .. This is used inside the doc to recover the start of the short text for contribution We welcome all forms of contributions such as updates for documentation, new code, checking issues for duplicates or telling us that we can close them, confirming that issues still exist, `creating issues because you found a bug or want a feature`_, etc. Everything is much appreciated! Please follow the `code of conduct`_ and check `the Contributor Guides`_ if you want to make a code contribution. .. _creating issues because you found a bug or want a feature: https://pylint.readthedocs.io/en/latest/contact.html#bug-reports-feedback .. _code of conduct: https://github.com/pylint-dev/pylint/blob/main/CODE_OF_CONDUCT.md .. _the Contributor Guides: https://pylint.readthedocs.io/en/latest/development_guide/contribute.html .. This is used inside the doc to recover the end of the short text for contribution Show your usage ----------------- You can place this badge in your README to let others know your project uses pylint. .. image:: https://img.shields.io/badge/linting-pylint-yellowgreen :target: https://github.com/pylint-dev/pylint Learn how to add a badge to your documentation in `the badge documentation`_. .. _the badge documentation: https://pylint.readthedocs.io/en/latest/user_guide/installation/badge.html License ------- pylint is, with a few exceptions listed below, `GPLv2 `_. The icon files are licensed under the `CC BY-SA 4.0 `_ license: - `doc/logo.png `_ - `doc/logo.svg `_ Support ------- Please check `the contact information`_. .. _`the contact information`: https://pylint.readthedocs.io/en/latest/contact.html .. |tideliftlogo| image:: https://raw.githubusercontent.com/pylint-dev/pylint/main/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png :width: 200 :alt: Tidelift .. list-table:: :widths: 10 100 * - |tideliftlogo| - Professional support for pylint is available as part of the `Tidelift Subscription`_. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools. .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-pylint?utm_source=pypi-pylint&utm_medium=referral&utm_campaign=readme ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4688742 pylint-4.0.9/README.rst0000644000175100017510000002277115254767617014235 0ustar00runnerrunner`Pylint`_ ========= .. _`Pylint`: https://pylint.readthedocs.io/ .. This is used inside the doc to recover the start of the introduction .. image:: https://github.com/pylint-dev/pylint/actions/workflows/tests.yaml/badge.svg?branch=main :target: https://github.com/pylint-dev/pylint/actions .. image:: https://codecov.io/gh/pylint-dev/pylint/branch/main/graph/badge.svg?token=ZETEzayrfk :target: https://codecov.io/gh/pylint-dev/pylint .. image:: https://img.shields.io/pypi/v/pylint.svg :alt: PyPI Package version :target: https://pypi.python.org/pypi/pylint .. image:: https://readthedocs.org/projects/pylint/badge/?version=latest :target: https://pylint.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black .. image:: https://img.shields.io/badge/linting-pylint-yellowgreen :target: https://github.com/pylint-dev/pylint .. image:: https://results.pre-commit.ci/badge/github/pylint-dev/pylint/main.svg :target: https://results.pre-commit.ci/latest/github/pylint-dev/pylint/main :alt: pre-commit.ci status .. image:: https://bestpractices.coreinfrastructure.org/projects/6328/badge :target: https://bestpractices.coreinfrastructure.org/projects/6328 :alt: CII Best Practices .. image:: https://img.shields.io/ossf-scorecard/github.com/PyCQA/pylint?label=openssf%20scorecard&style=flat :target: https://api.securityscorecards.dev/projects/github.com/PyCQA/pylint :alt: OpenSSF Scorecard .. image:: https://img.shields.io/discord/825463413634891776.svg :target: https://discord.gg/qYxpadCgkx :alt: Discord What is Pylint? --------------- Pylint is a `static code analyser`_ for Python 2 or 3. The latest version supports Python 3.10.0 and above. .. _`static code analyser`: https://en.wikipedia.org/wiki/Static_code_analysis Pylint analyses your code without actually running it. It checks for errors, enforces a coding standard, looks for `code smells`_, and can make suggestions about how the code could be refactored. .. _`code smells`: https://martinfowler.com/bliki/CodeSmell.html Install ------- .. This is used inside the doc to recover the start of the short text for installation For command line use, pylint is installed with:: pip install pylint Or if you want to also check spelling with ``enchant`` (you might need to `install the enchant C library `_): .. code-block:: sh pip install pylint[spelling] It can also be integrated in most editors or IDEs. More information can be found `in the documentation`_. .. _in the documentation: https://pylint.readthedocs.io/en/latest/user_guide/installation/index.html .. This is used inside the doc to recover the end of the short text for installation What differentiates Pylint? --------------------------- Pylint is not trusting your typing and is inferring the actual values of nodes (for a start because there was no typing when pylint started off) using its internal code representation (astroid). If your code is ``import logging as argparse``, Pylint can check and know that ``argparse.error(...)`` is in fact a logging call and not an argparse call. This makes pylint slower, but it also lets pylint find more issues if your code is not fully typed. [inference] is the killer feature that keeps us using [pylint] in our project despite how painfully slow it is. - `Realist pylint user`_, 2022 .. _`Realist pylint user`: https://github.com/charliermarsh/ruff/issues/970#issuecomment-1381067064 pylint, not afraid of being a little slower than it already is, is also a lot more thorough than other linters. There are more checks, including some opinionated ones that are deactivated by default but can be enabled using configuration. How to use pylint ----------------- Pylint isn't smarter than you: it may warn you about things that you have conscientiously done or check for some things that you don't care about. During adoption, especially in a legacy project where pylint was never enforced, it's best to start with the ``--errors-only`` flag, then disable convention and refactor messages with ``--disable=C,R`` and progressively re-evaluate and re-enable messages as your priorities evolve. Pylint is highly configurable and permits to write plugins in order to add your own checks (for example, for internal libraries or an internal rule). Pylint also has an ecosystem of existing plugins for popular frameworks and third-party libraries. .. note:: Pylint supports the Python standard library out of the box. Third-party libraries are not always supported, so a plugin might be needed. A good place to start is ``PyPI`` which often returns a plugin by searching for ``pylint ``. `pylint-pydantic`_, `pylint-django`_ and `pylint-sonarjson`_ are examples of such plugins. More information about plugins and how to load them can be found at `plugins`_. .. _`plugins`: https://pylint.readthedocs.io/en/latest/development_guide/how_tos/plugins.html#plugins .. _`pylint-pydantic`: https://pypi.org/project/pylint-pydantic .. _`pylint-django`: https://github.com/pylint-dev/pylint-django .. _`pylint-sonarjson`: https://github.com/cnescatlab/pylint-sonarjson-catlab Advised linters alongside pylint -------------------------------- Projects that you might want to use alongside pylint include ruff_ (**really** fast, with builtin auto-fix and a large number of checks taken from popular linters, but implemented in ``rust``) or flake8_ (a framework to implement your own checks in python using ``ast`` directly), mypy_, pyright_ / pylance or pyre_ (typing checks), bandit_ (security oriented checks), black_ and isort_ (auto-formatting), autoflake_ (automated removal of unused imports or variables), pyupgrade_ (automated upgrade to newer python syntax) and pydocstringformatter_ (automated pep257). .. _ruff: https://github.com/astral-sh/ruff .. _flake8: https://github.com/PyCQA/flake8 .. _bandit: https://github.com/PyCQA/bandit .. _mypy: https://github.com/python/mypy .. _pyright: https://github.com/microsoft/pyright .. _pyre: https://github.com/facebook/pyre-check .. _black: https://github.com/psf/black .. _autoflake: https://github.com/myint/autoflake .. _pyupgrade: https://github.com/asottile/pyupgrade .. _pydocstringformatter: https://github.com/DanielNoord/pydocstringformatter .. _isort: https://pycqa.github.io/isort/ Additional tools included in pylint ----------------------------------- Pylint ships with two additional tools: - pyreverse_ (standalone tool that generates package and class diagrams.) - symilar_ (duplicate code finder that is also integrated in pylint) .. _pyreverse: https://pylint.readthedocs.io/en/latest/additional_tools/pyreverse/index.html .. _symilar: https://pylint.readthedocs.io/en/latest/additional_tools/symilar/index.html .. This is used inside the doc to recover the end of the introduction Contributing ------------ .. This is used inside the doc to recover the start of the short text for contribution We welcome all forms of contributions such as updates for documentation, new code, checking issues for duplicates or telling us that we can close them, confirming that issues still exist, `creating issues because you found a bug or want a feature`_, etc. Everything is much appreciated! Please follow the `code of conduct`_ and check `the Contributor Guides`_ if you want to make a code contribution. .. _creating issues because you found a bug or want a feature: https://pylint.readthedocs.io/en/latest/contact.html#bug-reports-feedback .. _code of conduct: https://github.com/pylint-dev/pylint/blob/main/CODE_OF_CONDUCT.md .. _the Contributor Guides: https://pylint.readthedocs.io/en/latest/development_guide/contribute.html .. This is used inside the doc to recover the end of the short text for contribution Show your usage ----------------- You can place this badge in your README to let others know your project uses pylint. .. image:: https://img.shields.io/badge/linting-pylint-yellowgreen :target: https://github.com/pylint-dev/pylint Learn how to add a badge to your documentation in `the badge documentation`_. .. _the badge documentation: https://pylint.readthedocs.io/en/latest/user_guide/installation/badge.html License ------- pylint is, with a few exceptions listed below, `GPLv2 `_. The icon files are licensed under the `CC BY-SA 4.0 `_ license: - `doc/logo.png `_ - `doc/logo.svg `_ Support ------- Please check `the contact information`_. .. _`the contact information`: https://pylint.readthedocs.io/en/latest/contact.html .. |tideliftlogo| image:: https://raw.githubusercontent.com/pylint-dev/pylint/main/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png :width: 200 :alt: Tidelift .. list-table:: :widths: 10 100 * - |tideliftlogo| - Professional support for pylint is available as part of the `Tidelift Subscription`_. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools. .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-pylint?utm_source=pypi-pylint&utm_medium=referral&utm_campaign=readme ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4912927 pylint-4.0.9/doc/0000755000175100017510000000000015254767631013276 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4696202 pylint-4.0.9/doc/Makefile0000644000175100017510000000323415254767617014744 0ustar00runnerrunner# You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) # -------------------------------- # This part is specific to pylint. #--------------------------------- # Set PYLINT_SPHINX_FATAL_WARNINGS= on the command line to restore the default. PYLINT_SPHINX_FATAL_WARNINGS = -W --keep-going # Do not use O, we abuse it for internal purposes. O = -d $(BUILDDIR)/doctrees -T $(PYLINT_SPHINX_FATAL_WARNINGS) -n .PHONY clean: remove-generated-messages remove-generated-messages: rm -rf user_guide/messages/convention user_guide/messages/error \ user_guide/messages/fatal user_guide/messages/information user_guide/messages/refactor \ user_guide/messages/warning # Generated by exts/*.py but kept in the VCS for easier review of changes: .PHONY: distclean distclean: clean rm -f user_guide/checkers/extensions.rst user_guide/checkers/features.rst \ user_guide/configuration/all-options.rst user_guide/messages/messages_overview.rst # Set PIP=true on the command line to skip installation of dependencies. PIP = pip .PHONY html: install-dependencies install-dependencies: @echo "Install dependencies" cd ../ && $(PIP) install -r doc/requirements.txt ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.3966186 pylint-4.0.9/doc/additional_tools/0000755000175100017510000000000015254767631016626 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4916415 pylint-4.0.9/doc/additional_tools/pyreverse/0000755000175100017510000000000015254767631020652 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4698048 pylint-4.0.9/doc/additional_tools/pyreverse/configuration.rst0000644000175100017510000001110215254767617024252 0ustar00runnerrunner.. This file is auto-generated. Make any changes to the associated .. docs extension in 'doc/exts/pyreverse_configuration.py'. Usage ##### ``pyreverse`` is run from the command line using the following syntax:: pyreverse [options] where ```` is one or more Python packages or modules to analyze. The available options are organized into the following categories: * :ref:`filtering-and-scope` - Control which classes and relationships appear in your diagrams * :ref:`display-options` - Customize the visual appearance including colors and labels * :ref:`output-control` - Select output formats and set the destination directory * :ref:`project-configuration` - Define project settings like source roots and ignored files .. _filtering-and-scope: Filtering and Scope =================== --all-ancestors --------------- *Show all ancestors of all classes in .* **Default:** ``None`` --all-associated ---------------- *Show all classes associated with the target classes, including indirect associations.* **Default:** ``None`` --class ------- *Create a class diagram with all classes related to ; this uses by default the options -ASmy* **Default:** ``None`` --filter-mode ------------- *Filter attributes and functions according to . Correct modes are: 'PUB_ONLY' filter all non public attributes [DEFAULT], equivalent to PRIVATE+SPECIAL 'ALL' no filter 'SPECIAL' filter Python special functions except constructor 'OTHER' filter protected and private attributes* **Default:** ``PUB_ONLY`` --max-depth ----------- *Maximum depth of packages/modules to include in the diagram, relative to the deepest specified package. A depth of 0 shows only the specified packages/modules, while 1 includes their immediate children, etc. When specifying nested packages, depth is calculated from the deepest package level. If not specified, all packages/modules in the hierarchy are shown.* **Default:** ``None`` --show-ancestors ---------------- *Show generations of ancestor classes not in .* **Default:** ``None`` --show-associated ----------------- *Show levels of associated classes not in .* **Default:** ``None`` --show-builtin -------------- *Include builtin objects in representation of classes.* **Default:** ``False`` --show-stdlib ------------- *Include standard library objects in representation of classes.* **Default:** ``False`` .. _display-options: Display Options =============== --color-palette --------------- *Comma separated list of colors to use for the package depth coloring.* **Default:** ``('#77AADD', '#99DDFF', '#44BB99', '#BBCC33', '#AAAA00', '#EEDD88', '#EE8866', '#FFAABB', '#DDDDDD')`` --colorized ----------- *Use colored output. Classes/modules of the same package get the same color.* **Default:** ``False`` --max-color-depth ----------------- *Use separate colors up to package depth of . Higher depths will reuse colors.* **Default:** ``2`` --module-names -------------- *Include module name in the representation of classes.* **Default:** ``None`` --no-standalone --------------- *Only show nodes with connections.* **Default:** ``False`` --only-classnames ----------------- *Don't show attributes and methods in the class boxes; this disables -f values.* **Default:** ``False`` .. _output-control: Output Control ============== --output -------- *Create a *. output file if format is available. Available formats are: .dot, .puml, .plantuml, .mmd, .html. Any other format will be tried to be created by using the 'dot' command line tool, which requires a graphviz installation. In this case, these additional formats are available (see `Graphviz output formats `_).* **Default:** ``dot`` --output-directory ------------------ *Set the output directory path.* **Default:** ``""`` .. _project-configuration: Project Configuration ===================== --ignore -------- *Files or directories to be skipped. They should be base names, not paths.* **Default:** ``('CVS',)`` --project --------- *Set the project name. This will later be appended to the output file names.* **Default:** ``""`` --source-roots -------------- *Add paths to the list of the source roots. Supports globbing patterns. The source root is an absolute path or a path relative to the current working directory used to determine a package namespace for modules located under the source root.* **Default:** ``()`` --verbose --------- *Makes pyreverse more verbose/talkative. Mostly useful for debugging.* **Default:** ``False`` ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4698927 pylint-4.0.9/doc/additional_tools/pyreverse/index.rst0000644000175100017510000000202715254767617022520 0ustar00runnerrunner.. _pyreverse: ========= Pyreverse ========= ``pyreverse`` is a powerful tool that creates UML diagrams from your Python code. It helps you visualize: - Package dependencies and structure - Class hierarchies and relationships - Method and attribute organization Output Formats ============== ``pyreverse`` supports multiple output formats: * Native formats: * ``.dot``/``.gv`` (Graphviz) * ``.puml``/``.plantuml`` (PlantUML) * ``.mmd``/``.html`` (MermaidJS) * Additional formats (requires Graphviz installation): * All `Graphviz output formats `_ (PNG, SVG, PDF, etc.) * ``pyreverse`` first generates a temporary ``.gv`` file, which is then fed to Graphviz to generate the final image Getting Started =============== Check out the :doc:`configuration` guide to learn about available options, or see :doc:`output_examples` for sample diagrams and common use cases. .. toctree:: :maxdepth: 2 :caption: Pyreverse :titlesonly: :hidden: configuration output_examples ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4698927 pylint-4.0.9/doc/additional_tools/pyreverse/output_examples.rst0000644000175100017510000000241615254767617024651 0ustar00runnerrunnerExample Output ############## Example diagrams generated with the ``.puml`` output format are shown below. Package Diagram ............... .. image:: ../../media/pyreverse_example_packages.png :width: 344 :height: 177 :alt: Package diagram generated by pyreverse :align: center Class Diagram ............. .. image:: ../../media/pyreverse_example_classes.png :width: 625 :height: 589 :alt: Class diagram generated by pyreverse :align: center Creating Class Diagrams for Specific Classes '''''''''''''''''''''''''''''''''''''''''''' In many cases creating a single diagram depicting all classes in the project yields a rather unwieldy, giant diagram. While limiting the input path to a single package or module can already help greatly to narrow down the scope, the ``-c`` option provides another way to create a class diagram focusing on a single class and its collaborators. For example, running:: pyreverse -ASmy -c pylint.checkers.classes.ClassChecker pylint will generate the full class and package diagrams for ``pylint``, but will additionally generate a file ``pylint.checkers.classes.ClassChecker.dot``: .. image:: ../../media/ClassChecker_diagram.png :width: 757 :height: 1452 :alt: Package diagram generated by pyreverse :align: center ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4918592 pylint-4.0.9/doc/additional_tools/symilar/0000755000175100017510000000000015254767631020306 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4698927 pylint-4.0.9/doc/additional_tools/symilar/index.rst0000644000175100017510000000225215254767617022154 0ustar00runnerrunner.. _symilar: Symilar ------- The console script ``symilar`` finds copy pasted block of text in a set of files. It provides a command line interface to check only the ``duplicate-code`` message. It can be invoked with:: symilar [-d|--duplicates min_duplicated_lines] [-i|--ignore-comments] [--ignore-docstrings] [--ignore-imports] [--ignore-signatures] file1... All files that shall be checked have to be passed in explicitly, e.g.:: symilar foo.py, bar.py, subpackage/spam.py, subpackage/eggs.py ``symilar`` produces output like the following:: 17 similar lines in 2 files ==tests/data/clientmodule_test.py:3 ==tests/data/suppliermodule_test.py:12 class Ancestor: """ Ancestor method """ cls_member = DoNothing() def __init__(self, value): local_variable = 0 self.attr = 'this method shouldn\'t have a docstring' self.__value = value def get_value(self): """ nice docstring ;-) """ return self.__value def set_value(self, value): self.__value = value return 'this method shouldn\'t have a docstring' TOTAL lines=58 duplicates=17 percent=29.31 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4698927 pylint-4.0.9/doc/conf.py0000644000175100017510000002665615254767617014620 0ustar00runnerrunner# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE # Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt from __future__ import annotations import os import sys from datetime import datetime # Pylint documentation build configuration file, created by # sphinx-quickstart on Thu Apr 4 20:31:25 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use 'os.path.abspath' to make it absolute, like shown here. sys.path.append(os.path.abspath("exts")) sys.path.append(os.path.abspath("..")) # pylint: disable=wrong-import-position from pylint import __version__ from pylint.__pkginfo__ import numversion # pylint: enable=wrong-import-position # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ "pylint_features", "pylint_extensions", "pylint_messages", "pylint_options", "pyreverse_configuration", "sphinx.ext.autosectionlabel", "sphinx.ext.intersphinx", "sphinx_reredirects", ] # Single file redirects are handled in this file and can be done by a pylint # contributor. We use the following extension: # https://documatt.gitlab.io/sphinx-reredirects/usage.html # Directory redirects are handled in ReadTheDoc admin interface and can only be done # by pylint maintainers at the following URL: # https://readthedocs.org/dashboard/pylint/redirects/ redirects: dict[str, str] = { # "": "" "additional_commands/index": "../index.html", "development_guide/index": "api/index.html", "development_guide/contribute": "../development_guide/contributor_guide/index.html", "development_guide/contributor_guide": "contributor_guide/index.html", "development_guide/profiling": "../development_guide/contributor_guide/profiling.html", "development_guide/tests/index": "../contributor_guide/tests/index.html", "development_guide/tests/install": "../contributor_guide/tests/install.html", "development_guide/tests/launching_test": "../contributor_guide/tests/launching_test.html", # There was a typo in the original file, don't fix. "development_guide/tests/writting_test": "../contributor_guide/tests/writing_test.html", "development/testing": "tests/index.html", "how_tos/custom_checkers": "../development_guide/how_tos/custom_checkers.html", "how_tos/index": "../development_guide/how_tos/index.html", "how_tos/plugins": "../development_guide/how_tos/plugins.html", "how_tos/transform_plugins": "../development_guide/how_tos/transform_plugins.html", "intro": "index.html", "messages/messages_introduction": "../user_guide/messages/index.html", "messages/messages_list": "../user_guide/messages/messages_overview.html", "support": "contact.html", "technical_reference/c_extensions": "../user_guide/messages/error/no-member.html", "technical_reference/extensions": "../user_guide/checkers/extensions.html", "technical_reference/checkers": "../development_guide/technical_reference/checkers.html", "technical_reference/features": "../user_guide/checkers/features.html", "technical_reference/index": "../development_guide/technical_reference/index.html", "technical_reference/startup": "../development_guide/technical_reference/startup.html", "user_guide/configuration/naming-styles": "../user_guide/messages/convention/invalid-name.html", "user_guide/ide_integration/flymake-emacs": "../installation/ide_integration/flymake-emacs.html", "user_guide/ide_integration/ide-integration": "../installation/ide_integration/index.html", "user_guide/ide-integration": "installation.html", "user_guide/ide_integration/textmate": "../installation/ide_integration/textmate.html", "user_guide/index": "installation/index.html", "user_guide/message-control": "messages/message_control.html", "user_guide/options": "configuration/all-options.html", "user_guide/output": "usage/output.html", "user_guide/pre-commit-integration": "installation/pre-commit-integration.html", "user_guide/run": "usage/run.html", "pyreverse": "additional_tools/pyreverse/index.html", "symilar": "additional_tools/symilar/index.html", } # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix of source filenames. source_suffix = ".rst" # The encoding of source files. # source_encoding = 'utf-8-sig' # The root toctree document. root_doc = "index" # General information about the project. project = "Pylint" current_year = datetime.utcnow().year contributors = "Logilab and Pylint contributors" copyright = f"2003-{current_year}, {contributors}" # pylint: disable=redefined-builtin # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # The short X.Y version. version = f"{numversion[0]}.{numversion[1]}" # The full version, including alpha/beta/rc tags. release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ["_build", "data/**", "whatsnew/fragments"] # The reST default role (used for this markup: `text`) to use for all documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "furo" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # Currently we use the default Furo configuration # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = "%b %d, %Y" smartquotes = False # Custom sidebar templates, maps document names to template names. # Currently we use the default Furo Sidebar # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = "Pylintdoc" # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). # latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). # latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ( "index", "Pylint.tex", "Pylint Documentation", contributors, "manual", ) ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Additional stuff for the LaTeX preamble. # latex_preamble = '' # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [("index", "pylint", "Pylint Documentation", [contributors], 1)] # pylint: disable-next=consider-using-namedtuple-or-dataclass intersphinx_mapping = { "astroid": ("https://pylint.readthedocs.io/projects/astroid/en/latest/", None), "python": ("https://docs.python.org/3", None), } # Prevent label issues due to colliding section names # through including multiple documents autosectionlabel_prefix_document = True # Permit duplicated titles in the resulting document. # See https://github.com/pylint-dev/pylint/issues/7362#issuecomment-1256932866 autosectionlabel_maxdepth = 2 linkcheck_ignore = [ "https://github.com/pylint-dev/pylint/blob/main/pylint/extensions/.*" ] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4698927 pylint-4.0.9/doc/contact.rst0000644000175100017510000000317315254767617015473 0ustar00runnerrunnerContact ======= Bug reports, feedback --------------------- .. _bug reports, feedback: You think you have found a bug in Pylint? Well, this may be the case since Pylint and Python are under heavy development! Please take the time to check if it is already in the issue tracker at https://github.com/pylint-dev/pylint Note that the issue might also be reported in one of Pylint's major dependencies, astroid: * https://github.com/pylint-dev/astroid Discord server -------------- You can discuss your problem using the discord server: https://discord.com/invite/Egy6P8AMB5 Mailing lists ------------- .. _Mailing lists: The code-quality mailing list is shared with other tools that aim at improving the quality of python code. You can subscribe to this mailing list at https://mail.python.org/mailman3/lists/code-quality.python.org/ Archives are available at https://mail.python.org/pipermail/code-quality/ Archives before April 2013 are not available anymore. At https://mail.python.org/pipermail/ it was under ``python-projects``. Support ------- .. image:: media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png :height: 150 :alt: Tidelift :align: left :class: tideliftlogo Professional support for pylint is available as part of the `Tidelift Subscription`_. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools. .. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-pylint?utm_source=pypi-pylint&utm_medium=referral&utm_campaign=readme ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4919777 pylint-4.0.9/doc/data/0000755000175100017510000000000015254767631014207 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4406185 pylint-4.0.9/doc/data/messages/0000755000175100017510000000000015254767631016016 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.3986185 pylint-4.0.9/doc/data/messages/a/0000755000175100017510000000000015254767631016236 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4921973 pylint-4.0.9/doc/data/messages/a/abstract-class-instantiated/0000755000175100017510000000000015254767631023631 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4701388 pylint-4.0.9/doc/data/messages/a/abstract-class-instantiated/bad.py0000644000175100017510000000022715254767617024736 0ustar00runnerrunnerimport abc class Animal(abc.ABC): @abc.abstractmethod def make_sound(self): pass sheep = Animal() # [abstract-class-instantiated] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470194 pylint-4.0.9/doc/data/messages/a/abstract-class-instantiated/good.py0000644000175100017510000000027715254767617025145 0ustar00runnerrunnerimport abc class Animal(abc.ABC): @abc.abstractmethod def make_sound(self): pass class Sheep(Animal): def make_sound(self): print("bhaaaaa") sheep = Sheep() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.3976185 pylint-4.0.9/doc/data/messages/a/abstract-method/0000755000175100017510000000000015254767631021317 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.492517 pylint-4.0.9/doc/data/messages/a/abstract-method/bad/0000755000175100017510000000000015254767631022045 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4702396 pylint-4.0.9/doc/data/messages/a/abstract-method/bad/abstract_method.py0000644000175100017510000000023115254767617025562 0ustar00runnerrunnerimport abc class WildAnimal: @abc.abstractmethod def make_sound(self): pass class Panther(WildAnimal): # [abstract-method] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4702845 pylint-4.0.9/doc/data/messages/a/abstract-method/bad/function_raising_not_implemented_error.py0000644000175100017510000000016715254767617032444 0ustar00runnerrunnerclass Pet: def make_sound(self): raise NotImplementedError class Cat(Pet): # [abstract-method] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4927537 pylint-4.0.9/doc/data/messages/a/abstract-method/good/0000755000175100017510000000000015254767631022247 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4702845 pylint-4.0.9/doc/data/messages/a/abstract-method/good/abstract_method.py0000644000175100017510000000025515254767617025772 0ustar00runnerrunnerimport abc class WildAnimal: @abc.abstractmethod def make_sound(self): pass class Panther(WildAnimal): def make_sound(self): print("MEEEOW") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4703434 pylint-4.0.9/doc/data/messages/a/abstract-method/good/function_raising_not_implemented_error.py0000644000175100017510000000021315254767617032636 0ustar00runnerrunnerclass Pet: def make_sound(self): raise NotImplementedError class Cat(Pet): def make_sound(self): print("Meeeow") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4929838 pylint-4.0.9/doc/data/messages/a/access-member-before-definition/0000755000175100017510000000000015254767631024332 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4703434 pylint-4.0.9/doc/data/messages/a/access-member-before-definition/bad.py0000644000175100017510000000036315254767617025440 0ustar00runnerrunnerclass Unicorn: def __init__(self, fluffiness_level): if self.fluffiness_level > 9000: # [access-member-before-definition] print("It's OVER-FLUFFYYYY ! *crush glasses*") self.fluffiness_level = fluffiness_level ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4704075 pylint-4.0.9/doc/data/messages/a/access-member-before-definition/good.py0000644000175100017510000000031615254767617025640 0ustar00runnerrunnerclass Unicorn: def __init__(self, fluffiness_level): self.fluffiness_level = fluffiness_level if self.fluffiness_level > 9000: print("It's OVER-FLUFFYYYY ! *crush glasses*") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4933238 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/0000755000175100017510000000000015254767631024075 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4704075 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/bad.py0000644000175100017510000000004015254767617025173 0ustar00runnerrunnerstring = "\z" # [syntax-error] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470472 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/details.rst0000644000175100017510000000053315254767617026261 0ustar00runnerrunner``\z`` is same as ``\\z`` because there's no escape sequence for ``z``. But it is not clear for the reader of the code. The only reason this is demonstrated to raise ``syntax-error`` is because pylint's CI now runs on Python 3.12, where this truly raises a ``SyntaxError``. We hope to address this discrepancy in the documentation in the future. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4936545 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/good/0000755000175100017510000000000015254767631025025 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470472 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/good/double_escape.py0000644000175100017510000000001715254767617030173 0ustar00runnerrunnerstring = "\\z" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4705327 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/good/existing_escape_sequence.py0000644000175100017510000000001615254767617032442 0ustar00runnerrunnerstring = "\t" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4705327 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/good/r_prefix.py0000644000175100017510000000001715254767617027217 0ustar00runnerrunnerstring = r"\z" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4705327 pylint-4.0.9/doc/data/messages/a/anomalous-backslash-in-string/related.rst0000644000175100017510000000031615254767617026253 0ustar00runnerrunner- `String and Bytes literals `_ - `Long form stackoverflow explanation `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4938684 pylint-4.0.9/doc/data/messages/a/anomalous-unicode-escape-in-string/0000755000175100017510000000000015254767631025026 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4705327 pylint-4.0.9/doc/data/messages/a/anomalous-unicode-escape-in-string/bad.py0000644000175100017510000000005315254767617026130 0ustar00runnerrunnerprint(b"\u%b" % b"0394") # [syntax-error] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4706354 pylint-4.0.9/doc/data/messages/a/anomalous-unicode-escape-in-string/good.py0000644000175100017510000000003215254767617026327 0ustar00runnerrunnerprint(b"\\u%b" % b"0394") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4941099 pylint-4.0.9/doc/data/messages/a/arguments-differ/0000755000175100017510000000000015254767631021500 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4706354 pylint-4.0.9/doc/data/messages/a/arguments-differ/bad.py0000644000175100017510000000037315254767617022607 0ustar00runnerrunnerclass Drink: def mix(self, fluid_one, fluid_two): return fluid_one + fluid_two class Cocktail(Drink): def mix(self, fluid_one, fluid_two, alcoholic_fluid): # [arguments-differ] return fluid_one + fluid_two + alcoholic_fluid ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4707055 pylint-4.0.9/doc/data/messages/a/arguments-differ/details.rst0000644000175100017510000000065215254767617023666 0ustar00runnerrunner``argument-differ`` denotes an issue with the Liskov Substitution Principle. This means that the code in question violates an important design principle which does not have one single solution. We recommend to search online for the best solution in your case. To give some examples of potential solutions: * Add the argument to the parent class * Remove the inheritance completely * Add default arguments to the child class ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4943495 pylint-4.0.9/doc/data/messages/a/arguments-differ/good/0000755000175100017510000000000015254767631022430 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4707055 pylint-4.0.9/doc/data/messages/a/arguments-differ/good/add_option_in_base_class.py0000644000175100017510000000134315254767617027774 0ustar00runnerrunner""" Here we assume that drink and cocktail are the same thing and should actually inherit from each over. We also assume that 'Drink' are 'Cocktail' without alcohol (we added the alcohol option in the base class). This permit to not have to modify the cocktails calls downstream but the case where an alcohol is mixed in a soft drink will need to be handled. """ class Drink: def mix(self, fluid_one, fluid_two, alcoholic_fluid=None): # if alcoholic_fluid is not None: # raise Exception(f"This soft drink has {alcoholic_fluid} in it !") return fluid_one + fluid_two class Cocktail(Drink): def mix(self, fluid_one, fluid_two, alcoholic_fluid): return fluid_one + fluid_two + alcoholic_fluid ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470814 pylint-4.0.9/doc/data/messages/a/arguments-differ/good/default_value.py0000644000175100017510000000111415254767617025623 0ustar00runnerrunner""" Here we assume that drink and cocktail are the same thing and should actually inherit from each over. We also assume that any Cocktail can be treated like a Drink (if you add beer to it). This permit to not have to modify the calls downstream and causes the least amount of disturbance at the cost of making cocktails beer-based implicitly. """ class Drink: def mix(self, fluid_one, fluid_two): return fluid_one + fluid_two class Cocktail(Drink): def mix(self, fluid_one, fluid_two, alcoholic_fluid="Beer"): return fluid_one + fluid_two + alcoholic_fluid ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470814 pylint-4.0.9/doc/data/messages/a/arguments-differ/good/no_inheritance.py0000644000175100017510000000120615254767617025772 0ustar00runnerrunner""" Here we assume that 'Drink' and 'Cocktail' are different things and should not be treated together like if they were the same thing. This will force some downstream changes and force the API user to make a conscious decision about the alcoholic content of its drink when using the API. For example, it's impossible to create a mojito with beer without explicitly wanting to, or to add an alcohol to a soft-drink. """ class Drink: def mix(self, fluid_one, fluid_two): return fluid_one + fluid_two class Cocktail: def mix(self, fluid_one, fluid_two, alcoholic_fluid): return fluid_one + fluid_two + alcoholic_fluid ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470814 pylint-4.0.9/doc/data/messages/a/arguments-differ/related.rst0000644000175100017510000000014115254767617023652 0ustar00runnerrunner- `Liskov Substitution Principle `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4945135 pylint-4.0.9/doc/data/messages/a/arguments-out-of-order/0000755000175100017510000000000015254767631022563 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.470814 pylint-4.0.9/doc/data/messages/a/arguments-out-of-order/bad.py0000644000175100017510000000056515254767617023675 0ustar00runnerrunnerdef function_3_args(first_argument, second_argument, third_argument): """Three arguments function""" return first_argument, second_argument, third_argument def args_out_of_order(): first_argument = 1 second_argument = 2 third_argument = 3 function_3_args( # [arguments-out-of-order] first_argument, third_argument, second_argument ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4709253 pylint-4.0.9/doc/data/messages/a/arguments-out-of-order/good.py0000644000175100017510000000051315254767617024070 0ustar00runnerrunnerdef function_3_args(first_argument, second_argument, third_argument): """Three arguments function""" return first_argument, second_argument, third_argument def args_out_of_order(): first_argument = 1 second_argument = 2 third_argument = 3 function_3_args(first_argument, second_argument, third_argument) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4946764 pylint-4.0.9/doc/data/messages/a/arguments-renamed/0000755000175100017510000000000015254767631021654 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4709253 pylint-4.0.9/doc/data/messages/a/arguments-renamed/bad.py0000644000175100017510000000062015254767617022756 0ustar00runnerrunnerclass Fruit: def brew(self, ingredient_name: str): print(f"Brewing a {type(self)} with {ingredient_name}") class Apple(Fruit): ... class Orange(Fruit): def brew(self, flavor: str): # [arguments-renamed] print(f"Brewing an orange with {flavor}") for fruit, ingredient_name in [[Orange(), "thyme"], [Apple(), "cinnamon"]]: fruit.brew(ingredient_name=ingredient_name) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4709902 pylint-4.0.9/doc/data/messages/a/arguments-renamed/good.py0000644000175100017510000000061315254767617023162 0ustar00runnerrunnerclass Fruit: def brew(self, ingredient_name: str): print(f"Brewing a {type(self)} with {ingredient_name}") class Apple(Fruit): ... class Orange(Fruit): def brew(self, ingredient_name: str): print(f"Brewing an orange with {ingredient_name}") for fruit, ingredient_name in [[Orange(), "thyme"], [Apple(), "cinnamon"]]: fruit.brew(ingredient_name=ingredient_name) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4951992 pylint-4.0.9/doc/data/messages/a/assert-on-string-literal/0000755000175100017510000000000015254767631023107 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4709902 pylint-4.0.9/doc/data/messages/a/assert-on-string-literal/bad.py0000644000175100017510000000015715254767617024216 0ustar00runnerrunnerdef test_division(): a = 9 / 3 assert "No ZeroDivisionError were raised" # [assert-on-string-literal] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4710574 pylint-4.0.9/doc/data/messages/a/assert-on-string-literal/details.rst0000644000175100017510000000033315254767617025271 0ustar00runnerrunnerDirectly asserting a string literal will always pass. The solution is to test something that could fail, or not assert at all. For ``unittest`` assertions there is the similar :ref:`redundant-unittest-assert` message. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4710574 pylint-4.0.9/doc/data/messages/a/assert-on-string-literal/good.py0000644000175100017510000000006515254767617024416 0ustar00runnerrunnerdef test_division(): a = 9 / 3 assert a == 3 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4710574 pylint-4.0.9/doc/data/messages/a/assert-on-string-literal/related.rst0000644000175100017510000000045215254767617025266 0ustar00runnerrunner- `Tests without assertion `_ - `Testing that there is no error raised `_ - `Parametrizing conditional raising `_ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.495537 pylint-4.0.9/doc/data/messages/a/assert-on-tuple/0000755000175100017510000000000015254767631021300 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4710574 pylint-4.0.9/doc/data/messages/a/assert-on-tuple/bad.py0000644000175100017510000000004615254767617022404 0ustar00runnerrunnerassert (1, None) # [assert-on-tuple] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4711618 pylint-4.0.9/doc/data/messages/a/assert-on-tuple/details.rst0000644000175100017510000000033615254767617023465 0ustar00runnerrunnerDirectly asserting a non-empty tuple will always pass. The solution is to test something that could fail, or not assert at all. For ``unittest`` assertions there is the similar :ref:`redundant-unittest-assert` message. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4711618 pylint-4.0.9/doc/data/messages/a/assert-on-tuple/good.py0000644000175100017510000000004315254767617022603 0ustar00runnerrunnerx, y = (1, None) assert x assert y ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4957645 pylint-4.0.9/doc/data/messages/a/assigning-non-slot/0000755000175100017510000000000015254767631021767 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4711618 pylint-4.0.9/doc/data/messages/a/assigning-non-slot/bad.py0000644000175100017510000000033115254767617023070 0ustar00runnerrunnerclass Student: __slots__ = ("name",) def __init__(self, name, surname): self.name = name self.surname = surname # [assigning-non-slot] self.setup() def setup(self): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4712443 pylint-4.0.9/doc/data/messages/a/assigning-non-slot/good.py0000644000175100017510000000031315254767617023272 0ustar00runnerrunnerclass Student: __slots__ = ("name", "surname") def __init__(self, name, surname): self.name = name self.surname = surname self.setup() def setup(self): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4959865 pylint-4.0.9/doc/data/messages/a/assignment-from-no-return/0000755000175100017510000000000015254767631023276 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4712443 pylint-4.0.9/doc/data/messages/a/assignment-from-no-return/bad.py0000644000175100017510000000012515254767617024400 0ustar00runnerrunnerdef add(x, y): print(x + y) value = add(10, 10) # [assignment-from-no-return] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4713047 pylint-4.0.9/doc/data/messages/a/assignment-from-no-return/good.py0000644000175100017510000000006615254767617024606 0ustar00runnerrunnerdef add(x, y): return x + y value = add(10, 10) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4962056 pylint-4.0.9/doc/data/messages/a/assignment-from-none/0000755000175100017510000000000015254767631022304 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4713047 pylint-4.0.9/doc/data/messages/a/assignment-from-none/bad.py0000644000175100017510000000011315254767617023403 0ustar00runnerrunnerdef function(): return None f = function() # [assignment-from-none] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4713664 pylint-4.0.9/doc/data/messages/a/assignment-from-none/good.py0000644000175100017510000000010615254767617023607 0ustar00runnerrunnerdef function(): return None f = function() if function() else 1 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.496316 pylint-4.0.9/doc/data/messages/a/astroid-error/0000755000175100017510000000000015254767631021032 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4713664 pylint-4.0.9/doc/data/messages/a/astroid-error/details.rst0000644000175100017510000000023015254767617023210 0ustar00runnerrunnerThis is a message linked to an internal problem in pylint. There's nothing to change in your code, but maybe in pylint's configuration or installation. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4966652 pylint-4.0.9/doc/data/messages/a/async-context-manager-with-regular-with/0000755000175100017510000000000015254767631026026 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4713664 pylint-4.0.9/doc/data/messages/a/async-context-manager-with-regular-with/bad.py0000644000175100017510000000033515254767617027133 0ustar00runnerrunnerfrom contextlib import asynccontextmanager @asynccontextmanager async def async_context(): yield with async_context(): # [async-context-manager-with-regular-with] print("This will cause an error at runtime") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4714801 pylint-4.0.9/doc/data/messages/a/async-context-manager-with-regular-with/good.py0000644000175100017510000000032015254767617027327 0ustar00runnerrunnerimport asyncio from contextlib import asynccontextmanager @asynccontextmanager async def async_context(): yield async def main(): async with async_context(): print("This works correctly") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4714801 pylint-4.0.9/doc/data/messages/a/async-context-manager-with-regular-with/related.rst0000644000175100017510000000032115254767617030200 0ustar00runnerrunner- `PEP 492 - Coroutines with async and await syntax `_ - `contextlib.asynccontextmanager `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4969397 pylint-4.0.9/doc/data/messages/a/attribute-defined-outside-init/0000755000175100017510000000000015254767631024250 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4714801 pylint-4.0.9/doc/data/messages/a/attribute-defined-outside-init/bad.py0000644000175100017510000000015515254767617025355 0ustar00runnerrunnerclass Student: def register(self): self.is_registered = True # [attribute-defined-outside-init] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4715636 pylint-4.0.9/doc/data/messages/a/attribute-defined-outside-init/good.py0000644000175100017510000000020515254767617025553 0ustar00runnerrunnerclass Student: def __init__(self): self.is_registered = False def register(self): self.is_registered = True ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.497302 pylint-4.0.9/doc/data/messages/a/await-outside-async/0000755000175100017510000000000015254767631022130 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4715636 pylint-4.0.9/doc/data/messages/a/await-outside-async/bad.py0000644000175100017510000000012115254767617023226 0ustar00runnerrunnerimport asyncio def main(): await asyncio.sleep(1) # [await-outside-async] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.471627 pylint-4.0.9/doc/data/messages/a/await-outside-async/good.py0000644000175100017510000000007615254767617023441 0ustar00runnerrunnerimport asyncio async def main(): await asyncio.sleep(1) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.471627 pylint-4.0.9/doc/data/messages/a/await-outside-async/related.rst0000644000175100017510000000010215254767617024277 0ustar00runnerrunner- `PEP 492 `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4016185 pylint-4.0.9/doc/data/messages/b/0000755000175100017510000000000015254767631016237 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4976485 pylint-4.0.9/doc/data/messages/b/bad-builtin/0000755000175100017510000000000015254767631020431 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4716935 pylint-4.0.9/doc/data/messages/b/bad-builtin/bad.py0000644000175100017510000000012015254767617021526 0ustar00runnerrunnernumbers = list(map(lambda x: 2 * x, [1, 2, 3])) # [bad-builtin] print(numbers) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4717417 pylint-4.0.9/doc/data/messages/b/bad-builtin/good.py0000644000175100017510000000006415254767617021737 0ustar00runnerrunnernumbers = [2 * x for x in [1, 2, 3]] print(numbers) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4717417 pylint-4.0.9/doc/data/messages/b/bad-builtin/pylintrc0000644000175100017510000000006415254767617022224 0ustar00runnerrunner[MAIN] load-plugins = pylint.extensions.bad_builtin ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4977672 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/0000755000175100017510000000000015254767631022526 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.497987 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/bad/0000755000175100017510000000000015254767631023254 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4718096 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/bad/parrot.py0000644000175100017510000000037615254767617025147 0ustar00runnerrunnershop = { # animal: (specie, descriptions) "parrot": ("Norvegian blue", ("restin'", "remarkable", "beautiful plumage")), } if "parrot" in shop is "restin'": # [bad-chained-comparison] print("Hellooooo, Pooolllllyyy ! WAAAAKEEY, WAKKEEEY !") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4718552 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/bad/xor.py0000644000175100017510000000033615254767617024444 0ustar00runnerrunnerdef xor_check(*, left=None, right=None): if left is None != right is None: # [bad-chained-comparison] raise ValueError( "Either both left= and right= need to be provided or none should." ) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.498214 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/good/0000755000175100017510000000000015254767631023456 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4718552 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/good/parrot.py0000644000175100017510000000037015254767617025343 0ustar00runnerrunnershop = { # animal: (specie, descriptions) "parrot": ("Norvegian blue", ("restin'", "remarkable", "beautiful plumage")), } if "parrot" in shop and "restin'" in shop["parrot"][1]: print("Hellooooo, Pooolllllyyy ! WAAAAKEEY, WAKKEEEY !") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4719162 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/good/xor.py0000644000175100017510000000030615254767617024643 0ustar00runnerrunnerdef xor_check(*, left=None, right=None): if (left is None) != (right is None): raise ValueError( "Either both left= and right= need to be provided or none should." ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4719162 pylint-4.0.9/doc/data/messages/b/bad-chained-comparison/related.rst0000644000175100017510000000013415254767617024702 0ustar00runnerrunner- `Comparison Chaining `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4983916 pylint-4.0.9/doc/data/messages/b/bad-classmethod-argument/0000755000175100017510000000000015254767631023111 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4719162 pylint-4.0.9/doc/data/messages/b/bad-classmethod-argument/bad.py0000644000175100017510000000015615254767617024217 0ustar00runnerrunnerclass Klass: @classmethod def get_instance(self): # [bad-classmethod-argument] return self() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4720018 pylint-4.0.9/doc/data/messages/b/bad-classmethod-argument/good.py0000644000175100017510000000011615254767617024415 0ustar00runnerrunnerclass Klass: @classmethod def get_instance(cls): return cls() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4984963 pylint-4.0.9/doc/data/messages/b/bad-configuration-section/0000755000175100017510000000000015254767631023274 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4720018 pylint-4.0.9/doc/data/messages/b/bad-configuration-section/details.rst0000644000175100017510000000023715254767617025461 0ustar00runnerrunnerThis error was raised when we encountered an unexpected value type in a toml configuration between pylint 2.12 and pylint 2.14 (before the argparse refactor). ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4989514 pylint-4.0.9/doc/data/messages/b/bad-docstring-quotes/0000755000175100017510000000000015254767631022275 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4720018 pylint-4.0.9/doc/data/messages/b/bad-docstring-quotes/bad.py0000644000175100017510000000010115254767617023371 0ustar00runnerrunnerdef foo(): # [bad-docstring-quotes] "Docstring." return ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4721105 pylint-4.0.9/doc/data/messages/b/bad-docstring-quotes/details.rst0000644000175100017510000000014415254767617024457 0ustar00runnerrunnerFrom `PEP 257`: "For consistency, always use ``"""triple double quotes"""`` around docstrings." ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4721105 pylint-4.0.9/doc/data/messages/b/bad-docstring-quotes/good.py0000644000175100017510000000005315254767617023601 0ustar00runnerrunnerdef foo(): """Docstring.""" return ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4721105 pylint-4.0.9/doc/data/messages/b/bad-docstring-quotes/pylintrc0000644000175100017510000000005715254767617024072 0ustar00runnerrunner[main] load-plugins=pylint.extensions.docstyle ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4721105 pylint-4.0.9/doc/data/messages/b/bad-docstring-quotes/related.rst0000644000175100017510000000013115254767617024446 0ustar00runnerrunner- `PEP 257 – Docstring Conventions `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4991925 pylint-4.0.9/doc/data/messages/b/bad-dunder-name/0000755000175100017510000000000015254767631021162 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4721105 pylint-4.0.9/doc/data/messages/b/bad-dunder-name/bad.py0000644000175100017510000000021415254767617022263 0ustar00runnerrunnerclass Apples: def _init_(self): # [bad-dunder-name] pass def __hello__(self): # [bad-dunder-name] print("hello") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4722235 pylint-4.0.9/doc/data/messages/b/bad-dunder-name/good.py0000644000175100017510000000014015254767617022463 0ustar00runnerrunnerclass Apples: def __init__(self): pass def hello(self): print("hello") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4722235 pylint-4.0.9/doc/data/messages/b/bad-dunder-name/pylintrc0000644000175100017510000000005515254767617022755 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.dunder ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4993498 pylint-4.0.9/doc/data/messages/b/bad-except-order/0000755000175100017510000000000015254767631021364 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4722235 pylint-4.0.9/doc/data/messages/b/bad-except-order/bad.py0000644000175100017510000000032715254767617022472 0ustar00runnerrunnertry: print(int(input())) except Exception: raise except TypeError: # [bad-except-order] # This block cannot be reached since TypeError exception # is caught by previous exception handler. raise ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4723043 pylint-4.0.9/doc/data/messages/b/bad-except-order/good.py0000644000175100017510000000012515254767617022670 0ustar00runnerrunnertry: print(int(input())) except TypeError: raise except Exception: raise ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4995847 pylint-4.0.9/doc/data/messages/b/bad-exception-cause/0000755000175100017510000000000015254767631022057 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4723043 pylint-4.0.9/doc/data/messages/b/bad-exception-cause/bad.py0000644000175100017510000000035215254767617023163 0ustar00runnerrunnerdef divide(x, y): result = 0 try: result = x / y except ZeroDivisionError: # +1: [bad-exception-cause] raise ValueError(f"Division by zero when dividing {x} by {y} !") from result return result ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4723732 pylint-4.0.9/doc/data/messages/b/bad-exception-cause/good.py0000644000175100017510000000031215254767617023361 0ustar00runnerrunnerdef divide(x, y): result = 0 try: result = x / y except ZeroDivisionError as exc: raise ValueError(f"Division by zero when dividing {x} by {y} !") from exc return result ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4723732 pylint-4.0.9/doc/data/messages/b/bad-exception-cause/related.rst0000644000175100017510000000032315254767617024233 0ustar00runnerrunner- `The raise statement `_ - `Explicit Exception Chaining `_ per PEP 3134 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.499772 pylint-4.0.9/doc/data/messages/b/bad-file-encoding/0000755000175100017510000000000015254767631021466 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4723732 pylint-4.0.9/doc/data/messages/b/bad-file-encoding/bad.py0000644000175100017510000000005015254767617022565 0ustar00runnerrunner# coding: latin_1 # [bad-file-encoding] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4723732 pylint-4.0.9/doc/data/messages/b/bad-file-encoding/good.py0000644000175100017510000000000015254767617022762 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5000842 pylint-4.0.9/doc/data/messages/b/bad-format-character/0000755000175100017510000000000015254767632022206 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.472453 pylint-4.0.9/doc/data/messages/b/bad-format-character/bad.py0000644000175100017510000000007615254767617023314 0ustar00runnerrunnerprint("%s %z" % ("hello", "world")) # [bad-format-character] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4725115 pylint-4.0.9/doc/data/messages/b/bad-format-character/details.rst0000644000175100017510000000027315254767617024372 0ustar00runnerrunnerThis check is currently only active for "old-style" string formatting as seen in the examples. See `Issue #6085 `_ for more information. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4725115 pylint-4.0.9/doc/data/messages/b/bad-format-character/good.py0000644000175100017510000000004415254767617023511 0ustar00runnerrunnerprint("%s %s" % ("hello", "world")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4725115 pylint-4.0.9/doc/data/messages/b/bad-format-character/related.rst0000644000175100017510000000017715254767617024370 0ustar00runnerrunner- `Format String Syntax `_ - `PyFormat `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5003266 pylint-4.0.9/doc/data/messages/b/bad-format-string/0000755000175100017510000000000015254767632021560 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4726117 pylint-4.0.9/doc/data/messages/b/bad-format-string/bad.py0000644000175100017510000000007715254767617022667 0ustar00runnerrunnerprint("{a[0] + a[1]}".format(a=[0, 1])) # [bad-format-string] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.472695 pylint-4.0.9/doc/data/messages/b/bad-format-string/good.py0000644000175100017510000000005215254767617023062 0ustar00runnerrunnerprint("{a[0]} + {a[1]}".format(a=[0, 1])) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.472695 pylint-4.0.9/doc/data/messages/b/bad-format-string/related.rst0000644000175100017510000000017715254767617023742 0ustar00runnerrunner- `Format String Syntax `_ - `PyFormat `_ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.500561 pylint-4.0.9/doc/data/messages/b/bad-format-string-key/0000755000175100017510000000000015254767632022346 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4725115 pylint-4.0.9/doc/data/messages/b/bad-format-string-key/bad.py0000644000175100017510000000007715254767617023455 0ustar00runnerrunnerprint("%(one)d" % {"one": 1, 2: 2}) # [bad-format-string-key] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4726117 pylint-4.0.9/doc/data/messages/b/bad-format-string-key/details.rst0000644000175100017510000000060515254767617024531 0ustar00runnerrunnerThis check only works for old-style string formatting using the '%' operator. This check only works if the dictionary with the values to be formatted is defined inline. Passing a variable will not trigger the check as the other keys in this dictionary may be used in other contexts, while an inline defined dictionary is clearly only intended to hold the values that should be formatted. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4726117 pylint-4.0.9/doc/data/messages/b/bad-format-string-key/good.py0000644000175100017510000000006115254767617023650 0ustar00runnerrunnerprint("%(one)d, %(two)d" % {"one": 1, "two": 2}) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5008473 pylint-4.0.9/doc/data/messages/b/bad-indentation/0000755000175100017510000000000015254767632021300 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.472695 pylint-4.0.9/doc/data/messages/b/bad-indentation/bad.py0000644000175100017510000000006115254767617022400 0ustar00runnerrunnerif input(): print('yes') # [bad-indentation] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4727898 pylint-4.0.9/doc/data/messages/b/bad-indentation/details.rst0000644000175100017510000000012715254767617023462 0ustar00runnerrunnerThe option ``--indent-string`` can be used to set the indentation unit for this check. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4727898 pylint-4.0.9/doc/data/messages/b/bad-indentation/good.py0000644000175100017510000000003515254767617022603 0ustar00runnerrunnerif input(): print("yes") ././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177177.50101 pylint-4.0.9/doc/data/messages/b/bad-inline-option/0000755000175100017510000000000015254767632021550 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4727898 pylint-4.0.9/doc/data/messages/b/bad-inline-option/bad.py0000644000175100017510000000007015254767617022650 0ustar00runnerrunner# 2:[bad-inline-option] # pylint: disable line-too-long ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4728703 pylint-4.0.9/doc/data/messages/b/bad-inline-option/good.py0000644000175100017510000000004015254767617023047 0ustar00runnerrunner# pylint: disable=line-too-long ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5011683 pylint-4.0.9/doc/data/messages/b/bad-mcs-classmethod-argument/0000755000175100017510000000000015254767632023672 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4728703 pylint-4.0.9/doc/data/messages/b/bad-mcs-classmethod-argument/bad.py0000644000175100017510000000014515254767617024775 0ustar00runnerrunnerclass Meta(type): @classmethod def foo(some): # [bad-mcs-classmethod-argument] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4729326 pylint-4.0.9/doc/data/messages/b/bad-mcs-classmethod-argument/good.py0000644000175100017510000000010215254767617025170 0ustar00runnerrunnerclass Meta(type): @classmethod def foo(mcs): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5013285 pylint-4.0.9/doc/data/messages/b/bad-mcs-method-argument/0000755000175100017510000000000015254767632022644 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4729326 pylint-4.0.9/doc/data/messages/b/bad-mcs-method-argument/bad.py0000644000175100017510000000012015254767617023740 0ustar00runnerrunnerclass Meta(type): def func(some): # [bad-mcs-method-argument] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4729948 pylint-4.0.9/doc/data/messages/b/bad-mcs-method-argument/good.py0000644000175100017510000000006215254767617024147 0ustar00runnerrunnerclass Meta(type): def func(cls): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5014908 pylint-4.0.9/doc/data/messages/b/bad-open-mode/0000755000175100017510000000000015254767632020647 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4729948 pylint-4.0.9/doc/data/messages/b/bad-open-mode/bad.py0000644000175100017510000000017415254767617021754 0ustar00runnerrunnerdef open_and_get_content(file_path): with open(file_path, "rwx") as file: # [bad-open-mode] return file.read() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4730597 pylint-4.0.9/doc/data/messages/b/bad-open-mode/good.py0000644000175100017510000000014715254767617022156 0ustar00runnerrunnerdef open_and_get_content(file_path): with open(file_path, "r") as file: return file.read() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5015707 pylint-4.0.9/doc/data/messages/b/bad-plugin-value/0000755000175100017510000000000015254767632021374 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4730597 pylint-4.0.9/doc/data/messages/b/bad-plugin-value/details.rst0000644000175100017510000000062415254767617023560 0ustar00runnerrunnerOne of your pylint plugins cannot be loaded. There's nothing to change in your code, but your pylint configuration or installation has an issue. For example, there might be a typo. The following config:: [MAIN] load-plugins = pylint.extensions.bad_biultin Should be:: [MAIN] load-plugins = pylint.extensions.bad_builtin Or the plugin you added is not importable in your environment. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5017583 pylint-4.0.9/doc/data/messages/b/bad-reversed-sequence/0000755000175100017510000000000015254767632022411 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4730597 pylint-4.0.9/doc/data/messages/b/bad-reversed-sequence/bad.py0000644000175100017510000000006215254767617023512 0ustar00runnerrunnerreversed({1, 2, 3, 4}) # [bad-reversed-sequence] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4731655 pylint-4.0.9/doc/data/messages/b/bad-reversed-sequence/good.py0000644000175100017510000000002715254767617023715 0ustar00runnerrunnerreversed([1, 2, 3, 4]) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.501992 pylint-4.0.9/doc/data/messages/b/bad-staticmethod-argument/0000755000175100017510000000000015254767632023274 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4731655 pylint-4.0.9/doc/data/messages/b/bad-staticmethod-argument/bad.py0000644000175100017510000000013515254767617024376 0ustar00runnerrunnerclass Wolf: @staticmethod def eat(self): # [bad-staticmethod-argument] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4732254 pylint-4.0.9/doc/data/messages/b/bad-staticmethod-argument/good.py0000644000175100017510000000007715254767617024605 0ustar00runnerrunnerclass Wolf: @staticmethod def eat(sheep): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5022135 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/0000755000175100017510000000000015254767632021644 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5024345 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/bad/0000755000175100017510000000000015254767632022372 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4732704 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/bad/hello_world.py0000644000175100017510000000010415254767617025254 0ustar00runnerrunner"Hello World".strip("Hello") # [bad-str-strip-call] # >>> ' World' ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4733114 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/bad/remove_abc_from_both_side.py0000644000175100017510000000010715254767617030112 0ustar00runnerrunner"abcbc def bacabc".strip("abcbc ") # [bad-str-strip-call] # >>> 'def' ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4733114 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/details.rst0000644000175100017510000000076515254767617024036 0ustar00runnerrunnerA common misconception is that ``str.strip('Hello')`` removes the *substring* ``'Hello'`` from the beginning and end of the string. This is **not** the case. From the `documentation `_: > The chars argument is not a prefix or suffix; rather, all combinations of its values are stripped Duplicated characters in the ``str.strip`` call, besides not having any effect on the actual result, may indicate this misunderstanding. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5026515 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/good/0000755000175100017510000000000015254767632022574 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4733114 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/good/hello_world.py0000644000175100017510000000005315254767617025461 0ustar00runnerrunner"Hello World".strip("Helo") # >>> ' World' ././@PaxHeader0000000000000000000000000000003100000000000010207 xustar0025 mtime=1790177167.4734 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/good/remove_abc_from_both_side.py0000644000175100017510000000005515254767617030316 0ustar00runnerrunner"abcbc def bacabc".strip("abc ") # >>> 'def' ././@PaxHeader0000000000000000000000000000003100000000000010207 xustar0025 mtime=1790177167.4734 pylint-4.0.9/doc/data/messages/b/bad-str-strip-call/related.rst0000644000175100017510000000016315254767617024021 0ustar00runnerrunner- Documentation: `str.strip([chars]) `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5031574 pylint-4.0.9/doc/data/messages/b/bad-string-format-type/0000755000175100017510000000000015254767632022537 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003100000000000010207 xustar0025 mtime=1790177167.4734 pylint-4.0.9/doc/data/messages/b/bad-string-format-type/bad.py0000644000175100017510000000005615254767617023643 0ustar00runnerrunnerprint("%d" % "1") # [bad-string-format-type] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4734845 pylint-4.0.9/doc/data/messages/b/bad-string-format-type/details.rst0000644000175100017510000000027315254767617024723 0ustar00runnerrunnerThis check is currently only active for "old-style" string formatting as seen in the examples. See `Issue #6085 `_ for more information. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4734845 pylint-4.0.9/doc/data/messages/b/bad-string-format-type/good.py0000644000175100017510000000002015254767617024034 0ustar00runnerrunnerprint("%d" % 1) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4734845 pylint-4.0.9/doc/data/messages/b/bad-string-format-type/related.rst0000644000175100017510000000017715254767617024721 0ustar00runnerrunner- `Format String Syntax `_ - `PyFormat `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5038126 pylint-4.0.9/doc/data/messages/b/bad-super-call/0000755000175100017510000000000015254767632021033 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4734845 pylint-4.0.9/doc/data/messages/b/bad-super-call/bad.py0000644000175100017510000000027315254767617022140 0ustar00runnerrunnerclass Animal: pass class Tree: pass class Cat(Animal): def __init__(self): super(Tree, self).__init__() # [bad-super-call] super(Animal, self).__init__() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4735856 pylint-4.0.9/doc/data/messages/b/bad-super-call/details.rst0000644000175100017510000000070015254767617023212 0ustar00runnerrunnerIn Python 2.7, ``super()`` has to be called with its own class and ``self`` as arguments (``super(Cat, self)``), which can lead to a mix up of parent and child class in the code. In Python 3 the recommended way is to call ``super()`` without arguments (see also ``super-with-arguments``). One exception is calling ``super()`` on a non-direct parent class. This can be used to get a method other than the default method returned by the ``mro()``. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4735856 pylint-4.0.9/doc/data/messages/b/bad-super-call/good.py0000644000175100017510000000020215254767617022332 0ustar00runnerrunnerclass Animal: pass class Tree: pass class Cat(Animal): def __init__(self): super(Animal, self).__init__() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4735856 pylint-4.0.9/doc/data/messages/b/bad-super-call/related.rst0000644000175100017510000000013015254767617023202 0ustar00runnerrunner- `Documentation for super() `_ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.504121 pylint-4.0.9/doc/data/messages/b/bad-thread-instantiation/0000755000175100017510000000000015254767632023115 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4735856 pylint-4.0.9/doc/data/messages/b/bad-thread-instantiation/bad.py0000644000175100017510000000022015254767617024212 0ustar00runnerrunnerimport threading def thread_target(n): print(n**2) thread = threading.Thread(lambda: None) # [bad-thread-instantiation] thread.start() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4736874 pylint-4.0.9/doc/data/messages/b/bad-thread-instantiation/good.py0000644000175100017510000000020615254767617024420 0ustar00runnerrunnerimport threading def thread_target(n): print(n**2) thread = threading.Thread(target=thread_target, args=(10,)) thread.start() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5047047 pylint-4.0.9/doc/data/messages/b/bare-except/0000755000175100017510000000000015254767632020437 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4736874 pylint-4.0.9/doc/data/messages/b/bare-except/bad.py0000644000175100017510000000014615254767617021543 0ustar00runnerrunnertry: import platform_specific_module except: # [bare-except] platform_specific_module = None ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4737875 pylint-4.0.9/doc/data/messages/b/bare-except/details.rst0000644000175100017510000000057015254767617022623 0ustar00runnerrunnerA good rule of thumb is to limit use of bare ‘except’ clauses to two cases: - If the exception handler will be printing out or logging the traceback; at least the user will be aware that an error has occurred. - If the code needs to do some cleanup work, but then lets the exception propagate upwards with raise. ``try...finally`` can be a better way to handle this case. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4737875 pylint-4.0.9/doc/data/messages/b/bare-except/good.py0000644000175100017510000000014115254767617021740 0ustar00runnerrunnertry: import platform_specific_module except ImportError: platform_specific_module = None ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4737875 pylint-4.0.9/doc/data/messages/b/bare-except/related.rst0000644000175100017510000000043515254767617022616 0ustar00runnerrunner- `Programming recommendation in PEP8 `_ - `PEP 760 – No More Bare Excepts (Rejected) `_ - `Discussion about PEP 760 `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5051656 pylint-4.0.9/doc/data/messages/b/bare-name-capture-pattern/0000755000175100017510000000000015254767632023203 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4737875 pylint-4.0.9/doc/data/messages/b/bare-name-capture-pattern/bad.py0000644000175100017510000000045015254767617024305 0ustar00runnerrunnerred = 0 green = 1 blue = 2 def func(color): match color: case red: # [bare-name-capture-pattern] print("I see red!") case green: # [bare-name-capture-pattern] print("Grass is green") case blue: print("I'm feeling the blues :(") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4739022 pylint-4.0.9/doc/data/messages/b/bare-name-capture-pattern/good.py0000644000175100017510000000050215254767617024505 0ustar00runnerrunnerfrom enum import Enum class Color(Enum): RED = 0 GREEN = 1 BLUE = 2 def func(color: Color) -> None: match color: case Color.RED: print("I see red!") case Color.GREEN: print("Grass is green") case Color.BLUE: print("I'm feeling the blues :(") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4739022 pylint-4.0.9/doc/data/messages/b/bare-name-capture-pattern/related.rst0000644000175100017510000000012615254767617025357 0ustar00runnerrunner- `PEP 636 `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5053444 pylint-4.0.9/doc/data/messages/b/bidirectional-unicode/0000755000175100017510000000000015254767632022474 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4739022 pylint-4.0.9/doc/data/messages/b/bidirectional-unicode/bad.py0000644000175100017510000000011615254767617023575 0ustar00runnerrunner# +1: [bidirectional-unicode] example = "xâ€�" * 100 # "â€�x" is assigned ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4739869 pylint-4.0.9/doc/data/messages/b/bidirectional-unicode/good.py0000644000175100017510000000003415254767617023776 0ustar00runnerrunnerexample = "x[U+2194]" * 100 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5055065 pylint-4.0.9/doc/data/messages/b/binary-op-exception/0000755000175100017510000000000015254767632022134 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4739869 pylint-4.0.9/doc/data/messages/b/binary-op-exception/bad.py0000644000175100017510000000013115254767617023232 0ustar00runnerrunnertry: 1 / 0 except ZeroDivisionError or ValueError: # [binary-op-exception] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4740498 pylint-4.0.9/doc/data/messages/b/binary-op-exception/good.py0000644000175100017510000000010015254767617023430 0ustar00runnerrunnertry: 1 / 0 except (ZeroDivisionError, ValueError): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5059419 pylint-4.0.9/doc/data/messages/b/boolean-datetime/0000755000175100017510000000000015254767632021451 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4740498 pylint-4.0.9/doc/data/messages/b/boolean-datetime/bad.py0000644000175100017510000000025215254767617022553 0ustar00runnerrunnerimport datetime if datetime.time(): # [boolean-datetime] print("It is time.") if datetime.datetime.now().time(): # [boolean-datetime] print("Now or never.") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.474112 pylint-4.0.9/doc/data/messages/b/boolean-datetime/good.py0000644000175100017510000000031415254767617022754 0ustar00runnerrunnerimport datetime time_now_utc = datetime.datetime.now(tz=datetime.UTC).time() if time_now_utc > datetime.time(6, 0): print("Daytime!") if time_now_utc < datetime.time(6, 0): print("Nighttime!") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.474112 pylint-4.0.9/doc/data/messages/b/boolean-datetime/pylintrc0000644000175100017510000000002615254767617023241 0ustar00runnerrunner[main] py-version=3.4 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.474112 pylint-4.0.9/doc/data/messages/b/boolean-datetime/related.rst0000644000175100017510000000007515254767617023630 0ustar00runnerrunner- `Python bug tracker `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5062783 pylint-4.0.9/doc/data/messages/b/break-in-finally/0000755000175100017510000000000015254767632021364 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.474112 pylint-4.0.9/doc/data/messages/b/break-in-finally/bad.py0000644000175100017510000000012315254767617022463 0ustar00runnerrunnerwhile True: try: pass finally: break # [break-in-finally] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742086 pylint-4.0.9/doc/data/messages/b/break-in-finally/good.py0000644000175100017510000000013615254767617022671 0ustar00runnerrunnerwhile True: try: pass except ValueError: pass else: break ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742086 pylint-4.0.9/doc/data/messages/b/break-in-finally/related.rst0000644000175100017510000000033115254767617023536 0ustar00runnerrunner- `Python 3 docs 'finally' clause `_ - `PEP 765 - Disallow return/break/continue that exit a finally block `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5066185 pylint-4.0.9/doc/data/messages/b/broad-exception-caught/0000755000175100017510000000000015254767632022574 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742086 pylint-4.0.9/doc/data/messages/b/broad-exception-caught/bad.py0000644000175100017510000000017315254767617023700 0ustar00runnerrunnertry: import platform_specific_module except Exception: # [broad-exception-caught] platform_specific_module = None ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742944 pylint-4.0.9/doc/data/messages/b/broad-exception-caught/details.rst0000644000175100017510000000037615254767617024764 0ustar00runnerrunnerFor example, you're trying to import a library with required system dependencies and you catch everything instead of only import errors, you will miss the error message telling you, that your code could work if you had installed the system dependencies. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742944 pylint-4.0.9/doc/data/messages/b/broad-exception-caught/good.py0000644000175100017510000000014115254767617024075 0ustar00runnerrunnertry: import platform_specific_module except ImportError: platform_specific_module = None ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742944 pylint-4.0.9/doc/data/messages/b/broad-exception-caught/related.rst0000644000175100017510000000016615254767617024754 0ustar00runnerrunner- `Should I always specify an exception type in 'except' statements? `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5070708 pylint-4.0.9/doc/data/messages/b/broad-exception-raised/0000755000175100017510000000000015254767632022570 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4742944 pylint-4.0.9/doc/data/messages/b/broad-exception-raised/bad.py0000644000175100017510000000025515254767617023675 0ustar00runnerrunnerdef small_apple(apple, length): if len(apple) < length: raise Exception("Apple is too small!") # [broad-exception-raised] print(f"{apple} is proper size.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4743984 pylint-4.0.9/doc/data/messages/b/broad-exception-raised/good.py0000644000175100017510000000022215254767617024071 0ustar00runnerrunnerdef small_apple(apple, length): if len(apple) < length: raise ValueError("Apple is too small!") print(f"{apple} is proper size.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4743984 pylint-4.0.9/doc/data/messages/b/broad-exception-raised/related.rst0000644000175100017510000000015015254767617024741 0ustar00runnerrunner- `Programming recommendation in PEP8 `_ ././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177177.50751 pylint-4.0.9/doc/data/messages/b/broken-collections-callable/0000755000175100017510000000000015254767632023571 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4743984 pylint-4.0.9/doc/data/messages/b/broken-collections-callable/bad.py0000644000175100017510000000023315254767617024672 0ustar00runnerrunnerfrom collections.abc import Callable from typing import Optional def func() -> Optional[Callable[[int], None]]: # [broken-collections-callable] ... ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4744813 pylint-4.0.9/doc/data/messages/b/broken-collections-callable/good.py0000644000175100017510000000013315254767617025073 0ustar00runnerrunnerfrom typing import Callable, Optional def func() -> Optional[Callable[[int], None]]: ... ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4744813 pylint-4.0.9/doc/data/messages/b/broken-collections-callable/pylintrc0000644000175100017510000000007415254767617025364 0ustar00runnerrunner[main] py-version=3.9 load-plugins=pylint.extensions.typing ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4744813 pylint-4.0.9/doc/data/messages/b/broken-collections-callable/related.rst0000644000175100017510000000006415254767617025746 0ustar00runnerrunner- `bpo-42965 `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5078628 pylint-4.0.9/doc/data/messages/b/broken-noreturn/0000755000175100017510000000000015254767632021372 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4744813 pylint-4.0.9/doc/data/messages/b/broken-noreturn/bad.py0000644000175100017510000000023115254767617022471 0ustar00runnerrunnerfrom typing import NoReturn, Union def exploding_apple(apple) -> Union[None, NoReturn]: # [broken-noreturn] print(f"{apple} is about to explode") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.474588 pylint-4.0.9/doc/data/messages/b/broken-noreturn/good.py0000644000175100017510000000023215254767617022674 0ustar00runnerrunnerfrom typing import NoReturn def exploding_apple(apple) -> NoReturn: print(f"{apple} is about to explode") raise Exception("{apple} exploded !") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.474588 pylint-4.0.9/doc/data/messages/b/broken-noreturn/pylintrc0000644000175100017510000000007415254767617023165 0ustar00runnerrunner[main] py-version=3.7 load-plugins=pylint.extensions.typing ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4056184 pylint-4.0.9/doc/data/messages/c/0000755000175100017510000000000015254767631016240 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.508084 pylint-4.0.9/doc/data/messages/c/c-extension-no-member/0000755000175100017510000000000015254767632022354 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4746547 pylint-4.0.9/doc/data/messages/c/c-extension-no-member/details.rst0000644000175100017510000000037515254767617024543 0ustar00runnerrunner``c-extension-no-member`` is an informational variant of ``no-member`` to encourage allowing introspection of C extensions as described in the `page `_ for ``no-member``. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4746983 pylint-4.0.9/doc/data/messages/c/c-extension-no-member/good.py0000644000175100017510000000007315254767617023661 0ustar00runnerrunner# This is a placeholder for correct code for this message. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5082984 pylint-4.0.9/doc/data/messages/c/catching-non-exception/0000755000175100017510000000000015254767632022605 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4746983 pylint-4.0.9/doc/data/messages/c/catching-non-exception/bad.py0000644000175100017510000000014015254767617023703 0ustar00runnerrunnerclass FooError: pass try: 1 / 0 except FooError: # [catching-non-exception] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4747698 pylint-4.0.9/doc/data/messages/c/catching-non-exception/good.py0000644000175100017510000000011715254767617024111 0ustar00runnerrunnerclass FooError(Exception): pass try: 1 / 0 except FooError: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5085132 pylint-4.0.9/doc/data/messages/c/cell-var-from-loop/0000755000175100017510000000000015254767632021656 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4747698 pylint-4.0.9/doc/data/messages/c/cell-var-from-loop/bad.py0000644000175100017510000000114315254767617022760 0ustar00runnerrunnerdef teacher_greeting(names): greetings = [] for name in names: def greet(): # do something print(f"Hello, {name}!") # [cell-var-from-loop] if name.isalpha(): greetings.append(greet) for greet in greetings: # the "name" variable is evaluated when the function is called here, # which is the last value it had in the loop - "Not-A-Name" greet() teacher_greeting(["Graham", "John", "Terry", "Eric", "Terry", "Michael"]) # "Hello, Michael!" # "Hello, Michael!" # "Hello, Michael!" # "Hello, Michael!" # "Hello, Michael!" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5087461 pylint-4.0.9/doc/data/messages/c/cell-var-from-loop/good/0000755000175100017510000000000015254767632022606 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4748456 pylint-4.0.9/doc/data/messages/c/cell-var-from-loop/good/functools.partial.py0000644000175100017510000000116315254767617026633 0ustar00runnerrunnerimport functools def teacher_greeting(names): greetings = [] for name in names: if name.isalpha(): # "name" is evaluated when the partial is created here, so this # does not do lazy evaluation greetings.append(functools.partial(print, f"Hello, {name}!")) for greet in greetings: # `partial`s are called like functions, but you've already passed the # arguments to them greet() teacher_greeting(["Graham", "John", "Terry", "Eric", "Terry", "Michael"]) # "Hello, Graham!" # "Hello, John!" # "Hello, Eric!" # "Hello, Terry!" # "Hello, Michael!" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4748888 pylint-4.0.9/doc/data/messages/c/cell-var-from-loop/good/new_function.py0000644000175100017510000000064115254767617025662 0ustar00runnerrunnerdef teacher_greeting(names): def greet(name): # do something print(f"Hello, {name}!") for name in names: if name.isalpha(): # we're passing the value of "name" to the function here greet(name) teacher_greeting(["Graham", "John", "Terry", "Eric", "Terry", "Michael"]) # "Hello, Graham!" # "Hello, John!" # "Hello, Eric!" # "Hello, Terry!" # "Hello, Michael!" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4748888 pylint-4.0.9/doc/data/messages/c/cell-var-from-loop/related.rst0000644000175100017510000000016415254767617024034 0ustar00runnerrunner- `Stackoverflow discussion `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5089724 pylint-4.0.9/doc/data/messages/c/chained-comparison/0000755000175100017510000000000015254767632022004 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4748888 pylint-4.0.9/doc/data/messages/c/chained-comparison/bad.py0000644000175100017510000000015015254767617023103 0ustar00runnerrunnera = int(input()) b = int(input()) c = int(input()) if a < b and b < c: # [chained-comparison] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4749677 pylint-4.0.9/doc/data/messages/c/chained-comparison/good.py0000644000175100017510000000011215254767617023303 0ustar00runnerrunnera = int(input()) b = int(input()) c = int(input()) if a < b < c: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5091968 pylint-4.0.9/doc/data/messages/c/class-variable-slots-conflict/0000755000175100017510000000000015254767632024072 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4749677 pylint-4.0.9/doc/data/messages/c/class-variable-slots-conflict/bad.py0000644000175100017510000000057415254767617025203 0ustar00runnerrunnerclass Person: # +1: [class-variable-slots-conflict, class-variable-slots-conflict, class-variable-slots-conflict] __slots__ = ("age", "name", "say_hi") name = None def __init__(self, age, name): self.age = age self.name = name @property def age(self): return self.age def say_hi(self): print(f"Hi, I'm {self.name}.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4750419 pylint-4.0.9/doc/data/messages/c/class-variable-slots-conflict/good.py0000644000175100017510000000037515254767617025404 0ustar00runnerrunnerclass Person: __slots__ = ("_age", "name") def __init__(self, age, name): self._age = age self.name = name @property def age(self): return self._age def say_hi(self): print(f"Hi, I'm {self.name}.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5094361 pylint-4.0.9/doc/data/messages/c/comparison-of-constants/0000755000175100017510000000000015254767632023027 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4750419 pylint-4.0.9/doc/data/messages/c/comparison-of-constants/bad.py0000644000175100017510000000011615254767617024130 0ustar00runnerrunnerdef is_the_answer() -> bool: return 42 == 42 # [comparison-of-constants] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4751043 pylint-4.0.9/doc/data/messages/c/comparison-of-constants/good.py0000644000175100017510000000012215254767617024327 0ustar00runnerrunnerdef is_the_answer(meaning_of_life: int) -> bool: return meaning_of_life == 42 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5098102 pylint-4.0.9/doc/data/messages/c/comparison-with-callable/0000755000175100017510000000000015254767632023121 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4751043 pylint-4.0.9/doc/data/messages/c/comparison-with-callable/bad.py0000644000175100017510000000037315254767617024227 0ustar00runnerrunnerdef function_returning_a_fruit() -> str: return "orange" def is_an_orange(fruit: str = "apple"): # apple == return fruit == function_returning_a_fruit # [comparison-with-callable] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4751706 pylint-4.0.9/doc/data/messages/c/comparison-with-callable/good.py0000644000175100017510000000025615254767617024431 0ustar00runnerrunnerdef function_returning_a_fruit() -> str: return "orange" def is_an_orange(fruit: str = "apple"): # apple == orange return fruit == function_returning_a_fruit() ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.510094 pylint-4.0.9/doc/data/messages/c/comparison-with-itself/0000755000175100017510000000000015254767632022650 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4751706 pylint-4.0.9/doc/data/messages/c/comparison-with-itself/bad.py0000644000175100017510000000015015254767617023747 0ustar00runnerrunnerdef is_an_orange(fruit): an_orange = "orange" return fruit == fruit # [comparison-with-itself] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4752362 pylint-4.0.9/doc/data/messages/c/comparison-with-itself/good.py0000644000175100017510000000012015254767617024146 0ustar00runnerrunnerdef is_an_orange(fruit): an_orange = "orange" return an_orange == fruit ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5103421 pylint-4.0.9/doc/data/messages/c/condition-evals-to-constant/0000755000175100017510000000000015254767632023606 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4752362 pylint-4.0.9/doc/data/messages/c/condition-evals-to-constant/bad.py0000644000175100017510000000015615254767617024713 0ustar00runnerrunnerdef is_a_fruit(fruit): return bool(fruit in {"apple", "orange"} or True) # [condition-evals-to-constant] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4752994 pylint-4.0.9/doc/data/messages/c/condition-evals-to-constant/good.py0000644000175100017510000000007715254767617025117 0ustar00runnerrunnerdef is_a_fruit(fruit): return fruit in {"apple", "orange"} ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.510465 pylint-4.0.9/doc/data/messages/c/config-parse-error/0000755000175100017510000000000015254767632021745 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4752994 pylint-4.0.9/doc/data/messages/c/config-parse-error/details.rst0000644000175100017510000000011315254767617024122 0ustar00runnerrunnerThis is a message linked to a problem in your configuration not your code. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5111356 pylint-4.0.9/doc/data/messages/c/confusing-consecutive-elif/0000755000175100017510000000000015254767632023476 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4752994 pylint-4.0.9/doc/data/messages/c/confusing-consecutive-elif/bad.py0000644000175100017510000000034415254767617024602 0ustar00runnerrunnerdef myfunc(shall_continue: bool, shall_exit: bool): if shall_continue: if input("Are you sure?") == "y": print("Moving on.") elif shall_exit: # [confusing-consecutive-elif] print("Exiting.") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.475416 pylint-4.0.9/doc/data/messages/c/confusing-consecutive-elif/details.rst0000644000175100017510000000027315254767617025662 0ustar00runnerrunnerCreating a function for the nested conditional, or adding an explicit ``else`` in the indented ``if`` statement, even if it only contains a ``pass`` statement, can help clarify the code. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.475416 pylint-4.0.9/doc/data/messages/c/confusing-consecutive-elif/good.py0000644000175100017510000000102615254767617025002 0ustar00runnerrunner# Option 1: add explicit 'else' def myfunc(shall_continue: bool, shall_exit: bool): if shall_continue: if input("Are you sure?") == "y": print("Moving on.") else: pass elif shall_exit: print("Exiting.") # Option 2: extract function def user_confirmation(): if input("Are you sure?") == "y": print("Moving on.") def myfunc2(shall_continue: bool, shall_exit: bool): if shall_continue: user_confirmation() elif shall_exit: print("Exiting.") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.475416 pylint-4.0.9/doc/data/messages/c/confusing-consecutive-elif/pylintrc0000644000175100017510000000006515254767617025271 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.confusing_elif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5113425 pylint-4.0.9/doc/data/messages/c/confusing-with-statement/0000755000175100017510000000000015254767632023207 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.475416 pylint-4.0.9/doc/data/messages/c/confusing-with-statement/bad.py0000644000175100017510000000011715254767617024311 0ustar00runnerrunnerwith open("file.txt", "w") as fh1, fh2: # [confusing-with-statement] pass ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.475513 pylint-4.0.9/doc/data/messages/c/confusing-with-statement/good.py0000644000175100017510000000017115254767617024513 0ustar00runnerrunnerwith open("file.txt", "w", encoding="utf8") as fh1: with open("file.txt", "w", encoding="utf8") as fh2: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5120473 pylint-4.0.9/doc/data/messages/c/consider-alternative-union-syntax/0000755000175100017510000000000015254767632025035 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.475513 pylint-4.0.9/doc/data/messages/c/consider-alternative-union-syntax/bad.py0000644000175100017510000000036015254767617026137 0ustar00runnerrunnerfrom typing import Optional, Union def forecast( temp: Union[int, float], # [consider-alternative-union-syntax] unit: Optional[str], # [consider-alternative-union-syntax] ) -> None: print(f'Temperature: {temp}{unit or ""}') ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4755833 pylint-4.0.9/doc/data/messages/c/consider-alternative-union-syntax/details.rst0000644000175100017510000000124415254767617027220 0ustar00runnerrunnerUsing the shorthand syntax for union types is |recommended over the typing module|__. This is consistent with the broader recommendation to prefer built-in types over imports (for example, using ``list`` instead of the now-deprecated ``typing.List``). ``typing.Optional`` can also cause confusion in annotated function arguments, since an argument annotated as ``Optional`` is still a *required* argument when a default value is not set. Explicitly annotating such arguments with ``type | None`` makes the intention clear. .. |recommended over the typing module| replace:: recommended over the ``typing`` module __ https://docs.python.org/3/library/typing.html#typing.Union ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4755833 pylint-4.0.9/doc/data/messages/c/consider-alternative-union-syntax/good.py0000644000175100017510000000015115254767617026337 0ustar00runnerrunnerdef forecast(temp: int | float, unit: str | None) -> None: print(f'Temperature: {temp}{unit or ""}') ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4755833 pylint-4.0.9/doc/data/messages/c/consider-alternative-union-syntax/pylintrc0000644000175100017510000000005715254767617026631 0ustar00runnerrunner[MAIN] load-plugins = pylint.extensions.typing ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5123608 pylint-4.0.9/doc/data/messages/c/consider-iterating-dictionary/0000755000175100017510000000000015254767632024176 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4755833 pylint-4.0.9/doc/data/messages/c/consider-iterating-dictionary/bad.py0000644000175100017510000000020015254767617025271 0ustar00runnerrunnerFRUITS = {"apple": 1, "pear": 5, "peach": 10} for fruit in FRUITS.keys(): # [consider-iterating-dictionary] print(fruit) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4756842 pylint-4.0.9/doc/data/messages/c/consider-iterating-dictionary/good.py0000644000175100017510000000012615254767617025502 0ustar00runnerrunnerFRUITS = {"apple": 1, "pear": 5, "peach": 10} for fruit in FRUITS: print(fruit) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.512898 pylint-4.0.9/doc/data/messages/c/consider-math-not-float/0000755000175100017510000000000015254767632022677 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4756842 pylint-4.0.9/doc/data/messages/c/consider-math-not-float/bad.py0000644000175100017510000000006115254767617023777 0ustar00runnerrunnerswag = float("inf") # [consider-math-not-float] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4757628 pylint-4.0.9/doc/data/messages/c/consider-math-not-float/details.rst0000644000175100017510000000222415254767617025061 0ustar00runnerrunnerThis is an extension check because the typing advantage could be fixed. Regarding performance, float("nan") and float("inf") are slower than their counterpart math.inf and math.nan by a factor of 4 after the initial import of math. .. code-block:: python import math import timeit time_math_inf = timeit.timeit('math.nan', globals=globals(), number=10**8) print(f'math.nan: {time_math_inf:.2f} seconds') import timeit time_inf_str = timeit.timeit('float("nan")', number=10**8) print(f'float("nan"): {time_inf_str:.2f} seconds') Result:: math.nan: 1.24 seconds float("nan"): 5.15 seconds But if we take the initial import into account it's worse. .. code-block:: python import timeit time_math_inf = timeit.timeit('import math;math.nan', globals=globals(), number=10**8) print(f'math.nan: {time_math_inf:.2f} seconds') import timeit time_inf_str = timeit.timeit('float("nan")', number=10**8) print(f'float("nan"): {time_inf_str:.2f} seconds') Result:: math.nan: 9.08 seconds float("nan"): 5.33 seconds So the decision depends on how and how often you need to use it and what matter to you. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4757628 pylint-4.0.9/doc/data/messages/c/consider-math-not-float/good.py0000644000175100017510000000003515254767617024202 0ustar00runnerrunnerimport math swag = math.inf ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4757628 pylint-4.0.9/doc/data/messages/c/consider-math-not-float/pylintrc0000644000175100017510000000006115254767617024466 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.code_style ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5131965 pylint-4.0.9/doc/data/messages/c/consider-merging-isinstance/0000755000175100017510000000000015254767632023633 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4757628 pylint-4.0.9/doc/data/messages/c/consider-merging-isinstance/bad.py0000644000175100017510000000024215254767617024734 0ustar00runnerrunnerfrom typing import Any def is_number(value: Any) -> bool: # +1: [consider-merging-isinstance] return isinstance(value, int) or isinstance(value, float) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4758682 pylint-4.0.9/doc/data/messages/c/consider-merging-isinstance/good.py0000644000175100017510000000014715254767617025142 0ustar00runnerrunnerfrom typing import Any def is_number(value: Any) -> bool: return isinstance(value, (int, float)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5136185 pylint-4.0.9/doc/data/messages/c/consider-refactoring-into-while-condition/0000755000175100017510000000000015254767632026411 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4758682 pylint-4.0.9/doc/data/messages/c/consider-refactoring-into-while-condition/bad.py0000644000175100017510000000037115254767617027515 0ustar00runnerrunnerfruit_basket = ["apple", "orange", "banana", "cherry", "guava"] while True: # [consider-refactoring-into-while-condition] if len(fruit_basket) == 0: break fruit = fruit_basket.pop() print(f"We removed {fruit} from the basket") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4759371 pylint-4.0.9/doc/data/messages/c/consider-refactoring-into-while-condition/good.py0000644000175100017510000000025715254767617027722 0ustar00runnerrunnerfruit_basket = ["apple", "orange", "banana", "cherry", "guava"] while len(fruit_basket) != 0: fruit = fruit_basket.pop() print(f"We removed {fruit} from the basket") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4759371 pylint-4.0.9/doc/data/messages/c/consider-refactoring-into-while-condition/pylintrc0000644000175100017510000000012015254767617030174 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.consider_refactoring_into_while_condition ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5139966 pylint-4.0.9/doc/data/messages/c/consider-swap-variables/0000755000175100017510000000000015254767632022765 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4759371 pylint-4.0.9/doc/data/messages/c/consider-swap-variables/bad.py0000644000175100017510000000010215254767617024061 0ustar00runnerrunnera = 1 b = 2 temp = a # [consider-swap-variables] a = b b = temp ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4760199 pylint-4.0.9/doc/data/messages/c/consider-swap-variables/good.py0000644000175100017510000000003115254767617024264 0ustar00runnerrunnera = 1 b = 2 a, b = b, a ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5146184 pylint-4.0.9/doc/data/messages/c/consider-ternary-expression/0000755000175100017510000000000015254767632023726 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4760199 pylint-4.0.9/doc/data/messages/c/consider-ternary-expression/bad.py0000644000175100017510000000015215254767617025027 0ustar00runnerrunnerx, y = input(), input() if x >= y: # [consider-ternary-expression] maximum = x else: maximum = y ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4760818 pylint-4.0.9/doc/data/messages/c/consider-ternary-expression/good.py0000644000175100017510000000006515254767617025234 0ustar00runnerrunnerx, y = input(), input() maximum = x if x >= y else y ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4760818 pylint-4.0.9/doc/data/messages/c/consider-ternary-expression/pylintrc0000644000175100017510000000010215254767617025511 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.consider_ternary_expression ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5152698 pylint-4.0.9/doc/data/messages/c/consider-using-alias/0000755000175100017510000000000015254767632022261 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4760818 pylint-4.0.9/doc/data/messages/c/consider-using-alias/bad.py0000644000175100017510000000010515254767617023360 0ustar00runnerrunnerimport typing cats: typing.Dict[str, int] # [consider-using-alias] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476164 pylint-4.0.9/doc/data/messages/c/consider-using-alias/good.py0000644000175100017510000000007315254767617023566 0ustar00runnerrunnerimport typing cats: typing.cast(dict[str, int], "string") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476164 pylint-4.0.9/doc/data/messages/c/consider-using-alias/pylintrc0000644000175100017510000000012215254767617024046 0ustar00runnerrunner[main] load-plugins = pylint.extensions.typing py-version = 3.7 runtime-typing=no ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5154142 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/0000755000175100017510000000000015254767632023143 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5158596 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/bad/0000755000175100017510000000000015254767632023671 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4762292 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/bad/all_even.py0000644000175100017510000000031615254767617026033 0ustar00runnerrunnerdef all_even(items): """Return True if the list contains all even numbers""" for item in items: # [consider-using-any-or-all] if not item % 2 == 0: return False return True ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476271 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/bad/any_even.py0000644000175100017510000000031215254767617026046 0ustar00runnerrunnerdef any_even(items): """Return True if the list contains any even numbers""" for item in items: # [consider-using-any-or-all] if item % 2 == 0: return True return False ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5163045 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/good/0000755000175100017510000000000015254767632024073 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476271 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/good/all_even.py0000644000175100017510000000020115254767617026226 0ustar00runnerrunnerdef all_even(items): """Return True if the list contains all even numbers""" return all(item % 2 == 0 for item in items) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4763339 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/good/any_even.py0000644000175100017510000000020115254767617026245 0ustar00runnerrunnerdef any_even(items): """Return True if the list contains any even numbers""" return any(item % 2 == 0 for item in items) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4763339 pylint-4.0.9/doc/data/messages/c/consider-using-any-or-all/pylintrc0000644000175100017510000000006215254767617024733 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.for_any_all ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.516989 pylint-4.0.9/doc/data/messages/c/consider-using-assignment-expr/0000755000175100017510000000000015254767632024314 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4763339 pylint-4.0.9/doc/data/messages/c/consider-using-assignment-expr/bad.py0000644000175100017510000000012415254767617025414 0ustar00runnerrunnerapples = 2 if apples: # [consider-using-assignment-expr] print("God apples!") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476413 pylint-4.0.9/doc/data/messages/c/consider-using-assignment-expr/good.py0000644000175100017510000000005115254767617025615 0ustar00runnerrunnerif apples := 2: print("God apples!") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476413 pylint-4.0.9/doc/data/messages/c/consider-using-assignment-expr/pylintrc0000644000175100017510000000010015254767617026075 0ustar00runnerrunner[MAIN] py-version=3.8 load-plugins=pylint.extensions.code_style ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5176222 pylint-4.0.9/doc/data/messages/c/consider-using-augmented-assign/0000755000175100017510000000000015254767632024423 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476413 pylint-4.0.9/doc/data/messages/c/consider-using-augmented-assign/bad.py0000644000175100017510000000006515254767617025527 0ustar00runnerrunnerx = 1 x = x + 1 # [consider-using-augmented-assign] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4764986 pylint-4.0.9/doc/data/messages/c/consider-using-augmented-assign/good.py0000644000175100017510000000001515254767617025724 0ustar00runnerrunnerx = 1 x += 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4764986 pylint-4.0.9/doc/data/messages/c/consider-using-augmented-assign/pylintrc0000644000175100017510000000013015254767617026207 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.code_style enable=consider-using-augmented-assign ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5182478 pylint-4.0.9/doc/data/messages/c/consider-using-dict-comprehension/0000755000175100017510000000000015254767632024762 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4764986 pylint-4.0.9/doc/data/messages/c/consider-using-dict-comprehension/bad.py0000644000175100017510000000020415254767617026061 0ustar00runnerrunnerNUMBERS = [1, 2, 3] # +1: [consider-using-dict-comprehension] DOUBLED_NUMBERS = dict([(number, number * 2) for number in NUMBERS]) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4765882 pylint-4.0.9/doc/data/messages/c/consider-using-dict-comprehension/details.rst0000644000175100017510000000022315254767617027141 0ustar00runnerrunnerpyupgrade_ or ruff_ can fix this issue automatically. .. _pyupgrade: https://github.com/asottile/pyupgrade .. _ruff: https://docs.astral.sh/ruff/ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4765882 pylint-4.0.9/doc/data/messages/c/consider-using-dict-comprehension/good.py0000644000175100017510000000012215254767617026262 0ustar00runnerrunnerNUMBERS = [1, 2, 3] DOUBLED_NUMBERS = {number: number * 2 for number in NUMBERS} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5186186 pylint-4.0.9/doc/data/messages/c/consider-using-dict-items/0000755000175100017510000000000015254767632023232 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4765882 pylint-4.0.9/doc/data/messages/c/consider-using-dict-items/bad.py0000644000175100017510000000034215254767617024334 0ustar00runnerrunnerORCHESTRA = { "violin": "strings", "oboe": "woodwind", "tuba": "brass", "gong": "percussion", } for instrument in ORCHESTRA: # [consider-using-dict-items] print(f"{instrument}: {ORCHESTRA[instrument]}") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476672 pylint-4.0.9/doc/data/messages/c/consider-using-dict-items/good.py0000644000175100017510000000030615254767617024536 0ustar00runnerrunnerORCHESTRA = { "violin": "strings", "oboe": "woodwind", "tuba": "brass", "gong": "percussion", } for instrument, section in ORCHESTRA.items(): print(f"{instrument}: {section}") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5189805 pylint-4.0.9/doc/data/messages/c/consider-using-enumerate/0000755000175100017510000000000015254767632023155 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476672 pylint-4.0.9/doc/data/messages/c/consider-using-enumerate/bad.py0000644000175100017510000000020715254767617024257 0ustar00runnerrunnerseasons = ["Spring", "Summer", "Fall", "Winter"] for i in range(len(seasons)): # [consider-using-enumerate] print(i, seasons[i]) ././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177167.47675 pylint-4.0.9/doc/data/messages/c/consider-using-enumerate/good.py0000644000175100017510000000015415254767617024462 0ustar00runnerrunnerseasons = ["Spring", "Summer", "Fall", "Winter"] for i, season in enumerate(seasons): print(i, season) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.519339 pylint-4.0.9/doc/data/messages/c/consider-using-f-string/0000755000175100017510000000000015254767632022721 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177167.47675 pylint-4.0.9/doc/data/messages/c/consider-using-f-string/bad.py0000644000175100017510000000114115254767617024021 0ustar00runnerrunnerfrom string import Template menu = ("eggs", "spam", 42.4) old_order = "%s and %s: %.2f ¤" % menu # [consider-using-f-string] beginner_order = menu[0] + " and " + menu[1] + ": " + str(menu[2]) + " ¤" joined_order = " and ".join(menu[:2]) # +1: [consider-using-f-string] format_order = "{} and {}: {:0.2f} ¤".format(menu[0], menu[1], menu[2]) # +1: [consider-using-f-string] named_format_order = "{eggs} and {spam}: {price:0.2f} ¤".format( eggs=menu[0], spam=menu[1], price=menu[2] ) template_order = Template("$eggs and $spam: $price ¤").substitute( eggs=menu[0], spam=menu[1], price=menu[2] ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4768257 pylint-4.0.9/doc/data/messages/c/consider-using-f-string/details.rst0000644000175100017510000000051115254767617025100 0ustar00runnerrunnerFormatted string literals (f-strings) give a concise, consistent syntax that can replace most use cases for the ``%`` formatting operator, ``str.format()`` and ``string.Template``. F-strings also perform better than alternatives; see `this tweet `_ for a simple example. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4768257 pylint-4.0.9/doc/data/messages/c/consider-using-f-string/good.py0000644000175100017510000000013615254767617024226 0ustar00runnerrunnermenu = ("eggs", "spam", 42.4) f_string_order = f"{menu[0]} and {menu[1]}: {menu[2]:0.2f} ¤" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5195754 pylint-4.0.9/doc/data/messages/c/consider-using-from-import/0000755000175100017510000000000015254767632023443 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4768257 pylint-4.0.9/doc/data/messages/c/consider-using-from-import/bad.py0000644000175100017510000000006715254767617024551 0ustar00runnerrunnerimport os.path as path # [consider-using-from-import] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4769053 pylint-4.0.9/doc/data/messages/c/consider-using-from-import/good.py0000644000175100017510000000002415254767617024744 0ustar00runnerrunnerfrom os import path ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5201032 pylint-4.0.9/doc/data/messages/c/consider-using-generator/0000755000175100017510000000000015254767632023156 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4769053 pylint-4.0.9/doc/data/messages/c/consider-using-generator/bad.py0000644000175100017510000000051415254767617024261 0ustar00runnerrunnerlist([0 for y in list(range(10))]) # [consider-using-generator] tuple([0 for y in list(range(10))]) # [consider-using-generator] sum([y**2 for y in list(range(10))]) # [consider-using-generator] max([y**2 for y in list(range(10))]) # [consider-using-generator] min([y**2 for y in list(range(10))]) # [consider-using-generator] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476975 pylint-4.0.9/doc/data/messages/c/consider-using-generator/details.rst0000644000175100017510000000050215254767617025335 0ustar00runnerrunnerRemoving ``[]`` inside calls that can use containers or generators should be considered for performance reasons since a generator will have an upfront cost to pay. The performance will be better if you are working with long lists or sets. For ``max``, ``min`` and ``sum`` using a generator is also recommended by pep289. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476975 pylint-4.0.9/doc/data/messages/c/consider-using-generator/good.py0000644000175100017510000000025415254767617024464 0ustar00runnerrunnerlist(0 for y in list(range(10))) tuple(0 for y in list(range(10))) sum(y**2 for y in list(range(10))) max(y**2 for y in list(range(10))) min(y**2 for y in list(range(10))) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476975 pylint-4.0.9/doc/data/messages/c/consider-using-generator/related.rst0000644000175100017510000000044415254767617025335 0ustar00runnerrunner- `PEP 289 `_ - `Benchmark and discussion for any/all/list/tuple `_ - `Benchmark and discussion for sum/max/min `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5203772 pylint-4.0.9/doc/data/messages/c/consider-using-get/0000755000175100017510000000000015254767632021747 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.476975 pylint-4.0.9/doc/data/messages/c/consider-using-get/bad.py0000644000175100017510000000025515254767617023054 0ustar00runnerrunnerknights = {"Gallahad": "the pure", "Robin": "the brave"} if "Gallahad" in knights: # [consider-using-get] DESCRIPTION = knights["Gallahad"] else: DESCRIPTION = "" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4770775 pylint-4.0.9/doc/data/messages/c/consider-using-get/good.py0000644000175100017510000000014415254767617023253 0ustar00runnerrunnerknights = {"Gallahad": "the pure", "Robin": "the brave"} description = knights.get("Gallahad", "") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5206184 pylint-4.0.9/doc/data/messages/c/consider-using-in/0000755000175100017510000000000015254767632021576 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4770775 pylint-4.0.9/doc/data/messages/c/consider-using-in/bad.py0000644000175100017510000000017615254767617022705 0ustar00runnerrunnerdef fruit_is_round(fruit): # +1: [consider-using-in] return fruit == "apple" or fruit == "orange" or fruit == "melon" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4771473 pylint-4.0.9/doc/data/messages/c/consider-using-in/good.py0000644000175100017510000000011415254767617023077 0ustar00runnerrunnerdef fruit_is_round(fruit): return fruit in {"apple", "orange", "melon"} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5212271 pylint-4.0.9/doc/data/messages/c/consider-using-join/0000755000175100017510000000000015254767632022127 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4771473 pylint-4.0.9/doc/data/messages/c/consider-using-join/bad.py0000644000175100017510000000033315254767617023231 0ustar00runnerrunnerdef fruits_to_string(fruits): formatted_fruit = "" for fruit in fruits: formatted_fruit += fruit # [consider-using-join] return formatted_fruit print(fruits_to_string(["apple", "pear", "peach"])) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.477212 pylint-4.0.9/doc/data/messages/c/consider-using-join/good.py0000644000175100017510000000005315254767617023432 0ustar00runnerrunnerprint("".join(["apple", "pear", "peach"])) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5214708 pylint-4.0.9/doc/data/messages/c/consider-using-max-builtin/0000755000175100017510000000000015254767632023421 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.477212 pylint-4.0.9/doc/data/messages/c/consider-using-max-builtin/bad.py0000644000175100017510000000022615254767617024524 0ustar00runnerrunnerdef get_max(value1, value2): if value1 < value2: # [consider-using-max-builtin] value1 = value2 return value1 print(get_max(1, 2)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4772782 pylint-4.0.9/doc/data/messages/c/consider-using-max-builtin/good.py0000644000175100017510000000002115254767617024717 0ustar00runnerrunnerprint(max(1, 2)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5216184 pylint-4.0.9/doc/data/messages/c/consider-using-min-builtin/0000755000175100017510000000000015254767632023417 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4772782 pylint-4.0.9/doc/data/messages/c/consider-using-min-builtin/bad.py0000644000175100017510000000022615254767617024522 0ustar00runnerrunnerdef get_min(value1, value2): if value1 > value2: # [consider-using-min-builtin] value1 = value2 return value1 print(get_min(1, 2)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4773424 pylint-4.0.9/doc/data/messages/c/consider-using-min-builtin/good.py0000644000175100017510000000002115254767617024715 0ustar00runnerrunnerprint(min(1, 2)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5220952 pylint-4.0.9/doc/data/messages/c/consider-using-namedtuple-or-dataclass/0000755000175100017510000000000015254767632025701 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4773424 pylint-4.0.9/doc/data/messages/c/consider-using-namedtuple-or-dataclass/bad.py0000644000175100017510000000054415254767617027007 0ustar00runnerrunnerFELIDAES = { # [consider-using-namedtuple-or-dataclass] "The queen's cymric, fragile furry friend": { "tail_length_cm": 1, "paws": 4, "eyes": 2, "Elizabethan collar": 1, }, "Rackat the red, terror of the sea": { "tail_length_cm": 13, "paws": 3, "eyes": 1, "Red Hat": 1, }, } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4774208 pylint-4.0.9/doc/data/messages/c/consider-using-namedtuple-or-dataclass/good.py0000644000175100017510000000066615254767617027216 0ustar00runnerrunnerfrom typing import NamedTuple class FelidaeCharacteristics(NamedTuple): tail_length_cm: int paws: int eyes: int hat: str | None FELIDAES = { "The queen's cymric, fragile furry friend": FelidaeCharacteristics( tail_length_cm=1, paws=4, eyes=2, hat="Elizabethan collar" ), "Rackat the red, terror of the sea": FelidaeCharacteristics( tail_length_cm=21, paws=3, eyes=1, hat="Red Hat" ), } ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4774208 pylint-4.0.9/doc/data/messages/c/consider-using-namedtuple-or-dataclass/pylintrc0000644000175100017510000000006115254767617027470 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.code_style ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5224621 pylint-4.0.9/doc/data/messages/c/consider-using-set-comprehension/0000755000175100017510000000000015254767632024632 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4774208 pylint-4.0.9/doc/data/messages/c/consider-using-set-comprehension/bad.py0000644000175100017510000000022415254767617025733 0ustar00runnerrunnerNUMBERS = [1, 2, 2, 3, 4, 4] # +1: [consider-using-set-comprehension] UNIQUE_EVEN_NUMBERS = set([number for number in NUMBERS if number % 2 == 0]) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4775047 pylint-4.0.9/doc/data/messages/c/consider-using-set-comprehension/details.rst0000644000175100017510000000022315254767617027011 0ustar00runnerrunnerpyupgrade_ or ruff_ can fix this issue automatically. .. _pyupgrade: https://github.com/asottile/pyupgrade .. _ruff: https://docs.astral.sh/ruff/ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4775047 pylint-4.0.9/doc/data/messages/c/consider-using-set-comprehension/good.py0000644000175100017510000000014615254767617026140 0ustar00runnerrunnerNUMBERS = [1, 2, 2, 3, 4, 4] UNIQUE_EVEN_NUMBERS = {number for number in NUMBERS if number % 2 == 0} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5227046 pylint-4.0.9/doc/data/messages/c/consider-using-sys-exit/0000755000175100017510000000000015254767632022755 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4775047 pylint-4.0.9/doc/data/messages/c/consider-using-sys-exit/bad.py0000644000175100017510000000020615254767617024056 0ustar00runnerrunnerif __name__ == "__main__": user = input("Enter user name: ") print(f"Hello, {user}") exit(0) # [consider-using-sys-exit] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4775877 pylint-4.0.9/doc/data/messages/c/consider-using-sys-exit/good.py0000644000175100017510000000017115254767617024261 0ustar00runnerrunnerimport sys if __name__ == "__main__": user = input("Enter user name: ") print(f"Hello, {user}") sys.exit(0) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5229702 pylint-4.0.9/doc/data/messages/c/consider-using-ternary/0000755000175100017510000000000015254767632022654 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4775877 pylint-4.0.9/doc/data/messages/c/consider-using-ternary/bad.py0000644000175100017510000000010415254767617023752 0ustar00runnerrunnerx, y = 1, 2 maximum = x >= y and x or y # [consider-using-ternary] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4776502 pylint-4.0.9/doc/data/messages/c/consider-using-ternary/good.py0000644000175100017510000000005115254767617024155 0ustar00runnerrunnerx, y = 1, 2 maximum = x if x >= y else y ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.523342 pylint-4.0.9/doc/data/messages/c/consider-using-tuple/0000755000175100017510000000000015254767632022321 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4776502 pylint-4.0.9/doc/data/messages/c/consider-using-tuple/bad.py0000644000175100017510000000007315254767617023424 0ustar00runnerrunnerfor i in [1, 2, 3]: # [consider-using-tuple] print(i) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4777339 pylint-4.0.9/doc/data/messages/c/consider-using-tuple/good.py0000644000175100017510000000004115254767617023621 0ustar00runnerrunnerfor i in (1, 2, 3): print(i) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4777339 pylint-4.0.9/doc/data/messages/c/consider-using-tuple/pylintrc0000644000175100017510000000006115254767617024110 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.code_style ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5237045 pylint-4.0.9/doc/data/messages/c/consider-using-with/0000755000175100017510000000000015254767632022143 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5239613 pylint-4.0.9/doc/data/messages/c/consider-using-with/bad/0000755000175100017510000000000015254767632022671 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.477817 pylint-4.0.9/doc/data/messages/c/consider-using-with/bad/close.py0000644000175100017510000000015415254767617024353 0ustar00runnerrunnerfile = open("apple.txt", "r", encoding="utf8") # [consider-using-with] contents = file.read() file.close() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4778597 pylint-4.0.9/doc/data/messages/c/consider-using-with/bad/not_even_close.py0000644000175100017510000000012315254767617026244 0ustar00runnerrunnercontents = open("apple.txt", "r", encoding="utf8").read() # [consider-using-with] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4778597 pylint-4.0.9/doc/data/messages/c/consider-using-with/details.rst0000644000175100017510000000077615254767617024337 0ustar00runnerrunnerCalling ``write()`` without using the ``with`` keyword or calling ``close()`` might result in the arguments of ``write()`` not being completely written to the disk, even if the program exits successfully. This message applies to callables of Python's stdlib which can be replaced by a ``with`` statement. It is suppressed in the following cases: - the call is located inside a context manager - the call result is returned from the enclosing function - the call result is used in a ``with`` statement itself ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4778597 pylint-4.0.9/doc/data/messages/c/consider-using-with/good.py0000644000175100017510000000012115254767617023442 0ustar00runnerrunnerwith open("apple.txt", "r", encoding="utf8") as file: contents = file.read() ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4778597 pylint-4.0.9/doc/data/messages/c/consider-using-with/related.rst0000644000175100017510000000052415254767617024321 0ustar00runnerrunner- `Python doc: Reading and writing files `_ - `PEP 343 `_ - `Context managers in Python `_ by John Lekberg - `Rationale `_ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.524448 pylint-4.0.9/doc/data/messages/c/contextmanager-generator-missing-cleanup/0000755000175100017510000000000015254767632026340 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4778597 pylint-4.0.9/doc/data/messages/c/contextmanager-generator-missing-cleanup/bad.py0000644000175100017510000000043015254767617027440 0ustar00runnerrunnerimport contextlib @contextlib.contextmanager def cm(): contextvar = "acquired context" print("cm enter") yield contextvar print("cm exit") def genfunc_with_cm(): with cm() as context: # [contextmanager-generator-missing-cleanup] yield context * 2 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.478004 pylint-4.0.9/doc/data/messages/c/contextmanager-generator-missing-cleanup/details.rst0000644000175100017510000000250215254767617030521 0ustar00runnerrunnerInstantiating and using a contextmanager inside a generator function can result in unexpected behavior if there is an expectation that the context is only available for the generator function. In the case that the generator is not closed or destroyed then the context manager is held suspended as is. This message warns on the generator function instead of the contextmanager function because the ways to use a contextmanager are many. A contextmanager can be used as a decorator (which immediately has ``__enter__``/``__exit__`` applied) and the use of ``as ...`` or discard of the return value also implies whether the context needs cleanup or not. So for this message, warning the invoker of the contextmanager is important. The check can create false positives if ``yield`` is used inside an ``if-else`` block without custom cleanup. Use ``pylint: disable`` for these. .. code-block:: python from contextlib import contextmanager @contextmanager def good_cm_no_cleanup(): contextvar = "acquired context" print("cm enter") if some_condition: yield contextvar else: yield contextvar def good_cm_no_cleanup_genfunc(): # pylint: disable-next=contextmanager-generator-missing-cleanup with good_cm_no_cleanup() as context: yield context * 2 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.478004 pylint-4.0.9/doc/data/messages/c/contextmanager-generator-missing-cleanup/good.py0000644000175100017510000000221115254767617027641 0ustar00runnerrunnerimport contextlib @contextlib.contextmanager def good_cm_except(): contextvar = "acquired context" print("good cm enter") try: yield contextvar except GeneratorExit: print("good cm exit") def genfunc_with_cm(): with good_cm_except() as context: yield context * 2 def genfunc_with_discard(): with good_cm_except(): yield "discarded" @contextlib.contextmanager def good_cm_yield_none(): print("good cm enter") yield print("good cm exit") def genfunc_with_none_yield(): with good_cm_yield_none() as var: print(var) yield "constant yield" @contextlib.contextmanager def good_cm_finally(): contextvar = "acquired context" print("good cm enter") try: yield contextvar finally: print("good cm exit") def good_cm_finally_genfunc(): with good_cm_finally() as context: yield context * 2 @contextlib.contextmanager def good_cm_no_cleanup(): contextvar = "acquired context" print("cm enter") yield contextvar def good_cm_no_cleanup_genfunc(): with good_cm_no_cleanup() as context: yield context * 2 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.478004 pylint-4.0.9/doc/data/messages/c/contextmanager-generator-missing-cleanup/related.rst0000644000175100017510000000030015254767617030506 0ustar00runnerrunner- `Rationale `_ - `CPython Issue `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5248203 pylint-4.0.9/doc/data/messages/c/continue-in-finally/0000755000175100017510000000000015254767632022125 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.478004 pylint-4.0.9/doc/data/messages/c/continue-in-finally/bad.py0000644000175100017510000000013115254767617023223 0ustar00runnerrunnerwhile True: try: pass finally: continue # [continue-in-finally] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4782183 pylint-4.0.9/doc/data/messages/c/continue-in-finally/good.py0000644000175100017510000000014115254767617023426 0ustar00runnerrunnerwhile True: try: pass except ValueError: pass else: continue ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4782183 pylint-4.0.9/doc/data/messages/c/continue-in-finally/related.rst0000644000175100017510000000033115254767617024277 0ustar00runnerrunner- `Python 3 docs 'finally' clause `_ - `PEP 765 - Disallow return/break/continue that exit a finally block `_ ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.525062 pylint-4.0.9/doc/data/messages/c/cyclic-import/0000755000175100017510000000000015254767632021017 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5254033 pylint-4.0.9/doc/data/messages/c/cyclic-import/bad/0000755000175100017510000000000015254767632021545 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4782884 pylint-4.0.9/doc/data/messages/c/cyclic-import/bad/__init__.py0000644000175100017510000000000015254767617023647 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4783225 pylint-4.0.9/doc/data/messages/c/cyclic-import/bad/bad.py0000644000175100017510000000017315254767617022651 0ustar00runnerrunnerdef count_to_one(): return 1 def count_to_three(): from .bad2 import count_to_two return count_to_two() + 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4783225 pylint-4.0.9/doc/data/messages/c/cyclic-import/bad/bad2.py0000644000175100017510000000014515254767617022732 0ustar00runnerrunnerfrom .bad import count_to_one # [cyclic-import] def count_to_two(): return count_to_one() + 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4783225 pylint-4.0.9/doc/data/messages/c/cyclic-import/details.rst0000644000175100017510000000026315254767617023202 0ustar00runnerrunnerThe good code is just an example. There are various strategies to resolving cyclic imports and the best choice relies heavily on the context of the code and the affected modules. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4783225 pylint-4.0.9/doc/data/messages/c/cyclic-import/good.py0000644000175100017510000000021315254767617022320 0ustar00runnerrunnerdef count_to_one(): return 1 def count_to_two(): return count_to_one() + 1 def count_to_three(): return count_to_two() + 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4086185 pylint-4.0.9/doc/data/messages/d/0000755000175100017510000000000015254767631016241 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5257778 pylint-4.0.9/doc/data/messages/d/dangerous-default-value/0000755000175100017510000000000015254767632022765 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4784281 pylint-4.0.9/doc/data/messages/d/dangerous-default-value/bad.py0000644000175100017510000000017615254767617024074 0ustar00runnerrunnerdef whats_on_the_telly(penguin=[]): # [dangerous-default-value] penguin.append("property of the zoo") return penguin ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4784698 pylint-4.0.9/doc/data/messages/d/dangerous-default-value/details.rst0000644000175100017510000000051115254767617025144 0ustar00runnerrunnerWith a mutable default value, with each call the default value is modified, i.e.: .. code-block:: python whats_on_the_telly() # ["property of the zoo"] whats_on_the_telly() # ["property of the zoo", "property of the zoo"] whats_on_the_telly() # ["property of the zoo", "property of the zoo", "property of the zoo"] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4784698 pylint-4.0.9/doc/data/messages/d/dangerous-default-value/good.py0000644000175100017510000000022015254767617024264 0ustar00runnerrunnerdef whats_on_the_telly(penguin=None): if penguin is None: penguin = [] penguin.append("property of the zoo") return penguin ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.526022 pylint-4.0.9/doc/data/messages/d/declare-non-slot/0000755000175100017510000000000015254767632021410 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4784698 pylint-4.0.9/doc/data/messages/d/declare-non-slot/bad.py0000644000175100017510000000013715254767617022514 0ustar00runnerrunnerclass Student: __slots__ = ("name",) name: str surname: str # [declare-non-slot] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4785554 pylint-4.0.9/doc/data/messages/d/declare-non-slot/good.py0000644000175100017510000000012315254767617022711 0ustar00runnerrunnerclass Student: __slots__ = ("name", "surname") name: str surname: str ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5265133 pylint-4.0.9/doc/data/messages/d/deprecated-argument/0000755000175100017510000000000015254767632022162 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4785554 pylint-4.0.9/doc/data/messages/d/deprecated-argument/bad.py0000644000175100017510000000004215254767617023261 0ustar00runnerrunnerint(x=1) # [deprecated-argument] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786189 pylint-4.0.9/doc/data/messages/d/deprecated-argument/details.rst0000644000175100017510000000017415254767617024346 0ustar00runnerrunnerThe actual replacement needs to be studied on a case by case basis by reading the deprecation warning or the release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786189 pylint-4.0.9/doc/data/messages/d/deprecated-argument/good.py0000644000175100017510000000000715254767617023464 0ustar00runnerrunnerint(1) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786189 pylint-4.0.9/doc/data/messages/d/deprecated-argument/pylintrc0000644000175100017510000000000015254767617023742 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5268638 pylint-4.0.9/doc/data/messages/d/deprecated-attribute/0000755000175100017510000000000015254767632022343 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786189 pylint-4.0.9/doc/data/messages/d/deprecated-attribute/bad.py0000644000175100017510000000016615254767617023451 0ustar00runnerrunnerfrom configparser import ParsingError err = ParsingError("filename") source = err.filename # [deprecated-attribute] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786203 pylint-4.0.9/doc/data/messages/d/deprecated-attribute/details.rst0000644000175100017510000000017415254767617024527 0ustar00runnerrunnerThe actual replacement needs to be studied on a case by case basis by reading the deprecation warning or the release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786203 pylint-4.0.9/doc/data/messages/d/deprecated-attribute/good.py0000644000175100017510000000013215254767617023644 0ustar00runnerrunnerfrom configparser import ParsingError err = ParsingError("filename") source = err.source ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5272207 pylint-4.0.9/doc/data/messages/d/deprecated-class/0000755000175100017510000000000015254767632021445 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4786203 pylint-4.0.9/doc/data/messages/d/deprecated-class/bad.py0000644000175100017510000000006715254767617022553 0ustar00runnerrunnerfrom collections import Iterable # [deprecated-class] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4788377 pylint-4.0.9/doc/data/messages/d/deprecated-class/details.rst0000644000175100017510000000017415254767617023631 0ustar00runnerrunnerThe actual replacement needs to be studied on a case by case basis by reading the deprecation warning or the release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4788377 pylint-4.0.9/doc/data/messages/d/deprecated-class/good.py0000644000175100017510000000004515254767617022751 0ustar00runnerrunnerfrom collections.abc import Iterable ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5276868 pylint-4.0.9/doc/data/messages/d/deprecated-decorator/0000755000175100017510000000000015254767632022322 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4788377 pylint-4.0.9/doc/data/messages/d/deprecated-decorator/bad.py0000644000175100017510000000016415254767617023426 0ustar00runnerrunnerimport abc class Animal: @abc.abstractclassmethod # [deprecated-decorator] def breath(cls): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4789197 pylint-4.0.9/doc/data/messages/d/deprecated-decorator/details.rst0000644000175100017510000000017415254767617024506 0ustar00runnerrunnerThe actual replacement needs to be studied on a case by case basis by reading the deprecation warning or the release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4789197 pylint-4.0.9/doc/data/messages/d/deprecated-decorator/good.py0000644000175100017510000000015215254767617023625 0ustar00runnerrunnerimport abc class Animal: @abc.classmethod @abc.abstractmethod def breath(cls): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4789197 pylint-4.0.9/doc/data/messages/d/deprecated-decorator/pylintrc0000644000175100017510000000003015254767617024105 0ustar00runnerrunner[main] py-version = 3.3 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5280623 pylint-4.0.9/doc/data/messages/d/deprecated-method/0000755000175100017510000000000015254767632021620 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4789197 pylint-4.0.9/doc/data/messages/d/deprecated-method/bad.py0000644000175100017510000000011315254767617022716 0ustar00runnerrunnerimport logging logging.warn("I'm coming, world !") # [deprecated-method] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4790192 pylint-4.0.9/doc/data/messages/d/deprecated-method/details.rst0000644000175100017510000000017415254767617024004 0ustar00runnerrunnerThe actual replacement needs to be studied on a case by case basis by reading the deprecation warning or the release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4790192 pylint-4.0.9/doc/data/messages/d/deprecated-method/good.py0000644000175100017510000000006715254767617023130 0ustar00runnerrunnerimport logging logging.warning("I'm coming, world !") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.528547 pylint-4.0.9/doc/data/messages/d/deprecated-module/0000755000175100017510000000000015254767632021625 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4790192 pylint-4.0.9/doc/data/messages/d/deprecated-module/bad.py0000644000175100017510000000013115254767617022723 0ustar00runnerrunnerimport distutils # [deprecated-module] import whatever_you_want # [deprecated-module] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4791036 pylint-4.0.9/doc/data/messages/d/deprecated-module/details.rst0000644000175100017510000000017415254767617024011 0ustar00runnerrunnerThe actual replacement needs to be studied on a case by case basis by reading the deprecation warning or the release notes. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4791036 pylint-4.0.9/doc/data/messages/d/deprecated-module/good.py0000644000175100017510000000006715254767617023135 0ustar00runnerrunnerimport setuptools import whatever_replacement_you_want ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4791036 pylint-4.0.9/doc/data/messages/d/deprecated-module/pylintrc0000644000175100017510000000007315254767617023417 0ustar00runnerrunner[main] py-version=3.7 deprecated-modules=whatever_you_want ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.528798 pylint-4.0.9/doc/data/messages/d/deprecated-pragma/0000755000175100017510000000000015254767632021607 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4791036 pylint-4.0.9/doc/data/messages/d/deprecated-pragma/bad.py0000644000175100017510000000006615254767617022714 0ustar00runnerrunner# pylint: disable-msg=eval-used # [deprecated-pragma] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4792087 pylint-4.0.9/doc/data/messages/d/deprecated-pragma/good.py0000644000175100017510000000003615254767617023113 0ustar00runnerrunner# pylint: disable = eval-used ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5291533 pylint-4.0.9/doc/data/messages/d/deprecated-typing-alias/0000755000175100017510000000000015254767632022741 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4792087 pylint-4.0.9/doc/data/messages/d/deprecated-typing-alias/bad.py0000644000175100017510000000013215254767617024040 0ustar00runnerrunnerimport typing item_to_number_of_item: typing.Dict[str, int] # [deprecated-typing-alias] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4792705 pylint-4.0.9/doc/data/messages/d/deprecated-typing-alias/good.py0000644000175100017510000000004715254767617024247 0ustar00runnerrunneritem_to_number_of_item: dict[str, int] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4792705 pylint-4.0.9/doc/data/messages/d/deprecated-typing-alias/pylintrc0000644000175100017510000000005715254767617024535 0ustar00runnerrunner[main] load-plugins = pylint.extensions.typing ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5295007 pylint-4.0.9/doc/data/messages/d/dict-init-mutate/0000755000175100017510000000000015254767632021423 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4792705 pylint-4.0.9/doc/data/messages/d/dict-init-mutate/bad.py0000644000175100017510000000013615254767617022526 0ustar00runnerrunnerfruit_prices = {} # [dict-init-mutate] fruit_prices["apple"] = 1 fruit_prices["banana"] = 10 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4793537 pylint-4.0.9/doc/data/messages/d/dict-init-mutate/good.py0000644000175100017510000000005215254767617022725 0ustar00runnerrunnerfruit_prices = {"apple": 1, "banana": 10} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4793537 pylint-4.0.9/doc/data/messages/d/dict-init-mutate/pylintrc0000644000175100017510000000007015254767617023212 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.dict_init_mutate, ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.529752 pylint-4.0.9/doc/data/messages/d/dict-iter-missing-items/0000755000175100017510000000000015254767632022714 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4793537 pylint-4.0.9/doc/data/messages/d/dict-iter-missing-items/bad.py0000644000175100017510000000027215254767617024020 0ustar00runnerrunnerdata = {"Paris": 2_165_423, "New York City": 8_804_190, "Tokyo": 13_988_129} for city, population in data: # [dict-iter-missing-items] print(f"{city} has population {population}.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4794397 pylint-4.0.9/doc/data/messages/d/dict-iter-missing-items/good.py0000644000175100017510000000024515254767617024222 0ustar00runnerrunnerdata = {"Paris": 2_165_423, "New York City": 8_804_190, "Tokyo": 13_988_129} for city, population in data.items(): print(f"{city} has population {population}.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5303886 pylint-4.0.9/doc/data/messages/d/differing-param-doc/0000755000175100017510000000000015254767632022040 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4794397 pylint-4.0.9/doc/data/messages/d/differing-param-doc/bad.py0000644000175100017510000000022115254767617023136 0ustar00runnerrunnerdef add(x, y): # [differing-param-doc] """Add two numbers. :param int x: x value. :param int z: z value. """ return x + y ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.479503 pylint-4.0.9/doc/data/messages/d/differing-param-doc/good.py0000644000175100017510000000017015254767617023343 0ustar00runnerrunnerdef add(x, y): """Add two numbers. :param int x: x value. :param int y: y value. """ return x + y ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.479503 pylint-4.0.9/doc/data/messages/d/differing-param-doc/pylintrc0000644000175100017510000000006215254767617023630 0ustar00runnerrunner[MAIN] load-plugins = pylint.extensions.docparams ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5310996 pylint-4.0.9/doc/data/messages/d/differing-type-doc/0000755000175100017510000000000015254767632021721 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.479503 pylint-4.0.9/doc/data/messages/d/differing-type-doc/bad.py0000644000175100017510000000023315254767617023022 0ustar00runnerrunnerdef add(x: int, y: int): # [differing-type-doc] """Add two numbers. :param int xy: x value. :param str y: y value. """ return x + y ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4795868 pylint-4.0.9/doc/data/messages/d/differing-type-doc/good.py0000644000175100017510000000017015254767617023224 0ustar00runnerrunnerdef add(x, y): """Add two numbers. :param int x: x value. :param int y: y value. """ return x + y ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4795868 pylint-4.0.9/doc/data/messages/d/differing-type-doc/pylintrc0000644000175100017510000000006215254767617023511 0ustar00runnerrunner[MAIN] load-plugins = pylint.extensions.docparams ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5319679 pylint-4.0.9/doc/data/messages/d/disallowed-name/0000755000175100017510000000000015254767632021307 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4795868 pylint-4.0.9/doc/data/messages/d/disallowed-name/bad.py0000644000175100017510000000006415254767617022412 0ustar00runnerrunnerdef foo(): # [disallowed-name] print("apples") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4796662 pylint-4.0.9/doc/data/messages/d/disallowed-name/good.py0000644000175100017510000000004715254767617022615 0ustar00runnerrunnerdef print_fruit(): print("apples") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4796662 pylint-4.0.9/doc/data/messages/d/disallowed-name/pylintrc0000644000175100017510000000003515254767617023077 0ustar00runnerrunner[MAIN] bad-names=foo,bar,baz ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5324817 pylint-4.0.9/doc/data/messages/d/docstring-first-line-empty/0000755000175100017510000000000015254767632023444 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4796662 pylint-4.0.9/doc/data/messages/d/docstring-first-line-empty/bad.py0000644000175100017510000000050515254767617024547 0ustar00runnerrunnerdef foo(): # [docstring-first-line-empty] """ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book """ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4797719 pylint-4.0.9/doc/data/messages/d/docstring-first-line-empty/good.py0000644000175100017510000000044015254767617024747 0ustar00runnerrunnerdef foo(): """Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book """ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4797719 pylint-4.0.9/doc/data/messages/d/docstring-first-line-empty/pylintrc0000644000175100017510000000006115254767617025233 0ustar00runnerrunner[MAIN] load-plugins = pylint.extensions.docstyle ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5327685 pylint-4.0.9/doc/data/messages/d/duplicate-argument-name/0000755000175100017510000000000015254767632022752 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4797719 pylint-4.0.9/doc/data/messages/d/duplicate-argument-name/bad.py0000644000175100017510000000011415254767617024051 0ustar00runnerrunnerdef get_fruits(apple, banana, apple): # [duplicate-argument-name] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4798517 pylint-4.0.9/doc/data/messages/d/duplicate-argument-name/good.py0000644000175100017510000000006015254767617024253 0ustar00runnerrunnerdef get_fruits(apple, banana, orange): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5331545 pylint-4.0.9/doc/data/messages/d/duplicate-bases/0000755000175100017510000000000015254767632021307 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4798517 pylint-4.0.9/doc/data/messages/d/duplicate-bases/bad.py0000644000175100017510000000012215254767617022405 0ustar00runnerrunnerclass Animal: pass class Cat(Animal, Animal): # [duplicate-bases] pass ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.479914 pylint-4.0.9/doc/data/messages/d/duplicate-bases/good.py0000644000175100017510000000012415254767617022611 0ustar00runnerrunnerclass Animal: pass class Bird(Animal): pass class Cat(Animal): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5333104 pylint-4.0.9/doc/data/messages/d/duplicate-code/0000755000175100017510000000000015254767632021124 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5338802 pylint-4.0.9/doc/data/messages/d/duplicate-code/bad/0000755000175100017510000000000015254767632021652 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.479973 pylint-4.0.9/doc/data/messages/d/duplicate-code/bad/__init__.py0000644000175100017510000000000015254767617023754 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4800105 pylint-4.0.9/doc/data/messages/d/duplicate-code/bad/apple.py0000644000175100017510000000064115254767617023331 0ustar00runnerrunnerclass Apple: def __init__(self): self.remaining_bites = 3 def take_bite(self): if self.remaining_bites > 0: print("You take a bite of the apple.") self.remaining_bites -= 1 else: print("The apple is already eaten up!") def eaten_by_animal(self, animal): self.remaining_bites = 0 print("The apple has been eaten by an animal.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4800105 pylint-4.0.9/doc/data/messages/d/duplicate-code/bad/orange.py0000644000175100017510000000102015254767617023473 0ustar00runnerrunnerclass Orange: # [duplicate-code] def __init__(self): self.remaining_bites = 3 def take_bite(self): if self.remaining_bites > 0: print("You take a bite of the apple.") self.remaining_bites -= 1 else: print("The orange is already eaten up!") def eaten_by_animal(self, animal): if animal == "cat": raise ValueError("A cat would never do that !") self.remaining_bites = 0 print("The orange has been eaten by an animal.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4800105 pylint-4.0.9/doc/data/messages/d/duplicate-code/details.rst0000644000175100017510000000116515254767617023311 0ustar00runnerrunnerIf you need to make a change to the logic or functionality of the duplicated code, you will need to identify all the places that need to be changed, which can be time-consuming and error-prone. If there are multiple copies of the same code, then you will also need to test each copy to ensure that the functionality is correct. Duplicate code can be confusing for someone who is trying to understand the logic and flow of the code if they come across multiple identical or nearly identical blocks of code. The reader can then skim and think something is identical when it actually isn't. This is particularly true during review. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5343978 pylint-4.0.9/doc/data/messages/d/duplicate-code/good/0000755000175100017510000000000015254767632022054 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4800105 pylint-4.0.9/doc/data/messages/d/duplicate-code/good/__init__.py0000644000175100017510000000000015254767617024156 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4801168 pylint-4.0.9/doc/data/messages/d/duplicate-code/good/apple.py0000644000175100017510000000006215254767617023530 0ustar00runnerrunnerfrom fruit import Fruit class Apple(Fruit): ... ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4801168 pylint-4.0.9/doc/data/messages/d/duplicate-code/good/fruit.py0000644000175100017510000000077015254767617023566 0ustar00runnerrunnerclass Fruit: def __init__(self): self.remaining_bites = 3 def take_bite(self): if self.remaining_bites > 0: print(f"You take a bite of the {self.__class__.__name__.lower()}.") self.remaining_bites -= 1 else: print(f"The {self.__class__.__name__.lower()} is already eaten up!") def eaten_by_animal(self, animal): self.remaining_bites = 0 print(f"The {self.__class__.__name__.lower()} has been eaten by an animal.") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4801168 pylint-4.0.9/doc/data/messages/d/duplicate-code/good/orange.py0000644000175100017510000000032615254767617023705 0ustar00runnerrunnerfrom fruit import Fruit class Orange(Fruit): def eaten_by_animal(self, animal): if animal == "cat": raise ValueError("A cat would never do that !") super().eaten_by_animal(animal) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5346756 pylint-4.0.9/doc/data/messages/d/duplicate-except/0000755000175100017510000000000015254767632021502 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4801168 pylint-4.0.9/doc/data/messages/d/duplicate-except/bad.py0000644000175100017510000000015315254767617022604 0ustar00runnerrunnertry: 1 / 0 except ZeroDivisionError: pass except ZeroDivisionError: # [duplicate-except] pass ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480222 pylint-4.0.9/doc/data/messages/d/duplicate-except/good.py0000644000175100017510000000006215254767617023005 0ustar00runnerrunnertry: 1 / 0 except ZeroDivisionError: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5350802 pylint-4.0.9/doc/data/messages/d/duplicate-key/0000755000175100017510000000000015254767632021002 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480222 pylint-4.0.9/doc/data/messages/d/duplicate-key/bad.py0000644000175100017510000000012615254767617022104 0ustar00runnerrunnertest_score = {"Mathematics": 85, "Biology": 90, "Mathematics": 75} # [duplicate-key] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480285 pylint-4.0.9/doc/data/messages/d/duplicate-key/good.py0000644000175100017510000000007715254767617022313 0ustar00runnerrunnertest_score = {"Mathematics": 85, "Biology": 90, "History": 75} ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480285 pylint-4.0.9/doc/data/messages/d/duplicate-key/related.rst0000644000175100017510000000027215254767617023160 0ustar00runnerrunner- `Python Dictionaries `_ - `Mapping Types — dict `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5353677 pylint-4.0.9/doc/data/messages/d/duplicate-string-formatting-argument/0000755000175100017510000000000015254767632025510 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480285 pylint-4.0.9/doc/data/messages/d/duplicate-string-formatting-argument/bad.py0000644000175100017510000000071215254767617026613 0ustar00runnerrunner# pylint: disable=missing-docstring, consider-using-f-string SEE = "see 👀" SEA = "sea 🌊" # +1: [duplicate-string-formatting-argument,duplicate-string-formatting-argument] CONST = """ A sailor went to {}, {}, {} To {} what he could {}, {}, {} But all that he could {}, {}, {} Was the bottom of the deep blue {}, {}, {}! """.format( SEA, SEA, SEA, SEE, SEE, SEE, SEE, SEE, SEE, SEE, SEA, SEA, SEA, ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4803803 pylint-4.0.9/doc/data/messages/d/duplicate-string-formatting-argument/good.py0000644000175100017510000000047715254767617027025 0ustar00runnerrunner# pylint: disable=missing-docstring, consider-using-f-string SEE = "see 👀" SEA = "sea 🌊" CONST = """ A sailor went to {sea}, {sea}, {sea} To {see} what he could {see}, {see}, {see} But all that he could {see}, {see}, {see} Was the bottom of the deep blue {sea}, {sea}, {sea}! """.format( sea=SEA, see=SEE ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5356445 pylint-4.0.9/doc/data/messages/d/duplicate-value/0000755000175100017510000000000015254767632021326 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4803803 pylint-4.0.9/doc/data/messages/d/duplicate-value/bad.py0000644000175100017510000000010115254767617022421 0ustar00runnerrunnerincorrect_set = {"value1", 23, 5, "value1"} # [duplicate-value] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4804485 pylint-4.0.9/doc/data/messages/d/duplicate-value/good.py0000644000175100017510000000004015254767617022625 0ustar00runnerrunnercorrect_set = {"value1", 23, 5} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4086185 pylint-4.0.9/doc/data/messages/e/0000755000175100017510000000000015254767631016242 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5361202 pylint-4.0.9/doc/data/messages/e/else-if-used/0000755000175100017510000000000015254767632020525 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4804976 pylint-4.0.9/doc/data/messages/e/else-if-used/bad.py0000644000175100017510000000015415254767617021630 0ustar00runnerrunnerif input(): pass else: if len(input()) >= 10: # [else-if-used] pass else: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4805355 pylint-4.0.9/doc/data/messages/e/else-if-used/good.py0000644000175100017510000000010615254767617022027 0ustar00runnerrunnerif input(): pass elif len(input()) >= 10: pass else: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4805355 pylint-4.0.9/doc/data/messages/e/else-if-used/pylintrc0000644000175100017510000000006115254767617022314 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.check_elif ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5365582 pylint-4.0.9/doc/data/messages/e/empty-comment/0000755000175100017510000000000015254767632021041 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4805355 pylint-4.0.9/doc/data/messages/e/empty-comment/bad.py0000644000175100017510000000006615254767617022146 0ustar00runnerrunner# +1:[empty-comment] # # +1:[empty-comment] x = 0 # ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480614 pylint-4.0.9/doc/data/messages/e/empty-comment/good.py0000644000175100017510000000003415254767617022343 0ustar00runnerrunner# comment x = 0 # comment ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480614 pylint-4.0.9/doc/data/messages/e/empty-comment/pylintrc0000644000175100017510000000006415254767617022633 0ustar00runnerrunner[main] load-plugins=pylint.extensions.empty_comment ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5368438 pylint-4.0.9/doc/data/messages/e/empty-docstring/0000755000175100017510000000000015254767632021373 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.480614 pylint-4.0.9/doc/data/messages/e/empty-docstring/bad.py0000644000175100017510000000005315254767617022474 0ustar00runnerrunnerdef foo(): # [empty-docstring] """""" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4806993 pylint-4.0.9/doc/data/messages/e/empty-docstring/good.py0000644000175100017510000000005215254767617022675 0ustar00runnerrunnerdef foo(): """A dummy description.""" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5372322 pylint-4.0.9/doc/data/messages/e/eq-without-hash/0000755000175100017510000000000015254767632021272 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4806993 pylint-4.0.9/doc/data/messages/e/eq-without-hash/bad.py0000644000175100017510000000032015254767617022370 0ustar00runnerrunnerclass Fruit: # [eq-without-hash] def __init__(self) -> None: self.name = "apple" def __eq__(self, other: object) -> bool: return isinstance(other, Fruit) and other.name == self.name ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4807782 pylint-4.0.9/doc/data/messages/e/eq-without-hash/good.py0000644000175100017510000000037215254767617022601 0ustar00runnerrunnerclass Fruit: def __init__(self) -> None: self.name = "apple" def __eq__(self, other: object) -> bool: return isinstance(other, Fruit) and other.name == self.name def __hash__(self) -> int: return hash(self.name) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4807782 pylint-4.0.9/doc/data/messages/e/eq-without-hash/pylintrc0000644000175100017510000000006715254767617023067 0ustar00runnerrunner[MAIN] load-plugins=pylint.extensions.eq_without_hash, ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5374851 pylint-4.0.9/doc/data/messages/e/eval-used/0000755000175100017510000000000015254767632020130 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4807782 pylint-4.0.9/doc/data/messages/e/eval-used/bad.py0000644000175100017510000000004115254767617021226 0ustar00runnerrunnereval("[1, 2, 3]") # [eval-used] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4808593 pylint-4.0.9/doc/data/messages/e/eval-used/good.py0000644000175100017510000000007015254767617021432 0ustar00runnerrunnerfrom ast import literal_eval literal_eval("[1, 2, 3]") ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.538005 pylint-4.0.9/doc/data/messages/e/exec-used/0000755000175100017510000000000015254767632020125 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4808593 pylint-4.0.9/doc/data/messages/e/exec-used/bad.py0000644000175100017510000000025615254767617021233 0ustar00runnerrunnerusername = "Ada" code_to_execute = f"""input('Enter code to be executed please, {username}: ')""" program = exec(code_to_execute) # [exec-used] exec(program) # [exec-used] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4809327 pylint-4.0.9/doc/data/messages/e/exec-used/details.rst0000644000175100017510000000324715254767617022315 0ustar00runnerrunnerThe available methods and variables used in ``exec()`` may introduce a security hole. You can restrict the use of these variables and methods by passing optional globals and locals parameters (dictionaries) to the ``exec()`` method. However, use of ``exec()`` is still insecure if you allow some functions like ``__import__`` or ``open``. For example, consider the following call that writes a file to the user's system and then execute code unrestrained by the ``allowed_globals``, or ``allowed_locals`` parameters: .. code-block:: python import textwrap def forbid_print(*args): raise ValueError("This is raised when a print is used") allowed_globals = { "__builtins__": { "__import__": __builtins__.__import__, "open": __builtins__.open, "print": forbid_print, } } exec( textwrap.dedent( """ import textwrap with open("nefarious.py", "w") as f: f.write(textwrap.dedent(''' def connive(): print("Here's some code as nefarious as imaginable") ''')) import nefarious nefarious.connive() # This will NOT raise a ValueError """ ), allowed_globals, ) The import is used only for readability of the example in this case but it could import a dangerous functions: - ``subprocess.run('echo "print(\"Hello, World!\")" > nefarious.py'`` - ``pathlib.Path("nefarious.py").write_file("print(\"Hello, World!\")")`` - ``os.system('echo "print(\"Hello, World!\")" > nefarious.py')`` - ``logging.basicConfig(filename='nefarious.py'); logging.error('print("Hello, World!")')`` - etc. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4809327 pylint-4.0.9/doc/data/messages/e/exec-used/good.py0000644000175100017510000000064515254767617021437 0ustar00runnerrunnerdef get_user_code(name): return input(f"Enter code to be executed please, {name}: ") username = "Ada" # If the globals dictionary does not contain a value for the key __builtins__, # all builtins are allowed. You need to be explicit about it being disallowed. allowed_globals = {"__builtins__": {}} allowed_locals = {} # pylint: disable-next=exec-used exec(get_user_code(username), allowed_globals, allowed_locals) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4809327 pylint-4.0.9/doc/data/messages/e/exec-used/related.rst0000644000175100017510000000026315254767617022303 0ustar00runnerrunner- `Be careful with exec and eval in Python `_ - `Python documentation `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5382595 pylint-4.0.9/doc/data/messages/e/expression-not-assigned/0000755000175100017510000000000015254767632023033 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4809327 pylint-4.0.9/doc/data/messages/e/expression-not-assigned/bad.py0000644000175100017510000000005515254767617024136 0ustar00runnerrunnerstr(42) == "42" # [expression-not-assigned] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4810402 pylint-4.0.9/doc/data/messages/e/expression-not-assigned/good.py0000644000175100017510000000004215254767617024334 0ustar00runnerrunnerare_equal: bool = str(42) == "42" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4096186 pylint-4.0.9/doc/data/messages/f/0000755000175100017510000000000015254767631016243 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5385683 pylint-4.0.9/doc/data/messages/f/f-string-without-interpolation/0000755000175100017510000000000015254767632024363 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4810886 pylint-4.0.9/doc/data/messages/f/f-string-without-interpolation/bad.py0000644000175100017510000000011015254767617025456 0ustar00runnerrunnerx = 1 y = 2 print(f"x + y = x + y") # [f-string-without-interpolation] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481129 pylint-4.0.9/doc/data/messages/f/f-string-without-interpolation/good.py0000644000175100017510000000005215254767617025665 0ustar00runnerrunnerx = 1 y = 2 print(f"{x} + {y} = {x + y}") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5386992 pylint-4.0.9/doc/data/messages/f/fatal/0000755000175100017510000000000015254767632017333 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481129 pylint-4.0.9/doc/data/messages/f/fatal/details.rst0000644000175100017510000000014315254767617021513 0ustar00runnerrunnerThis is a message linked to an internal problem in pylint. There's nothing to change in your code. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5392082 pylint-4.0.9/doc/data/messages/f/file-ignored/0000755000175100017510000000000015254767632020610 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481129 pylint-4.0.9/doc/data/messages/f/file-ignored/bad.py0000644000175100017510000000005115254767617021707 0ustar00runnerrunner# pylint: skip-file # -1: [file-ignored] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4812336 pylint-4.0.9/doc/data/messages/f/file-ignored/details.rst0000644000175100017510000000011515254767617022767 0ustar00runnerrunnerThere's no checks at all for a file if it starts by ``# pylint: skip-file``. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4812336 pylint-4.0.9/doc/data/messages/f/file-ignored/good.py0000644000175100017510000000000015254767617022103 0ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5395105 pylint-4.0.9/doc/data/messages/f/fixme/0000755000175100017510000000000015254767632017354 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4812336 pylint-4.0.9/doc/data/messages/f/fixme/bad.py0000644000175100017510000000006415254767617020457 0ustar00runnerrunner# TODO: We should fix this at some point # [fixme] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4813142 pylint-4.0.9/doc/data/messages/f/fixme/details.rst0000644000175100017510000000031315254767617021533 0ustar00runnerrunnerYou can use regular expressions and the ``notes-rgx`` option to create some constraints for this message. See `the following issue `_ for some examples. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.540015 pylint-4.0.9/doc/data/messages/f/fixme/good/0000755000175100017510000000000015254767632020304 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4813142 pylint-4.0.9/doc/data/messages/f/fixme/good/bug_tracker.py0000644000175100017510000000010515254767617023145 0ustar00runnerrunner# The issue was added to the bug tracker: no longer need the comment ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481378 pylint-4.0.9/doc/data/messages/f/fixme/good/fixed.py0000644000175100017510000000006215254767617021756 0ustar00runnerrunner# The issue was fixed: no longer need the comment ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481378 pylint-4.0.9/doc/data/messages/f/fixme/good/no_fix.py0000644000175100017510000000007415254767617022144 0ustar00runnerrunner# We no longer want to fix this: no longer need the comment ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5404668 pylint-4.0.9/doc/data/messages/f/forgotten-debug-statement/0000755000175100017510000000000015254767632023341 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481378 pylint-4.0.9/doc/data/messages/f/forgotten-debug-statement/bad.py0000644000175100017510000000053115254767617024443 0ustar00runnerrunnerimport pdb def find_the_treasure(clues): for clue in clues: pdb.set_trace() # [forgotten-debug-statement] if "treasure" in clue: return True return False treasure_hunt = [ "Dead Man's Chest", "X marks the spot", "The treasure is buried near the palm tree", ] find_the_treasure(treasure_hunt) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4814682 pylint-4.0.9/doc/data/messages/f/forgotten-debug-statement/good.py0000644000175100017510000000042515254767617024647 0ustar00runnerrunnerdef find_the_treasure(clues): for clue in clues: if "treasure" in clue: return True return False treasure_hunt = [ "Dead Man's Chest", "X marks the spot", "The treasure is buried near the palm tree", ] find_the_treasure(treasure_hunt) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5406184 pylint-4.0.9/doc/data/messages/f/format-combined-specification/0000755000175100017510000000000015254767632024130 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4814682 pylint-4.0.9/doc/data/messages/f/format-combined-specification/bad.py0000644000175100017510000000011415254767617025227 0ustar00runnerrunnerprint("{} {1}".format("hello", "world")) # [format-combined-specification] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5409892 pylint-4.0.9/doc/data/messages/f/format-combined-specification/good/0000755000175100017510000000000015254767632025060 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4815385 pylint-4.0.9/doc/data/messages/f/format-combined-specification/good/index_formatting.py0000644000175100017510000000005215254767617030773 0ustar00runnerrunnerprint("{0} {1}".format("hello", "world")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4815724 pylint-4.0.9/doc/data/messages/f/format-combined-specification/good/order_formatting.py0000644000175100017510000000005015254767617030775 0ustar00runnerrunnerprint("{} {}".format("hello", "world")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5413342 pylint-4.0.9/doc/data/messages/f/format-needs-mapping/0000755000175100017510000000000015254767632022261 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4815724 pylint-4.0.9/doc/data/messages/f/format-needs-mapping/bad.py0000644000175100017510000000007015254767617023361 0ustar00runnerrunnerprint("%(x)d %(y)d" % [1, 2]) # [format-needs-mapping] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481633 pylint-4.0.9/doc/data/messages/f/format-needs-mapping/good.py0000644000175100017510000000005015254767617023561 0ustar00runnerrunnerprint("%(x)d %(y)d" % {"x": 1, "y": 2}) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5416708 pylint-4.0.9/doc/data/messages/f/format-string-without-interpolation/0000755000175100017510000000000015254767632025426 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481633 pylint-4.0.9/doc/data/messages/f/format-string-without-interpolation/bad.py0000644000175100017510000000010315254767617026523 0ustar00runnerrunnerprint("number".format(1)) # [format-string-without-interpolation] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4816997 pylint-4.0.9/doc/data/messages/f/format-string-without-interpolation/good.py0000644000175100017510000000003615254767617026732 0ustar00runnerrunnerprint("number: {}".format(1)) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.542142 pylint-4.0.9/doc/data/messages/f/function-redefined/0000755000175100017510000000000015254767632022014 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4816997 pylint-4.0.9/doc/data/messages/f/function-redefined/bad.py0000644000175100017510000000011615254767617023115 0ustar00runnerrunnerdef get_email(): pass def get_email(): # [function-redefined] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4817927 pylint-4.0.9/doc/data/messages/f/function-redefined/good.py0000644000175100017510000000003215254767617023314 0ustar00runnerrunnerdef get_email(): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4106185 pylint-4.0.9/doc/data/messages/g/0000755000175100017510000000000015254767631016244 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5426219 pylint-4.0.9/doc/data/messages/g/global-at-module-level/0000755000175100017510000000000015254767632022477 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4818442 pylint-4.0.9/doc/data/messages/g/global-at-module-level/bad.py0000644000175100017510000000006415254767617023602 0ustar00runnerrunnerprice = 25 global price # [global-at-module-level] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481881 pylint-4.0.9/doc/data/messages/g/global-at-module-level/good.py0000644000175100017510000000001315254767617023776 0ustar00runnerrunnerprice = 25 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481881 pylint-4.0.9/doc/data/messages/g/global-at-module-level/related.rst0000644000175100017510000000051115254767617024651 0ustar00runnerrunner- `Official Python FAQ - global and local `_ - `PEP 3104 - Access to Names in Outer Scopes `_ - `Python global statement `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5429509 pylint-4.0.9/doc/data/messages/g/global-statement/0000755000175100017510000000000015254767632021507 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481881 pylint-4.0.9/doc/data/messages/g/global-statement/bad.py0000644000175100017510000000015115254767617022607 0ustar00runnerrunnervar = 1 def foo(): global var # [global-statement] var = 10 print(var) foo() print(var) ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481967 pylint-4.0.9/doc/data/messages/g/global-statement/good.py0000644000175100017510000000011315254767617023007 0ustar00runnerrunnervar = 1 def foo(): print(var) return 10 var = foo() print(var) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5432212 pylint-4.0.9/doc/data/messages/g/global-variable-not-assigned/0000755000175100017510000000000015254767632023661 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.481967 pylint-4.0.9/doc/data/messages/g/global-variable-not-assigned/bad.py0000644000175100017510000000016515254767617024766 0ustar00runnerrunnerTOMATO = "black cherry" def update_tomato(): global TOMATO # [global-variable-not-assigned] print(TOMATO) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4820294 pylint-4.0.9/doc/data/messages/g/global-variable-not-assigned/good.py0000644000175100017510000000013315254767617025163 0ustar00runnerrunnerTOMATO = "black cherry" def update_tomato(): global TOMATO TOMATO = "moneymaker" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5435135 pylint-4.0.9/doc/data/messages/g/global-variable-undefined/0000755000175100017510000000000015254767632023227 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4820294 pylint-4.0.9/doc/data/messages/g/global-variable-undefined/bad.py0000644000175100017510000000014015254767617024325 0ustar00runnerrunnerdef update_tomato(): global TOMATO # [global-variable-undefined] TOMATO = "moneymaker" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.482092 pylint-4.0.9/doc/data/messages/g/global-variable-undefined/good.py0000644000175100017510000000013315254767617024531 0ustar00runnerrunnerTOMATO = "black cherry" def update_tomato(): global TOMATO TOMATO = "moneymaker" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.4146185 pylint-4.0.9/doc/data/messages/i/0000755000175100017510000000000015254767631016246 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5438247 pylint-4.0.9/doc/data/messages/i/implicit-flag-alias/0000755000175100017510000000000015254767632022057 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177167.48214 pylint-4.0.9/doc/data/messages/i/implicit-flag-alias/bad.py0000644000175100017510000000017715254767617023167 0ustar00runnerrunnerfrom enum import IntFlag class FilePermissions(IntFlag): READ = 1 WRITE = 2 EXECUTE = 3 # [implicit-flag-alias] ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.482179 pylint-4.0.9/doc/data/messages/i/implicit-flag-alias/good.py0000644000175100017510000000014615254767617023365 0ustar00runnerrunnerfrom enum import IntFlag class FilePermissions(IntFlag): READ = 1 WRITE = 2 EXECUTE = 4 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.543966 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/0000755000175100017510000000000015254767632022134 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.544265 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/bad/0000755000175100017510000000000015254767632022662 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4822268 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/bad/list.py0000644000175100017510000000004715254767617024213 0ustar00runnerrunnerx = ["a" "b"] # [implicit-str-concat] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4822662 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/bad/open.py0000644000175100017510000000011615254767617024176 0ustar00runnerrunnerwith open("hello.txt" "r") as f: # [implicit-str-concat] print(f.read()) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4822662 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/details.rst0000644000175100017510000000211415254767617024314 0ustar00runnerrunnerBy default, detection of implicit string concatenation of line jumps is disabled. Hence the following code will not trigger this rule: .. code-block:: python SEQ = ('a', 'b' 'c') In order to detect this case, you must enable `check-str-concat-over-line-jumps`: .. code-block:: toml [STRING_CONSTANT] check-str-concat-over-line-jumps = true However, the drawback of this setting is that it will trigger false positive for string parameters passed on multiple lines in function calls: .. code-block:: python warnings.warn( "rotate() is deprecated and will be removed in a future release. " "Use the rotation() context manager instead.", DeprecationWarning, stacklevel=3, ) No message will be emitted, though, if you clarify the wanted concatenation with parentheses: .. code-block:: python warnings.warn( ( "rotate() is deprecated and will be removed in a future release. " "Use the rotation() context manager instead." ), DeprecationWarning, stacklevel=3, ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5445468 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/good/0000755000175100017510000000000015254767632023064 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4822662 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/good/list.py0000644000175100017510000000001715254767617024412 0ustar00runnerrunnerx = ["a", "b"] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4823565 pylint-4.0.9/doc/data/messages/i/implicit-str-concat/good/open.py0000644000175100017510000000006615254767617024404 0ustar00runnerrunnerwith open("hello.txt", "r") as f: print(f.read()) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5449855 pylint-4.0.9/doc/data/messages/i/import-error/0000755000175100017510000000000015254767632020710 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4823565 pylint-4.0.9/doc/data/messages/i/import-error/bad.py0000644000175100017510000000005215254767617022010 0ustar00runnerrunnerfrom patlib import Path # [import-error] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4824212 pylint-4.0.9/doc/data/messages/i/import-error/details.rst0000644000175100017510000000030015254767617023063 0ustar00runnerrunnerThis can happen if you're importing a package that is not installed in your environment, or if you made a typo. The solution is to install the package via pip/setup.py/wheel or fix the typo. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4824212 pylint-4.0.9/doc/data/messages/i/import-error/good.py0000644000175100017510000000003115254767617022207 0ustar00runnerrunnerfrom pathlib import Path ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5452836 pylint-4.0.9/doc/data/messages/i/import-outside-toplevel/0000755000175100017510000000000015254767632023063 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4824212 pylint-4.0.9/doc/data/messages/i/import-outside-toplevel/bad.py0000644000175100017510000000014515254767617024166 0ustar00runnerrunnerdef print_python_version(): import sys # [import-outside-toplevel] print(sys.version_info) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825017 pylint-4.0.9/doc/data/messages/i/import-outside-toplevel/good.py0000644000175100017510000000010515254767617024364 0ustar00runnerrunnerimport sys def print_python_version(): print(sys.version_info) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5458784 pylint-4.0.9/doc/data/messages/i/import-private-name/0000755000175100017510000000000015254767632022147 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825017 pylint-4.0.9/doc/data/messages/i/import-private-name/bad.py0000644000175100017510000000033715254767617023255 0ustar00runnerrunnerfrom argparse import _AttributeHolder, _SubParsersAction # [import-private-name] attr_holder = _AttributeHolder() def add_sub_parser(sub_parsers: _SubParsersAction): sub_parsers.add_parser("my_subparser") # ... ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825728 pylint-4.0.9/doc/data/messages/i/import-private-name/details.rst0000644000175100017510000000020315254767617024324 0ustar00runnerrunnerUsing private imports expose you to unexpected breaking changes for any version bump of your dependencies, even in patch versions. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825728 pylint-4.0.9/doc/data/messages/i/import-private-name/good.py0000644000175100017510000000031115254767617023447 0ustar00runnerrunner"""Private import can be used as type annotations.""" from argparse import _SubParsersAction def add_sub_parser(sub_parsers: _SubParsersAction): sub_parsers.add_parser("my_subparser") # ... ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825728 pylint-4.0.9/doc/data/messages/i/import-private-name/pylintrc0000644000175100017510000000006715254767617023744 0ustar00runnerrunner[main] load-plugins = pylint.extensions.private_import ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5460093 pylint-4.0.9/doc/data/messages/i/import-self/0000755000175100017510000000000015254767632020510 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825728 pylint-4.0.9/doc/data/messages/i/import-self/details.rst0000644000175100017510000000041715254767617022674 0ustar00runnerrunnerSay you have a file called ``my_file.py``. ``import-self`` would be raised on the following code:: from my_file import a_function # [import-self] def a_function(): pass The solution would be to remove the import:: def a_function(): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5463173 pylint-4.0.9/doc/data/messages/i/inconsistent-mro/0000755000175100017510000000000015254767632021562 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4825728 pylint-4.0.9/doc/data/messages/i/inconsistent-mro/bad.py0000644000175100017510000000013115254767617022660 0ustar00runnerrunnerclass A: pass class B(A): pass class C(A, B): # [inconsistent-mro] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4826202 pylint-4.0.9/doc/data/messages/i/inconsistent-mro/good.py0000644000175100017510000000014315254767617023065 0ustar00runnerrunnerclass A: pass class B(A): pass class C(B): # or 'B, A' or 'A' but not 'A, B' pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5467741 pylint-4.0.9/doc/data/messages/i/inconsistent-quotes/0000755000175100017510000000000015254767632022305 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4826202 pylint-4.0.9/doc/data/messages/i/inconsistent-quotes/bad.py0000644000175100017510000000014715254767617023412 0ustar00runnerrunnerimport datetime print('Current year: ', datetime.date.today().strftime("%Y")) # [inconsistent-quotes] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4827924 pylint-4.0.9/doc/data/messages/i/inconsistent-quotes/good.py0000644000175100017510000000011715254767617023611 0ustar00runnerrunnerimport datetime print("Current year: ", datetime.date.today().strftime("%Y")) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4827924 pylint-4.0.9/doc/data/messages/i/inconsistent-quotes/pylintrc0000644000175100017510000000004315254767617024074 0ustar00runnerrunner[main] check-quote-consistency=yes ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.547084 pylint-4.0.9/doc/data/messages/i/inconsistent-return-statements/0000755000175100017510000000000015254767632024471 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4827924 pylint-4.0.9/doc/data/messages/i/inconsistent-return-statements/bad.py0000644000175100017510000000016515254767617025576 0ustar00runnerrunnerdef get_the_answer(value: str) -> str | None: # [inconsistent-return-statements] if value: return value ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.482874 pylint-4.0.9/doc/data/messages/i/inconsistent-return-statements/good.py0000644000175100017510000000014115254767617025772 0ustar00runnerrunnerdef get_the_answer(value: str) -> str | None: if value: return value return None ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5474007 pylint-4.0.9/doc/data/messages/i/inherit-non-class/0000755000175100017510000000000015254767632021604 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.482874 pylint-4.0.9/doc/data/messages/i/inherit-non-class/bad.py0000644000175100017510000000006315254767617022706 0ustar00runnerrunnerclass Fruit(bool): # [inherit-non-class] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4829404 pylint-4.0.9/doc/data/messages/i/inherit-non-class/good.py0000644000175100017510000000006215254767617023107 0ustar00runnerrunnerclass Fruit: def __bool__(self): pass ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.547697 pylint-4.0.9/doc/data/messages/i/init-is-generator/0000755000175100017510000000000015254767632021607 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4829404 pylint-4.0.9/doc/data/messages/i/init-is-generator/bad.py0000644000175100017510000000021415254767617022707 0ustar00runnerrunnerclass Fruit: def __init__(self, worms): # [init-is-generator] yield from worms apple = Fruit(["Fahad", "Anisha", "Tabatha"]) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4830089 pylint-4.0.9/doc/data/messages/i/init-is-generator/good.py0000644000175100017510000000032315254767617023112 0ustar00runnerrunnerclass Fruit: def __init__(self, worms): self.__worms = worms def worms(self): yield from self.__worms apple = Fruit(["Fahad", "Anisha", "Tabatha"]) for worm in apple.worms(): pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5479932 pylint-4.0.9/doc/data/messages/i/invalid-all-format/0000755000175100017510000000000015254767632021731 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4830089 pylint-4.0.9/doc/data/messages/i/invalid-all-format/bad.py0000644000175100017510000000006615254767617023036 0ustar00runnerrunner__all__ = "CONST" # [invalid-all-format] CONST = 42 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4830713 pylint-4.0.9/doc/data/messages/i/invalid-all-format/good.py0000644000175100017510000000004115254767617023231 0ustar00runnerrunner__all__ = ("CONST",) CONST = 42 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5486186 pylint-4.0.9/doc/data/messages/i/invalid-all-object/0000755000175100017510000000000015254767632021707 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4830713 pylint-4.0.9/doc/data/messages/i/invalid-all-object/bad.py0000644000175100017510000000016415254767617023013 0ustar00runnerrunner__all__ = ( None, # [invalid-all-object] Fruit, Worm, ) class Fruit: pass class Worm: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4831367 pylint-4.0.9/doc/data/messages/i/invalid-all-object/details.rst0000644000175100017510000000055715254767617024100 0ustar00runnerrunnerFrom `The Python Language Reference – The import statement `_: "The `public names` defined by a module are determined by checking the module's namespace for a variable named ``__all__``; if defined, it must be a sequence of strings which are names defined or imported by that module." ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4831367 pylint-4.0.9/doc/data/messages/i/invalid-all-object/good.py0000644000175100017510000000011315254767617023207 0ustar00runnerrunner__all__ = ["Fruit", "Worm"] class Fruit: pass class Worm: pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4831367 pylint-4.0.9/doc/data/messages/i/invalid-all-object/related.rst0000644000175100017510000000015115254767617024061 0ustar00runnerrunner- `PEP 8 – Style Guide for Python Code `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5489383 pylint-4.0.9/doc/data/messages/i/invalid-bool-returned/0000755000175100017510000000000015254767632022454 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4831367 pylint-4.0.9/doc/data/messages/i/invalid-bool-returned/bad.py0000644000175100017510000000017115254767617023556 0ustar00runnerrunnerclass CustomBool: """__bool__ returns an int""" def __bool__(self): # [invalid-bool-returned] return 1 ././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177167.48324 pylint-4.0.9/doc/data/messages/i/invalid-bool-returned/good.py0000644000175100017510000000014115254767617023755 0ustar00runnerrunnerclass CustomBool: """__bool__ returns `bool`""" def __bool__(self): return True ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5492294 pylint-4.0.9/doc/data/messages/i/invalid-bytes-returned/0000755000175100017510000000000015254767632022647 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1790177167.48324 pylint-4.0.9/doc/data/messages/i/invalid-bytes-returned/bad.py0000644000175100017510000000020715254767617023751 0ustar00runnerrunnerclass CustomBytes: """__bytes__ returns """ def __bytes__(self): # [invalid-bytes-returned] return "123" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4833033 pylint-4.0.9/doc/data/messages/i/invalid-bytes-returned/good.py0000644000175100017510000000016515254767617024156 0ustar00runnerrunnerclass CustomBytes: """__bytes__ returns """ def __bytes__(self): return b"some bytes" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5494983 pylint-4.0.9/doc/data/messages/i/invalid-character-backspace/0000755000175100017510000000000015254767632023541 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4833033 pylint-4.0.9/doc/data/messages/i/invalid-character-backspace/bad.py0000644000175100017510000000011215254767617024636 0ustar00runnerrunnerSTRING = "Invalid character backspace " # [invalid-character-backspace] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4833655 pylint-4.0.9/doc/data/messages/i/invalid-character-backspace/good.py0000644000175100017510000000005015254767617025041 0ustar00runnerrunnerSTRING = "Valid character backspace \b" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5497816 pylint-4.0.9/doc/data/messages/i/invalid-character-carriage-return/0000755000175100017510000000000015254767632024717 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4833655 pylint-4.0.9/doc/data/messages/i/invalid-character-carriage-return/details.rst0000644000175100017510000000051515254767617027102 0ustar00runnerrunnerThis message exists because one of our checkers is very generic, but it's never going to raise during normal use as it's a ``syntax-error`` that would prevent the python ast (and thus pylint) from constructing a code representation of the file. You could encounter it by feeding a properly constructed node directly to the checker. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4834332 pylint-4.0.9/doc/data/messages/i/invalid-character-carriage-return/good.py0000644000175100017510000000004515254767617026223 0ustar00runnerrunnerSTRING = "Valid carriage return: \r" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5500405 pylint-4.0.9/doc/data/messages/i/invalid-character-esc/0000755000175100017510000000000015254767632022377 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4834332 pylint-4.0.9/doc/data/messages/i/invalid-character-esc/bad.py0000644000175100017510000000010115254767617023472 0ustar00runnerrunnerSTRING = "Invalid escape character " # [invalid-character-esc] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4834948 pylint-4.0.9/doc/data/messages/i/invalid-character-esc/good.py0000644000175100017510000000004715254767617023705 0ustar00runnerrunnerSTRING = "Valid escape character \x1b" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5504458 pylint-4.0.9/doc/data/messages/i/invalid-character-nul/0000755000175100017510000000000015254767632022423 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4834948 pylint-4.0.9/doc/data/messages/i/invalid-character-nul/details.rst0000644000175100017510000000013315254767617024602 0ustar00runnerrunnerThere's no need to use end-of-string characters. String objects maintain their own length. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.483564 pylint-4.0.9/doc/data/messages/i/invalid-character-nul/good.py0000644000175100017510000000004615254767617023730 0ustar00runnerrunnerSTRING = "Valid nul terminator: \x00" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.483564 pylint-4.0.9/doc/data/messages/i/invalid-character-nul/related.rst0000644000175100017510000000011715254767617024577 0ustar00runnerrunner- `Null terminator in python `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5506184 pylint-4.0.9/doc/data/messages/i/invalid-character-sub/0000755000175100017510000000000015254767632022416 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.483564 pylint-4.0.9/doc/data/messages/i/invalid-character-sub/bad.py0000644000175100017510000000007615254767617023524 0ustar00runnerrunnerSTRING = "Invalid character sub " # [invalid-character-sub] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4836447 pylint-4.0.9/doc/data/messages/i/invalid-character-sub/good.py0000644000175100017510000000004315254767617023720 0ustar00runnerrunnerSTRING = "Valid character sub x1A" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5510023 pylint-4.0.9/doc/data/messages/i/invalid-character-zero-width-space/0000755000175100017510000000000015254767632025012 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4836447 pylint-4.0.9/doc/data/messages/i/invalid-character-zero-width-space/bad.py0000644000175100017510000000013215254767617026111 0ustar00runnerrunnerSTRING = "Invalid character zero-width-space ​" # [invalid-character-zero-width-space] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4837165 pylint-4.0.9/doc/data/messages/i/invalid-character-zero-width-space/good.py0000644000175100017510000000006215254767617026315 0ustar00runnerrunnerSTRING = "Valid character zero-width-space u200B" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5511382 pylint-4.0.9/doc/data/messages/i/invalid-characters-in-docstring/0000755000175100017510000000000015254767632024410 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4837165 pylint-4.0.9/doc/data/messages/i/invalid-characters-in-docstring/details.rst0000644000175100017510000000027715254767617026600 0ustar00runnerrunnerThis is a message linked to an internal problem in enchant. There's nothing to change in your code, but maybe in pylint's configuration or the way you installed the 'enchant' system library. ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5514245 pylint-4.0.9/doc/data/messages/i/invalid-class-object/0000755000175100017510000000000015254767632022244 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4837165 pylint-4.0.9/doc/data/messages/i/invalid-class-object/bad.py0000644000175100017510000000010615254767617023344 0ustar00runnerrunnerclass Apple: pass Apple.__class__ = 1 # [invalid-class-object] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4838228 pylint-4.0.9/doc/data/messages/i/invalid-class-object/good.py0000644000175100017510000000012615254767617023550 0ustar00runnerrunnerclass Apple: pass class RedDelicious: pass Apple.__class__ = RedDelicious ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5516634 pylint-4.0.9/doc/data/messages/i/invalid-enum-extension/0000755000175100017510000000000015254767632022651 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4838228 pylint-4.0.9/doc/data/messages/i/invalid-enum-extension/bad.py0000644000175100017510000000021115254767617023746 0ustar00runnerrunnerfrom enum import Enum class Color(Enum): ORANGE = 1 CHERRY = 2 class Fruit(Color): # [invalid-enum-extension] APPLE = 3 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.483888 pylint-4.0.9/doc/data/messages/i/invalid-enum-extension/good.py0000644000175100017510000000021215254767617024151 0ustar00runnerrunnerfrom enum import Enum class Color(Enum): ORANGE = 1 CHERRY = 2 class Fruit(Enum): ORANGE = 1 CHERRY = 2 APPLE = 3 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5519176 pylint-4.0.9/doc/data/messages/i/invalid-envvar-default/0000755000175100017510000000000015254767632022616 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.483888 pylint-4.0.9/doc/data/messages/i/invalid-envvar-default/bad.py0000644000175100017510000000011015254767617023711 0ustar00runnerrunnerimport os env = os.getenv("SECRET_KEY", 1) # [invalid-envvar-default] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4839518 pylint-4.0.9/doc/data/messages/i/invalid-envvar-default/good.py0000644000175100017510000000005615254767617024124 0ustar00runnerrunnerimport os env = os.getenv("SECRET_KEY", "1") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5521603 pylint-4.0.9/doc/data/messages/i/invalid-envvar-value/0000755000175100017510000000000015254767632022306 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4839518 pylint-4.0.9/doc/data/messages/i/invalid-envvar-value/bad.py0000644000175100017510000000006215254767617023407 0ustar00runnerrunnerimport os os.getenv(1) # [invalid-envvar-value] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4840136 pylint-4.0.9/doc/data/messages/i/invalid-envvar-value/good.py0000644000175100017510000000003215254767617023606 0ustar00runnerrunnerimport os os.getenv("1") ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5523953 pylint-4.0.9/doc/data/messages/i/invalid-field-call/0000755000175100017510000000000015254767632021667 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4840136 pylint-4.0.9/doc/data/messages/i/invalid-field-call/bad.py0000644000175100017510000000040715254767617022773 0ustar00runnerrunnerfrom dataclasses import dataclass, field @dataclass class C: a: float b: float c: float field(init=False) # [invalid-field-call] def __post_init__(self): self.c = self.a + self.b print(field(init=False)) # [invalid-field-call] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4840834 pylint-4.0.9/doc/data/messages/i/invalid-field-call/good.py0000644000175100017510000000052215254767617023173 0ustar00runnerrunnerfrom dataclasses import dataclass, field, make_dataclass C = make_dataclass( "C", [("x", int), "y", ("z", int, field(default=5))], namespace={"add_one": lambda self: self.x + 1}, ) @dataclass class C: a: float b: float c: float = field(init=False) def __post_init__(self): self.c = self.a + self.b ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5526395 pylint-4.0.9/doc/data/messages/i/invalid-format-index/0000755000175100017510000000000015254767632022270 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4840834 pylint-4.0.9/doc/data/messages/i/invalid-format-index/bad.py0000644000175100017510000000020415254767617023367 0ustar00runnerrunnernot_enough_fruits = ["apple"] print('The second fruit is a {fruits[1]}'.format(fruits=not_enough_fruits)) # [invalid-format-index] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4841485 pylint-4.0.9/doc/data/messages/i/invalid-format-index/good.py0000644000175100017510000000015415254767617023575 0ustar00runnerrunnerenough_fruits = ["apple", "banana"] print("The second fruit is a {fruits[1]}".format(fruits=enough_fruits)) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5528953 pylint-4.0.9/doc/data/messages/i/invalid-format-returned/0000755000175100017510000000000015254767632023011 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4841485 pylint-4.0.9/doc/data/messages/i/invalid-format-returned/bad.py0000644000175100017510000000022415254767617024112 0ustar00runnerrunnerclass CustomFormat: """__format__ returns """ def __format__(self, format_spec): # [invalid-format-returned] return 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4842153 pylint-4.0.9/doc/data/messages/i/invalid-format-returned/good.py0000644000175100017510000000017615254767617024322 0ustar00runnerrunnerclass CustomFormat: """__format__ returns """ def __format__(self, format_spec): return "hello!" ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.553132 pylint-4.0.9/doc/data/messages/i/invalid-getnewargs-ex-returned/0000755000175100017510000000000015254767632024301 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4842153 pylint-4.0.9/doc/data/messages/i/invalid-getnewargs-ex-returned/bad.py0000644000175100017510000000031615254767617025404 0ustar00runnerrunnerclass CustomGetNewArgsEx: """__getnewargs_ex__ returns tuple with incorrect arg length""" def __getnewargs_ex__(self): # [invalid-getnewargs-ex-returned] return (tuple(1), dict(x="y"), 1) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4842832 pylint-4.0.9/doc/data/messages/i/invalid-getnewargs-ex-returned/good.py0000644000175100017510000000021715254767617025606 0ustar00runnerrunnerclass CustomGetNewArgsEx: """__getnewargs_ex__ returns """ def __getnewargs_ex__(self): return ((1,), {"2": 2}) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5533679 pylint-4.0.9/doc/data/messages/i/invalid-getnewargs-returned/0000755000175100017510000000000015254767632023667 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4842832 pylint-4.0.9/doc/data/messages/i/invalid-getnewargs-returned/bad.py0000644000175100017510000000022515254767617024771 0ustar00runnerrunnerclass CustomGetNewArgs: """__getnewargs__ returns an integer""" def __getnewargs__(self): # [invalid-getnewargs-returned] return 1 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4843483 pylint-4.0.9/doc/data/messages/i/invalid-getnewargs-returned/good.py0000644000175100017510000000017515254767617025177 0ustar00runnerrunnerclass CustomGetNewArgs: """__getnewargs__ returns """ def __getnewargs__(self): return (1, 2) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5536077 pylint-4.0.9/doc/data/messages/i/invalid-hash-returned/0000755000175100017510000000000015254767632022444 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4843483 pylint-4.0.9/doc/data/messages/i/invalid-hash-returned/bad.py0000644000175100017510000000017015254767617023545 0ustar00runnerrunnerclass CustomHash: """__hash__ returns dict""" def __hash__(self): # [invalid-hash-returned] return {} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4844103 pylint-4.0.9/doc/data/messages/i/invalid-hash-returned/good.py0000644000175100017510000000013615254767617023751 0ustar00runnerrunnerclass CustomHash: """__hash__ returns `int`""" def __hash__(self): return 19 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5538635 pylint-4.0.9/doc/data/messages/i/invalid-index-returned/0000755000175100017510000000000015254767632022630 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4844103 pylint-4.0.9/doc/data/messages/i/invalid-index-returned/bad.py0000644000175100017510000000021015254767617023724 0ustar00runnerrunnerclass CustomIndex: """__index__ returns a dict""" def __index__(self): # [invalid-index-returned] return {"19": "19"} ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4844763 pylint-4.0.9/doc/data/messages/i/invalid-index-returned/good.py0000644000175100017510000000015015254767617024131 0ustar00runnerrunnerclass CustomIndex: """__index__ returns """ def __index__(self): return 19 ././@PaxHeader0000000000000000000000000000003100000000000010207 xustar0025 mtime=1790177177.5541 pylint-4.0.9/doc/data/messages/i/invalid-length-hint-returned/0000755000175100017510000000000015254767632023742 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4844763 pylint-4.0.9/doc/data/messages/i/invalid-length-hint-returned/bad.py0000644000175100017510000000022715254767617025046 0ustar00runnerrunnerclass CustomLengthHint: """__length_hint__ returns non-int""" def __length_hint__(self): # [invalid-length-hint-returned] return 3.0 ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.484541 pylint-4.0.9/doc/data/messages/i/invalid-length-hint-returned/good.py0000644000175100017510000000017115254767617025246 0ustar00runnerrunnerclass CustomLengthHint: """__length_hint__ returns """ def __length_hint__(self): return 10 ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5543332 pylint-4.0.9/doc/data/messages/i/invalid-length-returned/0000755000175100017510000000000015254767632023002 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.484541 pylint-4.0.9/doc/data/messages/i/invalid-length-returned/bad.py0000644000175100017510000000027515254767617024111 0ustar00runnerrunnerclass FruitBasket: def __init__(self, fruits): self.fruits = ["Apple", "Banana", "Orange"] def __len__(self): # [invalid-length-returned] return -len(self.fruits) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4846082 pylint-4.0.9/doc/data/messages/i/invalid-length-returned/good.py0000644000175100017510000000023715254767617024311 0ustar00runnerrunnerclass FruitBasket: def __init__(self, fruits): self.fruits = ["Apple", "Banana", "Orange"] def __len__(self): return len(self.fruits) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5546863 pylint-4.0.9/doc/data/messages/i/invalid-match-args-definition/0000755000175100017510000000000015254767632024047 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4846082 pylint-4.0.9/doc/data/messages/i/invalid-match-args-definition/bad.py0000644000175100017510000000026015254767617025150 0ustar00runnerrunnerclass Book: __match_args__ = ["title", "year"] # [invalid-match-args-definition] def __init__(self, title, year): self.title = title self.year = year ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.484678 pylint-4.0.9/doc/data/messages/i/invalid-match-args-definition/good.py0000644000175100017510000000021515254767617025352 0ustar00runnerrunnerclass Book: __match_args__ = ("title", "year") def __init__(self, title, year): self.title = title self.year = year ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.484678 pylint-4.0.9/doc/data/messages/i/invalid-match-args-definition/related.rst0000644000175100017510000000021215254767617026217 0ustar00runnerrunner- `Python documentation `_ ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177177.5549424 pylint-4.0.9/doc/data/messages/i/invalid-metaclass/0000755000175100017510000000000015254767632021647 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177167.484678 pylint-4.0.9/doc/data/messages/i/invalid-metaclass/bad.py0000644000175100017510000000007415254767617022753 0ustar00runnerrunnerclass Apple(metaclass=int): # [invalid-metaclass] pass ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4847744 pylint-4.0.9/doc/data/messages/i/invalid-metaclass/good.py0000644000175100017510000000006515254767617023155 0ustar00runnerrunnerclass Plant: pass class Apple(Plant): pass ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1790177177.555292 pylint-4.0.9/doc/data/messages/i/invalid-name/0000755000175100017510000000000015254767632020613 5ustar00runnerrunner././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4847744 pylint-4.0.9/doc/data/messages/i/invalid-name/bad.py0000644000175100017510000000031715254767617021717 0ustar00runnerrunnerclass cat: # [invalid-name] def Meow(self, NUMBER_OF_MEOW): # [invalid-name, invalid-name] print("Meow" * NUMBER_OF_MEOW) return NUMBER_OF_MEOW Cat = cat().Meow(42) # [invalid-name] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1790177167.4848797 pylint-4.0.9/doc/data/messages/i/invalid-name/details.rst0000644000175100017510000003031315254767617022775 0ustar00runnerrunnerPylint recognizes a number of different name types internally. With a few exceptions, the type of the name is governed by the location the assignment to a name is found in, and not the type of object assigned. +--------------------+-------------------------------------------------------------------------------------------------------------+ | Name Type | Description | +====================+=============================================================================================================+ | ``module`` | Module and package names, same as the file names. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``const`` | Module-level constants: any name defined at module level that is not bound to a class object nor reassigned.| +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``class`` | Names in ``class`` statements, as well as names bound to class objects at module level. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``function`` | Functions, toplevel or nested in functions or methods. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``method`` | Methods, functions defined in class bodies. Includes static and class methods. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``attr`` | Attributes created on class instances inside methods. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``argument`` | Arguments to any function type, including lambdas. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``variable`` | Local variables in function scopes or module-level names that are assigned multiple times. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``class-attribute``| Attributes defined in class bodies. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``class-const`` | Enum constants and class variables annotated with ``Final`` | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``inlinevar`` | Loop variables in list comprehensions and generator expressions. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``typevar`` | Type variable declared with ``TypeVar``. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``paramspec`` | Parameter specification variable declared with ``ParamSpec``. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``typevartuple`` | Type variable tuple declared with ``TypeVarTuple``. | +--------------------+-------------------------------------------------------------------------------------------------------------+ | ``typealias`` | Type alias declared with ``TypeAlias`` or assignments of ``Union``. | +--------------------+-------------------------------------------------------------------------------------------------------------+ Names assigned in an ``if __name__ == "__main__":`` block are an exception: such a block reads like a script body, so a name there is accepted if it follows either the ``const`` or the ``variable`` naming style:: if __name__ == "__main__": apple_count = count_apples() # accepted, variable style APPLE_COUNT = count_apples() # accepted, constant style appleCount = count_apples() # reported, it follows neither style The ``else`` branch of such a block runs when the module is imported, so names assigned there keep following the ``const`` naming style. Default behavior ~~~~~~~~~~~~~~~~ By default, Pylint will enforce PEP8_-suggested names. Predefined Naming Styles ~~~~~~~~~~~~~~~~~~~~~~~~ Pylint provides set of predefined naming styles. Those predefined naming styles may be used to adjust Pylint configuration to coding style used in linted project. Following predefined naming styles are available: * ``snake_case`` * ``camelCase`` * ``PascalCase`` * ``UPPER_CASE`` * ``any`` - fake style which does not enforce any limitations The following options are exposed: .. option:: --module-naming-style=